org.openmrs.api.db
Class LoginCredential

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.api.db.LoginCredential
All Implemented Interfaces:
OpenmrsObject

public class LoginCredential
extends BaseOpenmrsObject
implements OpenmrsObject

This class holds the minimal amount of data necessary to change a user's password without using a PreparedStatement or putting the password in the User class. This should never be used by anything except for UserDAO and UserService methods that change passwords.

Since:
1.5

Constructor Summary
LoginCredential()
           
 
Method Summary
 boolean checkPassword(java.lang.String pw)
           
 User getChangedBy()
           
 java.util.Date getDateChanged()
           
 java.lang.String getHashedPassword()
           
 java.lang.Integer getId()
           
 java.lang.String getSalt()
           
 java.lang.String getSecretAnswer()
           
 java.lang.String getSecretQuestion()
           
 java.lang.Integer getUserId()
           
 void setChangedBy(User changedBy)
           
 void setDateChanged(java.util.Date dateChanged)
           
 void setHashedPassword(java.lang.String password)
           
 void setId(java.lang.Integer id)
           
 void setSalt(java.lang.String salt)
           
 void setSecretAnswer(java.lang.String secretAnswer)
           
 void setSecretQuestion(java.lang.String secretQuestion)
           
 void setUserId(java.lang.Integer userId)
           
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmrs.OpenmrsObject
getUuid, setUuid
 

Constructor Detail

LoginCredential

public LoginCredential()
Method Detail

getChangedBy

public User getChangedBy()
Returns:
the changedBy

setChangedBy

public void setChangedBy(User changedBy)
Parameters:
changedBy - the changedBy to set

getDateChanged

public java.util.Date getDateChanged()
Returns:
the dateChanged

setDateChanged

public void setDateChanged(java.util.Date dateChanged)
Parameters:
dateChanged - the dateChanged to set

getHashedPassword

public java.lang.String getHashedPassword()
Returns:
the password

setHashedPassword

public void setHashedPassword(java.lang.String password)
Parameters:
password - the password to set

getSalt

public java.lang.String getSalt()
Returns:
the salt

setSalt

public void setSalt(java.lang.String salt)
Parameters:
salt - the salt to set

getUserId

public java.lang.Integer getUserId()
Returns:
the userId

setUserId

public void setUserId(java.lang.Integer userId)
Parameters:
userId - the userId to set

getSecretAnswer

public java.lang.String getSecretAnswer()
Returns:
the secretAnswer

setSecretAnswer

public void setSecretAnswer(java.lang.String secretAnswer)
Parameters:
secretAnswer - the secretAnswer to set

getSecretQuestion

public java.lang.String getSecretQuestion()
Returns:
the secretQuestion

setSecretQuestion

public void setSecretQuestion(java.lang.String secretQuestion)
Parameters:
secretQuestion - the secretQuestion to set

checkPassword

public boolean checkPassword(java.lang.String pw)
Parameters:
pw -
Returns:
Whether pw is the correct cleartext password for this user

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
See Also:
OpenmrsObject.setId(java.lang.Integer)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change