Updated ThdlUser classes to use nullable Integers instead of primitives.

This commit is contained in:
dubtraxis 2003-10-18 13:47:16 +00:00
parent d6ae46d93d
commit 3d20b50e42
2 changed files with 50 additions and 50 deletions

View File

@ -7,12 +7,12 @@ import java.util.*;
/** /**
* Description of the Class * Description of the Class
* *
*@author travis * @author travis
*@created October 2, 2003 * @created October 2, 2003
*/ */
public class ThdlUser implements Serializable public class ThdlUser implements Serializable
{ {
private int id; private Integer id;
private String firstname; private String firstname;
private String lastname; private String lastname;
private String middlename; private String middlename;
@ -27,8 +27,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the roles attribute of the ThdlUser object * Sets the roles attribute of the ThdlUser object
* *
*@param roles The new roles value * @param roles The new roles value
*@since * @since
*/ */
public void setRoles( String roles ) public void setRoles( String roles )
{ {
@ -39,8 +39,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the creditAttributionTag attribute of the ThdlUser object * Sets the creditAttributionTag attribute of the ThdlUser object
* *
*@param creditAttributionTag The new creditAttributionTag value * @param creditAttributionTag The new creditAttributionTag value
*@since * @since
*/ */
public void setCreditAttributionTag( String creditAttributionTag ) public void setCreditAttributionTag( String creditAttributionTag )
{ {
@ -51,10 +51,10 @@ public class ThdlUser implements Serializable
/** /**
* Sets the id attribute of the ThdlUser object * Sets the id attribute of the ThdlUser object
* *
*@param id The new id value * @param id The new id value
*@since * @since
*/ */
public void setId( int id ) public void setId( Integer id )
{ {
this.id = id; this.id = id;
} }
@ -63,8 +63,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the firstname attribute of the ThdlUser object * Sets the firstname attribute of the ThdlUser object
* *
*@param firstname The new firstname value * @param firstname The new firstname value
*@since * @since
*/ */
public void setFirstname( String firstname ) public void setFirstname( String firstname )
{ {
@ -75,8 +75,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the lastname attribute of the ThdlUser object * Sets the lastname attribute of the ThdlUser object
* *
*@param lastname The new lastname value * @param lastname The new lastname value
*@since * @since
*/ */
public void setLastname( String lastname ) public void setLastname( String lastname )
{ {
@ -87,8 +87,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the middlename attribute of the ThdlUser object * Sets the middlename attribute of the ThdlUser object
* *
*@param middlename The new middlename value * @param middlename The new middlename value
*@since * @since
*/ */
public void setMiddlename( String middlename ) public void setMiddlename( String middlename )
{ {
@ -99,8 +99,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the email attribute of the ThdlUser object * Sets the email attribute of the ThdlUser object
* *
*@param email The new email value * @param email The new email value
*@since * @since
*/ */
public void setEmail( String email ) public void setEmail( String email )
{ {
@ -111,8 +111,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the username attribute of the ThdlUser object * Sets the username attribute of the ThdlUser object
* *
*@param username The new username value * @param username The new username value
*@since * @since
*/ */
public void setUsername( String username ) public void setUsername( String username )
{ {
@ -123,8 +123,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the password attribute of the ThdlUser object * Sets the password attribute of the ThdlUser object
* *
*@param password The new password value * @param password The new password value
*@since * @since
*/ */
public void setPassword( String password ) public void setPassword( String password )
{ {
@ -135,8 +135,8 @@ public class ThdlUser implements Serializable
/** /**
* Sets the passwordHint attribute of the ThdlUser object * Sets the passwordHint attribute of the ThdlUser object
* *
*@param passwordHint The new passwordHint value * @param passwordHint The new passwordHint value
*@since * @since
*/ */
public void setPasswordHint( String passwordHint ) public void setPasswordHint( String passwordHint )
{ {
@ -147,8 +147,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the roles attribute of the ThdlUser object * Gets the roles attribute of the ThdlUser object
* *
*@return The roles value * @return The roles value
*@since * @since
*/ */
public String getRoles() public String getRoles()
{ {
@ -163,8 +163,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the creditAttributionTag attribute of the ThdlUser object * Gets the creditAttributionTag attribute of the ThdlUser object
* *
*@return The creditAttributionTag value * @return The creditAttributionTag value
*@since * @since
*/ */
public String getCreditAttributionTag() public String getCreditAttributionTag()
{ {
@ -175,10 +175,10 @@ public class ThdlUser implements Serializable
/** /**
* Gets the id attribute of the ThdlUser object * Gets the id attribute of the ThdlUser object
* *
*@return The id value * @return The id value
*@since * @since
*/ */
public int getId() public Integer getId()
{ {
return id; return id;
} }
@ -187,8 +187,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the firstname attribute of the ThdlUser object * Gets the firstname attribute of the ThdlUser object
* *
*@return The firstname value * @return The firstname value
*@since * @since
*/ */
public String getFirstname() public String getFirstname()
{ {
@ -199,8 +199,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the lastname attribute of the ThdlUser object * Gets the lastname attribute of the ThdlUser object
* *
*@return The lastname value * @return The lastname value
*@since * @since
*/ */
public String getLastname() public String getLastname()
{ {
@ -211,8 +211,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the middlename attribute of the ThdlUser object * Gets the middlename attribute of the ThdlUser object
* *
*@return The middlename value * @return The middlename value
*@since * @since
*/ */
public String getMiddlename() public String getMiddlename()
{ {
@ -223,8 +223,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the email attribute of the ThdlUser object * Gets the email attribute of the ThdlUser object
* *
*@return The email value * @return The email value
*@since * @since
*/ */
public String getEmail() public String getEmail()
{ {
@ -235,8 +235,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the username attribute of the ThdlUser object * Gets the username attribute of the ThdlUser object
* *
*@return The username value * @return The username value
*@since * @since
*/ */
public String getUsername() public String getUsername()
{ {
@ -247,8 +247,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the password attribute of the ThdlUser object * Gets the password attribute of the ThdlUser object
* *
*@return The password value * @return The password value
*@since * @since
*/ */
protected String getPassword() protected String getPassword()
{ {
@ -259,8 +259,8 @@ public class ThdlUser implements Serializable
/** /**
* Gets the passwordHint attribute of the ThdlUser object * Gets the passwordHint attribute of the ThdlUser object
* *
*@return The passwordHint value * @return The passwordHint value
*@since * @since
*/ */
public String getPasswordHint() public String getPasswordHint()
{ {
@ -272,9 +272,9 @@ public class ThdlUser implements Serializable
/** /**
* Description of the Method * Description of the Method
* *
*@param userRole Description of Parameter * @param userRole Description of Parameter
*@return Description of the Returned Value * @return Description of the Returned Value
*@since * @since
*/ */
public boolean hasRole( String userRole ) public boolean hasRole( String userRole )
{ {

View File

@ -87,7 +87,7 @@ public class ThdlUserRepository
{ {
rs.next(); rs.next();
thdlUser = user; thdlUser = user;
thdlUser.setId( rs.getInt( "id" ) ); thdlUser.setId( new Integer( rs.getInt( "id" ) ) );
thdlUser.setFirstname( rs.getString( "firstname" ) ); thdlUser.setFirstname( rs.getString( "firstname" ) );
thdlUser.setLastname( rs.getString( "lastname" ) ); thdlUser.setLastname( rs.getString( "lastname" ) );
thdlUser.setMiddlename( rs.getString( "middlename" ) ); thdlUser.setMiddlename( rs.getString( "middlename" ) );
@ -264,7 +264,7 @@ public class ThdlUserRepository
{ {
ResultSet rs = stmt.executeQuery( "SELECT LAST_INSERT_ID()" ); ResultSet rs = stmt.executeQuery( "SELECT LAST_INSERT_ID()" );
rs.next(); rs.next();
thdlUser.setId( rs.getInt( 1 ) ); thdlUser.setId( new Integer( rs.getInt( 1 ) ) );
returnVal = true; returnVal = true;
} }
else else