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.Date
getAddedDate()
Gets the date the user was added by the adding user.User
getAddingUser()
Gets the user that added this membership.Group
getGroup()
Gets the user group in this membership.User
getUser()
Gets the user in this relationship.int
getUserGroupId()
int
hashCode()
void
remove()
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:UserGroupMembership
Gets the user in this relationship.- Specified by:
getUser
in interfaceUserGroupMembership
- Returns:
- User instance.
-
getGroup
public Group getGroup()
Description copied from interface:UserGroupMembership
Gets the user group in this membership.- Specified by:
getGroup
in interfaceUserGroupMembership
- Returns:
- UserGroup instance.
-
getAddingUser
public User getAddingUser()
Description copied from interface:UserGroupMembership
Gets the user that added this membership.- Specified by:
getAddingUser
in interfaceUserGroupMembership
- Returns:
- User instance.
-
getAddedDate
public java.util.Date getAddedDate()
Description copied from interface:UserGroupMembership
Gets the date the user was added by the adding user.- Specified by:
getAddedDate
in interfaceUserGroupMembership
- Returns:
- Date instance.
-
remove
public void remove() throws java.lang.SecurityException
Description copied from interface:UserGroupMembership
Removes this membership, removing the user from the group in the membership.- Specified by:
remove
in interfaceUserGroupMembership
- Throws:
java.lang.SecurityException
- if there was a security violation removing the user from the group.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-