Class GroupParentProvider
java.lang.Object
de.murmelmeister.murmelapi.group.parent.GroupParentProvider
- All Implemented Interfaces:
GroupParent
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExpiredTime(int groupId, int parentId, long time) Adds time to the parent expiration.voidaddParent(int groupId, int creatorId, int parentId, long time) Adds a parent to a group.voidclearParent(int groupId) Clears all parents from a group.private voidcreateTable(String tableName) booleanexistsParent(int groupId, int parentId) Checks if a parent exists.getCreatedDate(int groupId, int parentId) Obtains the date the parent was created.longgetCreatedTime(int groupId, int parentId) Obtains the time the parent was created.intgetCreatorId(int groupId, int parentId) Obtains the creator id of a parent.getExpiredDate(int groupId, int parentId) Obtains the date the parent will expire.longgetExpiredTime(int groupId, int parentId) Obtains the time the parent will expire.getParentIds(int groupId) Obtains all parent ids of a group.getParentNames(Group group, int groupId) Obtains all parent names of a group.voidloadExpired(Group group) Loads all expired parents of a group.removeExpiredTime(int groupId, int parentId, long time) Removes time from the parent expiration.voidremoveParent(int groupId, int parentId) Removes a parent from a group.setExpiredTime(int groupId, int parentId, long time) Sets the time the parent will expire.
-
Field Details
-
dateFormat
-
-
Constructor Details
-
GroupParentProvider
public GroupParentProvider()
-
-
Method Details
-
createTable
-
existsParent
public boolean existsParent(int groupId, int parentId) Description copied from interface:GroupParentChecks if a parent exists.- Specified by:
existsParentin interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.- Returns:
- True if the parent exists, otherwise false.
-
addParent
public void addParent(int groupId, int creatorId, int parentId, long time) Description copied from interface:GroupParentAdds a parent to a group.- Specified by:
addParentin interfaceGroupParent- Parameters:
groupId- The id of the group.creatorId- The id of the creator.parentId- The id of the parent.time- The time the parent was added.
-
removeParent
public void removeParent(int groupId, int parentId) Description copied from interface:GroupParentRemoves a parent from a group.- Specified by:
removeParentin interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.
-
clearParent
public void clearParent(int groupId) Description copied from interface:GroupParentClears all parents from a group.- Specified by:
clearParentin interfaceGroupParent- Parameters:
groupId- The id of the group.
-
getParentIds
Description copied from interface:GroupParentObtains all parent ids of a group.- Specified by:
getParentIdsin interfaceGroupParent- Parameters:
groupId- The id of the group.- Returns:
- A list of all parent ids of the group.
-
getParentNames
Description copied from interface:GroupParentObtains all parent names of a group.- Specified by:
getParentNamesin interfaceGroupParent- Parameters:
group- The group.groupId- The id of the group.- Returns:
- A list of all parent names of the group.
-
getCreatorId
public int getCreatorId(int groupId, int parentId) Description copied from interface:GroupParentObtains the creator id of a parent.- Specified by:
getCreatorIdin interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.- Returns:
- The creator id of the parent.
-
getCreatedTime
public long getCreatedTime(int groupId, int parentId) Description copied from interface:GroupParentObtains the time the parent was created.- Specified by:
getCreatedTimein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.- Returns:
- The time the parent was created.
-
getCreatedDate
Description copied from interface:GroupParentObtains the date the parent was created.- Specified by:
getCreatedDatein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.- Returns:
- The date the parent was created.
-
getExpiredTime
public long getExpiredTime(int groupId, int parentId) Description copied from interface:GroupParentObtains the time the parent will expire.- Specified by:
getExpiredTimein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.- Returns:
- The time the parent will expire.
-
getExpiredDate
Description copied from interface:GroupParentObtains the date the parent will expire.- Specified by:
getExpiredDatein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.- Returns:
- The date the parent will expire.
-
setExpiredTime
Description copied from interface:GroupParentSets the time the parent will expire.- Specified by:
setExpiredTimein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.time- The time the parent will expire.- Returns:
- The date the parent will expire.
-
addExpiredTime
Description copied from interface:GroupParentAdds time to the parent expiration.- Specified by:
addExpiredTimein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.time- The time to add to the expiration.- Returns:
- The date the parent will expire.
-
removeExpiredTime
Description copied from interface:GroupParentRemoves time from the parent expiration.- Specified by:
removeExpiredTimein interfaceGroupParent- Parameters:
groupId- The id of the group.parentId- The id of the parent.time- The time to remove from the expiration.- Returns:
- The date the parent will expire.
-
loadExpired
Description copied from interface:GroupParentLoads all expired parents of a group.- Specified by:
loadExpiredin interfaceGroupParent- Parameters:
group- The group.
-