Class User
java.lang.Object
ch.autumo.beetroot.Model
ch.autumo.beetroot.handler.users.User
- 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.getEmail()Returns the email value.Returns the firstname value.getLang()Returns the lang value.Returns the lastname value.Returns the lasttoken value.Returns the modified value.Returns the password value.getPhone()Returns the phone value.getRole()Returns the role value.Returns the secretkey value.booleangetTwoFa()Returns the two fa value.Returns the username value.Class<?> Get model base class, usually overwritten by thePlantgenerator.voidsetCreated(Timestamp created) Sets the created value.voidSets the email value.voidsetFirstname(String firstname) Sets the firstname value.voidSets the lang value.voidsetLastname(String lastname) Sets the lastname value.voidsetLasttoken(String lasttoken) Sets the lasttoken value.voidsetModified(Timestamp modified) Sets the modified value.voidsetPassword(String password) Sets the password value.voidSets the phone value.voidSets the role value.voidsetSecretkey(String secretkey) Sets the secretkey value.voidsetTwoFa(boolean twoFa) Sets the two fa value.voidsetUsername(String username) Sets the username value.Methods inherited from class Model
clone, delete, delete, deserialize, equals, exists, findFirst, findFirst, get, getAssociatedReference, getAssociatedReference, getDisplayValue, getForeignReferences, 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.Get reference entity map (all referenced entities).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
-
User
public User()Default constructor.
-
-
Method Details
-
getFirstname
-
setFirstname
Sets the firstname value.- Parameters:
firstname- the new firstname value
-
getPassword
-
setPassword
Sets the password value.- Parameters:
password- the new password value
-
getRole
-
setRole
-
getLasttoken
-
setLasttoken
Sets the lasttoken value.- Parameters:
lasttoken- the new lasttoken value
-
getCreated
-
setCreated
Sets the created value.- Parameters:
created- the new created value
-
getModified
-
setModified
Sets the modified value.- Parameters:
modified- the new modified value
-
getLang
-
setLang
-
getEmail
-
setEmail
-
getPhone
-
setPhone
-
getUsername
-
setUsername
Sets the username value.- Parameters:
username- the new username value
-
getLastname
-
setLastname
Sets the lastname value.- Parameters:
lastname- the new lastname value
-
getSecretkey
-
setSecretkey
Sets the secretkey value.- Parameters:
secretkey- the new secretkey value
-
getTwoFa
public boolean getTwoFa()Returns the two fa value.- Returns:
- the two fa value
-
setTwoFa
public void setTwoFa(boolean twoFa) Sets the two fa value.- Parameters:
twoFa- the new two fa value
-
getDisplayField
Description copied from class:ModelDefault display field.- Overrides:
getDisplayFieldin classModel- Returns:
- display field
-
modelClass
Description copied from class:ModelGet model base class, usually overwritten by thePlantgenerator.- Specified by:
modelClassin classModel- Returns:
- model base class
-