Updated ThdlUser classes to use nullable Integers instead of primitives.
This commit is contained in:
parent
d6ae46d93d
commit
3d20b50e42
2 changed files with 50 additions and 50 deletions
|
@ -12,7 +12,7 @@ import java.util.*;
|
|||
*/
|
||||
public class ThdlUser implements Serializable
|
||||
{
|
||||
private int id;
|
||||
private Integer id;
|
||||
private String firstname;
|
||||
private String lastname;
|
||||
private String middlename;
|
||||
|
@ -54,7 +54,7 @@ public class ThdlUser implements Serializable
|
|||
* @param id The new id value
|
||||
* @since
|
||||
*/
|
||||
public void setId( int id )
|
||||
public void setId( Integer id )
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ public class ThdlUser implements Serializable
|
|||
* @return The id value
|
||||
* @since
|
||||
*/
|
||||
public int getId()
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class ThdlUserRepository
|
|||
{
|
||||
rs.next();
|
||||
thdlUser = user;
|
||||
thdlUser.setId( rs.getInt( "id" ) );
|
||||
thdlUser.setId( new Integer( rs.getInt( "id" ) ) );
|
||||
thdlUser.setFirstname( rs.getString( "firstname" ) );
|
||||
thdlUser.setLastname( rs.getString( "lastname" ) );
|
||||
thdlUser.setMiddlename( rs.getString( "middlename" ) );
|
||||
|
@ -264,7 +264,7 @@ public class ThdlUserRepository
|
|||
{
|
||||
ResultSet rs = stmt.executeQuery( "SELECT LAST_INSERT_ID()" );
|
||||
rs.next();
|
||||
thdlUser.setId( rs.getInt( 1 ) );
|
||||
thdlUser.setId( new Integer( rs.getInt( 1 ) ) );
|
||||
returnVal = true;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue