Package com.wilfredmorgan.api.models
Class UserRolesId
- java.lang.Object
-
- com.wilfredmorgan.api.models.UserRolesId
-
- All Implemented Interfaces:
java.io.Serializable
@Embeddable public class UserRolesId extends java.lang.Object implements java.io.SerializableClass to represent the complex primary key for UserRoles- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserRolesId()Default constructor required by JPA
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)longgetRole()Getter for the role idlonggetUser()Getter for the user idinthashCode()voidsetRole(long role)The setter for the role idvoidsetUser(long user)Setter for the user id
-
-
-
Method Detail
-
getUser
public long getUser()
Getter for the user id- Returns:
- long the user id
-
setUser
public void setUser(long user)
Setter for the user id- Parameters:
user- the new user id for this object
-
getRole
public long getRole()
Getter for the role id- Returns:
- long the role id
-
setRole
public void setRole(long role)
The setter for the role id- Parameters:
role- the new role id for this object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-