Package com.wilfredmorgan.api.models
Class Role
- java.lang.Object
-
- com.wilfredmorgan.api.models.Role
-
@Entity public class Role extends java.lang.ObjectThe entity allowing interaction with the roles table.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcreatedbyString field containing the username of who created this rowprotected java.util.DatecreateddateDate field containing the date and time when the row was createdprotected java.lang.StringlastmodifiedbyString field containing the username of who last modified this rowprotected java.util.DatelastmodifieddateDate field containing the data and time when the row was last modified
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Getter for role namelonggetRoleid()Getter for role idjava.util.Set<UserRoles>getUsers()Getter for user role combinationsvoidsetName(java.lang.String name)Setter for role namevoidsetRoleid(long roleid)Setter for role id, used for seeding datavoidsetUsers(java.util.Set<UserRoles> users)Setter for user role combinations
-
-
-
Field Detail
-
createdby
protected java.lang.String createdby
String field containing the username of who created this row
-
createddate
protected java.util.Date createddate
Date field containing the date and time when the row was createdTemporal(TIMESTAMP) - Sets the precision of the date being saved. In this case Date and Time
-
lastmodifiedby
protected java.lang.String lastmodifiedby
String field containing the username of who last modified this row
-
lastmodifieddate
protected java.util.Date lastmodifieddate
Date field containing the data and time when the row was last modifiedTemporal(TIMESTAMP) - Sets the precision of the date being saved. In this case Date and Time
-
-
Method Detail
-
getRoleid
public long getRoleid()
Getter for role id- Returns:
- the role id, primary key, (long) of this role
-
setRoleid
public void setRoleid(long roleid)
Setter for role id, used for seeding data- Parameters:
roleid- the new role id, primary key, (long) for this role
-
getName
public java.lang.String getName()
Getter for role name- Returns:
- role name (String) in uppercase
-
setName
public void setName(java.lang.String name)
Setter for role name- Parameters:
name- the new role name (String) for this role, in uppercase
-
getUsers
public java.util.Set<UserRoles> getUsers()
Getter for user role combinations- Returns:
- A list of user role combinations associated with this role
-
setUsers
public void setUsers(java.util.Set<UserRoles> users)
Setter for user role combinations- Parameters:
users- Change the list of user role combinations associated with this role to this one
-
-