Package io.manebot.database.model
Class UserGroup
- java.lang.Object
-
- io.manebot.database.model.TimedRow
-
- io.manebot.database.model.UserGroup
-
- All Implemented Interfaces:
UserGroupMembership
@Entity public class UserGroup extends TimedRow implements UserGroupMembership
-
-
Method Summary
Modifier and Type Method Description java.util.DategetAddedDate()Gets the date the user was added by the adding user.UsergetAddingUser()Gets the user that added this membership.GroupgetGroup()Gets the user group in this membership.UsergetUser()Gets the user in this relationship.intgetUserGroupId()inthashCode()voidremove()Removes this membership, removing the user from the group in the membership.-
Methods inherited from class io.manebot.database.model.TimedRow
getCreated, getCreatedDate, getUpdated, getUpdatedDate, setCreated, setCreated, setCreatedDate, setUpdated, setUpdated, setUpdatedDate
-
-
-
-
Method Detail
-
getUserGroupId
public int getUserGroupId()
-
getUser
public User getUser()
Description copied from interface:UserGroupMembershipGets the user in this relationship.- Specified by:
getUserin interfaceUserGroupMembership- Returns:
- User instance.
-
getGroup
public Group getGroup()
Description copied from interface:UserGroupMembershipGets the user group in this membership.- Specified by:
getGroupin interfaceUserGroupMembership- Returns:
- UserGroup instance.
-
getAddingUser
public User getAddingUser()
Description copied from interface:UserGroupMembershipGets the user that added this membership.- Specified by:
getAddingUserin interfaceUserGroupMembership- Returns:
- User instance.
-
getAddedDate
public java.util.Date getAddedDate()
Description copied from interface:UserGroupMembershipGets the date the user was added by the adding user.- Specified by:
getAddedDatein interfaceUserGroupMembership- Returns:
- Date instance.
-
remove
public void remove() throws java.lang.SecurityExceptionDescription copied from interface:UserGroupMembershipRemoves this membership, removing the user from the group in the membership.- Specified by:
removein interfaceUserGroupMembership- Throws:
java.lang.SecurityException- if there was a security violation removing the user from the group.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-