3.2.1: 2012-12-13

net.sf.basedb.core.data
Class PasswordData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.PasswordData
All Implemented Interfaces:
IdentifiableData

public class PasswordData
extends BasicData

This class holds the password for a user. It has a one-to-one relationship with the UserData class. We have enabled proxies to avoid loading passwords unless it is necessary. The second-level cache must never be enabled for this class.

Version:
2.0
Author:
Nicklas
See Also:
Developer documentation: User authentication
Hibernate: class
table="`Passwords`" lazy="true"

Field Summary
private  String cryptedPassword
           
private  UserData user
           
 
Constructor Summary
PasswordData()
           
 
Method Summary
 String getCryptedPassword()
          Get the crypted password.
 UserData getUser()
          Get the user this password is referring to.
 void setCryptedPassword(String cryptedPassword)
          Set the encrypted password.
(package private)  void setUser(UserData user)
           
 
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

cryptedPassword

private String cryptedPassword

user

private UserData user
Constructor Detail

PasswordData

public PasswordData()
Method Detail

getCryptedPassword

public String getCryptedPassword()
Get the crypted password.

Since:
3.0
Hibernate: property
column="`crypted_password`" type="string" length="255" not-null="false"

setCryptedPassword

public void setCryptedPassword(String cryptedPassword)
Set the encrypted password. The password should be encrypted with User.encryptPassword(String).

Since:
3.0

getUser

public UserData getUser()
Get the user this password is referring to.

Hibernate: one-to-one
class="net.sf.basedb.core.data.UserData"

setUser

void setUser(UserData user)

3.2.1: 2012-12-13