Class UserRole
java.lang.Object
ch.autumo.beetroot.Model
ch.autumo.beetroot.handler.usersroles.UserRole
- All Implemented Interfaces:
Entity, Serializable
-
Field Summary
Fields inherited from class Model
ID_INVALID, ID_M2M_PSEUDO, ID_UNASSIGNED, LOGModifier and TypeFieldDescriptionstatic final intInvalid ID; used when an object cannot be read or stored.static final intPseudo ID of an a stored model that is a many-to-many-relation-model-static final intUnassigned id; a model has been created but or loaded from database that has no id.protected static final org.slf4j.LoggerLogger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the created value.Default display field.Get reference entity map (all referenced entities).intReturns the role id value.intReturns the user id value.Class<?> Get model base class, usually overwritten by thePlantgenerator.voidsetCreated(Timestamp created) Sets the created value.voidsetRoleId(int roleId) Sets the role id value.voidsetUserId(int userId) Sets the user id value.Methods inherited from class Model
clone, delete, delete, deserialize, equals, exists, findFirst, findFirst, get, getAssociatedReference, getAssociatedReference, getDisplayValue, getId, getTableName, isNullable, isStored, isUnique, listAll, listReferences, read, save, save, serialize, setId, setStored, toString, update, update, where, where, where, whereModifier and TypeMethodDescriptionclone()voiddelete()Delete this entity bean!voiddelete(Connection conn) Delete this entity bean!deserialize(String json) De-serialize a JSON string to an entity.booleanstatic booleanChecks if the entity exists in the DB.static ModelGet first entity of the given entity bean with specific condition, e.g.static ModelGet first entity of the given entity bean with specific condition, e.g.Get a value from this entity except the id.getAssociatedReference(Class<?> referenceClass) Get associated (parent) entity.getAssociatedReference(String referenceBeanPropertyName) Get associated (parent) entity.Get display value of bean.intgetId()Get the ID.Returns name of corresponding table.booleanisNullable(String beanPropertyName) Is the field specified by the bean property name nullable?booleanisStored()Is this entity bean stored in database?booleanIs the field specified by the bean property name unique?List all entities of the given entity bean.listReferences(Class<?> referenceClass) List referenced entities of the referenced class type.static ModelRead an entity with given ID.save()Save this entity bean to database.save(Connection conn) Save this entity bean to database.Serialize this object to JSON.voidsetId(int id) Set the ID.voidsetStored(boolean isStored) Set stored state.toString()voidupdate()Update this entity bean in database.voidupdate(Connection conn) Update this entity bean in database.List all entities of the given entity bean with specific condition, e.g.List all entities of the given entity bean with specific condition, e.g.List all entities of the given entity bean with specific condition, e.g.List all entities of the given entity bean with specific condition, e.g.
-
Constructor Details
-
UserRole
public UserRole()Default constructor.
-
-
Method Details
-
getUserId
public int getUserId()Returns the user id value.- Returns:
- the user id value
-
setUserId
public void setUserId(int userId) Sets the user id value.- Parameters:
userId- the new user id value
-
getRoleId
public int getRoleId()Returns the role id value.- Returns:
- the role id value
-
setRoleId
public void setRoleId(int roleId) Sets the role id value.- Parameters:
roleId- the new role id value
-
getCreated
-
setCreated
Sets the created value.- Parameters:
created- the new created value
-
getDisplayField
Description copied from class:ModelDefault display field.- Overrides:
getDisplayFieldin classModel- Returns:
- display field
-
getForeignReferences
-
modelClass
Description copied from class:ModelGet model base class, usually overwritten by thePlantgenerator.- Specified by:
modelClassin classModel- Returns:
- model base class
-