ca.bc.gov.webade.database
Class DatabaseUserCredentials

java.lang.Object
  extended byca.bc.gov.webade.user.UserCredentials
      extended byca.bc.gov.webade.database.DatabaseUserCredentials
All Implemented Interfaces:
java.io.Serializable

public final class DatabaseUserCredentials
extends UserCredentials

Author:
jross
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ca.bc.gov.webade.user.UserCredentials
UNAUTHENTICATED_USER_CREDENTIALS
 
Constructor Summary
DatabaseUserCredentials()
          Default Constructor.
DatabaseUserCredentials(UserCredentials credentials)
          Copy constructor.
DatabaseUserCredentials(UserCredentials credentials, boolean acceptsNullAttributes)
          Copy constructor.
DatabaseUserCredentials(UserTypeCode userTypeCode)
          User type code constructor.
 
Method Summary
 boolean areCredentialsComplete()
           
 boolean compareCredentials(UserCredentials credentials)
          Compares the given credentials to this instance.
 long getEUserId()
           
 java.util.Date getUpdatedDate()
           
 void mergeCredentials(UserCredentials credentials)
          Merges the given credentials into this instance, adopting credential attributes from the given object where no matching ones are set for this object.
 void setEUserId(long eUserId)
           
 void setUpdatedDate(java.util.Date updatedDate)
           
 
Methods inherited from class ca.bc.gov.webade.user.UserCredentials
areUnauthenticated, equals, getAccountName, getSourceDirectory, getUserGuid, getUserId, getUserTypeCode, hashCode, isReadOnly, setAccountName, setReadOnly, setSourceDirectory, setUserGuid, setUserTypeCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseUserCredentials

public DatabaseUserCredentials()
Default Constructor.


DatabaseUserCredentials

public DatabaseUserCredentials(UserCredentials credentials)
Copy constructor.

Parameters:
credentials - The credentials to copy.

DatabaseUserCredentials

public DatabaseUserCredentials(UserCredentials credentials,
                               boolean acceptsNullAttributes)
Copy constructor.

Parameters:
credentials - The credentials to copy.
acceptsNullAttributes - Flag that determines whether null values are valid values.

DatabaseUserCredentials

public DatabaseUserCredentials(UserTypeCode userTypeCode)
User type code constructor.

Parameters:
userTypeCode - The user type code instance for this credentials instance.
Method Detail

getEUserId

public final long getEUserId()
Returns:
Returns the eUserId.

setEUserId

public final void setEUserId(long eUserId)
Parameters:
eUserId - The eUserId to set.

getUpdatedDate

public final java.util.Date getUpdatedDate()
Returns:
Returns the date the user record in the database was last updated.

setUpdatedDate

public final void setUpdatedDate(java.util.Date updatedDate)
Parameters:
updatedDate - The date this database record was updated from the user-provider.

areCredentialsComplete

public final boolean areCredentialsComplete()
Overrides:
areCredentialsComplete in class UserCredentials
Returns:
True if all credential fields for this instance are set.
See Also:
UserCredentials.areCredentialsComplete()

mergeCredentials

public void mergeCredentials(UserCredentials credentials)
                      throws java.lang.RuntimeException
Description copied from class: UserCredentials
Merges the given credentials into this instance, adopting credential attributes from the given object where no matching ones are set for this object.

Overrides:
mergeCredentials in class UserCredentials
Parameters:
credentials - The given credentials to merge.
Throws:
java.lang.RuntimeException - Thrown if the given credentials' attributes do not match any attributes already set on this object.
See Also:
UserCredentials.mergeCredentials(ca.bc.gov.webade.user.UserCredentials)

compareCredentials

public boolean compareCredentials(UserCredentials credentials)
Description copied from class: UserCredentials
Compares the given credentials to this instance. If these objects have an attribute value that does not match, this method will return false. Attributes that either object does not have set are ignored.

Overrides:
compareCredentials in class UserCredentials
Parameters:
credentials - The credentials to compare.
Returns:
True if the credential attributes that are set match.
See Also:
UserCredentials.compareCredentials(ca.bc.gov.webade.user.UserCredentials)