|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openwms.core.domain.AbstractEntity
org.openwms.core.domain.system.usermanagement.UserPassword
public class UserPassword
Is a representation of an User
together with her password.
When an User
changes her password, the current password is added
to a history list of passwords. This is necessary to omit User
s
from setting formerly used passwords.
User
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity |
---|
AbstractEntity.AbstractEntityListener |
Field Summary |
---|
Fields inherited from class org.openwms.core.domain.AbstractEntity |
---|
FIND_ALL, FIND_BY_ID |
Constructor Summary | |
---|---|
protected |
UserPassword()
Constructor only for the persistence provider. |
|
UserPassword(User user,
String password)
Create a new UserPassword . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compare the uid property field. |
Long |
getId()
Return the technical key value. |
String |
getPassword()
Return the current password. |
Date |
getPasswordChanged()
Return the date of the last password change. |
User |
getUser()
Return the User of this password. |
long |
getVersion()
Return the value of the optimistic locking field. |
int |
hashCode()
Use the uid to calculate the hashCode. |
boolean |
isNew()
Check whether the instance is a transient or persisted one. |
void |
setUser(User user)
Change the User . |
String |
toString()
Return the password as String. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UserPassword(User user, String password)
UserPassword
.
user
- The User
to assignpassword
- The password
as String to assign
IllegalArgumentException
- when user
or password
is
null
or emptyprotected UserPassword()
Method Detail |
---|
public Long getId()
getId
in interface DomainObject<Long>
public User getUser()
User
of this password.
User
of this passwordpublic void setUser(User user)
User
.
user
- The new User
public String getPassword()
public Date getPasswordChanged()
public int hashCode()
hashCode
in class AbstractEntity
Object.hashCode()
public boolean equals(Object obj)
AbstractEntity.equals(Object)
is not called to avoid comparison
with the UUID.
equals
in class AbstractEntity
AbstractEntity.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public long getVersion()
getVersion
in interface DomainObject<Long>
public boolean isNew()
isNew
in interface DomainObject<Long>
true
if transient (not persisted before), otherwise
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |