de.schwarzrot.app.domain
Class User
java.lang.Object
com.jgoodies.binding.beans.Model
de.schwarzrot.data.support.AbstractEntity
de.schwarzrot.app.domain.User
- All Implemented Interfaces:
- com.jgoodies.binding.beans.Observable, Entity, NamedEntity<String>, Serializable, Comparable<Entity>, Principal, org.acegisecurity.userdetails.UserDetails
public class User
- extends AbstractEntity
- implements NamedEntity<String>, org.acegisecurity.userdetails.UserDetails, Principal
Entity
to hold information about a user
- Author:
- Reinhard Mantey
- See Also:
- Serialized Form
Constructor Summary |
User()
|
Methods inherited from class de.schwarzrot.data.support.AbstractEntity |
adoptChildren, adoptChildren, adoptGroupedChildren, compareTo, equals, getCModified, getCode, getDefaultOrder, getDtCreated, getDtModified, getId, getLogger, getPersistenceName, getSchemaName, getSkipList, getSystemClass, getUCreated, getUModified, getUserAttributes, getVariantColumnName, getVariantTypeMap, hashCode, isDirty, isUserType, isVirtual, setCModified, setDirty, setDtCreated, setDtModified, setId, setSchemaName, setUCreated, setUModified, toString, validate |
Methods inherited from class com.jgoodies.binding.beans.Model |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
Methods inherited from interface de.schwarzrot.data.Entity |
getCModified, getDefaultOrder, getDtCreated, getDtModified, getId, getPersistenceName, getSchemaName, getSkipList, getSystemClass, getUCreated, getUModified, getUserAttributes, getVariantColumnName, getVariantTypeMap, isDirty, isUserType, isVirtual, setCModified, setDirty, setDtCreated, setDtModified, setId, setUCreated, setUModified, validate |
Methods inherited from interface com.jgoodies.binding.beans.Observable |
addPropertyChangeListener, removePropertyChangeListener |
User
public User()
getAuthorities
public org.acegisecurity.GrantedAuthority[] getAuthorities()
- Specified by:
getAuthorities
in interface org.acegisecurity.userdetails.UserDetails
getDtExpires
public final Date getDtExpires()
getMappings
public Map<String,String> getMappings()
- Description copied from interface:
Entity
- returns a map with mappings of logical property names to physical
property names (column names in database terms).
Every implementation should respect the parents mappings. The following
sample shows different mapping types:
public Map<String, String> getMappings() {
Map<String, String> mappings = super.getMappings();
mappings.put("title", "name");
mappings.put("streams", Stream.class.getName());
mappings.put("pageDefinitions", "pageType|" + ThemeElement.class.getName());
return mappings;
}
The mappings explained:
- "title" -> "name"
- the logical "title"-attribute is stored to persistence with a
physical name "name"
- "streams" -> Stream.class.getName()
- the "streams" property holds related children. Unknown children are
hold in a
List
, known (named) children are hold in a Map
.
The mapped value is used as classname to create child instances.
- "pageDefinitions" -> "pageType|" + ThemeElement.class.getName()
- pageDefinitions is a property of type
Map
, that holds grouped
children. Known children are hold by a Map
, unknown children by a
List
, so "pageDefinitions" may contain elements of type
Map
, or List
. pageType, a property of
ThemeElement
, is used to group the children. The word before the
'|' is the property name used as key value for grouping and the type
after '|' is used to create instances.
- Specified by:
getMappings
in interface Entity
- Overrides:
getMappings
in class AbstractEntity
- Returns:
- a
Map
with property names as keys and column
names as values.
getName
public String getName()
- Specified by:
getName
in interface NamedEntity<String>
- Specified by:
getName
in interface Principal
getPassword
public String getPassword()
- Specified by:
getPassword
in interface org.acegisecurity.userdetails.UserDetails
getRights
public final Map<String,NamedChildEntity<?,?>> getRights()
getUniqColumnNames
public List<String> getUniqColumnNames()
- Description copied from interface:
Entity
- returns a list of property names, which serve to detect a uniq instance
without the usage of the primary key. In database context this list is
used to decide, whether a save operation needs an update or an insert.
- Specified by:
getUniqColumnNames
in interface Entity
- Overrides:
getUniqColumnNames
in class AbstractEntity
- Returns:
- a list of property names
getUsername
public String getUsername()
- Specified by:
getUsername
in interface org.acegisecurity.userdetails.UserDetails
isAccountNonExpired
public boolean isAccountNonExpired()
- Specified by:
isAccountNonExpired
in interface org.acegisecurity.userdetails.UserDetails
isAccountNonLocked
public boolean isAccountNonLocked()
- Specified by:
isAccountNonLocked
in interface org.acegisecurity.userdetails.UserDetails
isActive
public final boolean isActive()
isCredentialsNonExpired
public boolean isCredentialsNonExpired()
- Specified by:
isCredentialsNonExpired
in interface org.acegisecurity.userdetails.UserDetails
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface org.acegisecurity.userdetails.UserDetails
setActive
public final void setActive(boolean active)
setDtExpires
public final void setDtExpires(Date dtExpires)
setName
public void setName(String notUsed)
- Specified by:
setName
in interface NamedEntity<String>
setPassword
public final void setPassword(String password)
setRights
public final void setRights(Map<String,NamedChildEntity<?,?>> rights)
setUsername
public final void setUsername(String userName)
Submit
a bug or request a feature
SRJRCFrames is published according to the
GNU General Public License
Copyright 2005-2012
Reinhard Mantey - some rights reserved.