Package com.wilfredmorgan.api.models
Class UserRoles
- java.lang.Object
-
- com.wilfredmorgan.api.models.UserRoles
-
- All Implemented Interfaces:
java.io.Serializable
@Entity public class UserRoles extends java.lang.Object implements java.io.SerializableThe entity allowing interaction with the userroles table. The join table between users and roles.Table enforces a unique constraint of the combination of userid and roleid. These two together form the primary key.
When you have a compound primary key, you must implement Serializable for Hibernate When you implement Serializable you must implement equals and hash code
- See Also:
- Serialized Form
-
-
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
-
-
-
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
-
getUser
public User getUser()
The getter for User- Returns:
- the complete user object associated with user role combination
-
setUser
public void setUser(User user)
Setter for user- Parameters:
user- change the user object associated with this user role combination to this one.
-
getRole
public Role getRole()
Getter for role- Returns:
- the complete role object associated with this user role combination
-
setRole
public void setRole(Role role)
Setter for role- Parameters:
role- change role object associated with this user role combination to this one.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-