Class GroupSettingsProvider
java.lang.Object
de.murmelmeister.murmelapi.group.settings.GroupSettingsProvider
- All Implemented Interfaces:
GroupSettings
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateGroup(int groupId, int creatorId, int sortId, String teamId) Creates a new group and checks if the group already exists.private voidcreateTable(String tableName) voiddeleteGroup(int groupId) Deletes a group.booleanexistsGroup(int groupId) Checks if a group exists.getCreatedDate(int groupId) Obtains the created date of a group.longgetCreatedTime(int groupId) Obtains the created time of a group.intgetCreatorId(int groupId) Obtains the creator id of a group.intgetSortId(int groupId) Obtains the sort id of a group.getTeamId(int groupId) Obtains the team id of a group.voidsetSortId(int groupId, int sortId) Sets the sort id of a group.voidSets the team id of a group.
-
Constructor Details
-
GroupSettingsProvider
public GroupSettingsProvider()
-
-
Method Details
-
createTable
-
existsGroup
public boolean existsGroup(int groupId) Description copied from interface:GroupSettingsChecks if a group exists.- Specified by:
existsGroupin interfaceGroupSettings- Parameters:
groupId- The id of the group.- Returns:
- True if the group exists, otherwise false.
-
createGroup
Description copied from interface:GroupSettingsCreates a new group and checks if the group already exists. If the group already exists, the method will return without creating a new group.- Specified by:
createGroupin interfaceGroupSettings- Parameters:
groupId- The id of the group.creatorId- The creator id of the group.sortId- The sort id of the group.teamId- The team id of the group.
-
deleteGroup
public void deleteGroup(int groupId) Description copied from interface:GroupSettingsDeletes a group.- Specified by:
deleteGroupin interfaceGroupSettings- Parameters:
groupId- The id of the group.
-
getCreatorId
public int getCreatorId(int groupId) Description copied from interface:GroupSettingsObtains the creator id of a group.- Specified by:
getCreatorIdin interfaceGroupSettings- Parameters:
groupId- The id of the group.- Returns:
- The creator id of the group.
-
getCreatedTime
public long getCreatedTime(int groupId) Description copied from interface:GroupSettingsObtains the created time of a group.- Specified by:
getCreatedTimein interfaceGroupSettings- Parameters:
groupId- The id of the group.- Returns:
- The created time of the group.
-
getCreatedDate
Description copied from interface:GroupSettingsObtains the created date of a group.- Specified by:
getCreatedDatein interfaceGroupSettings- Parameters:
groupId- The id of the group.- Returns:
- The created date of the group.
-
getSortId
public int getSortId(int groupId) Description copied from interface:GroupSettingsObtains the sort id of a group.- Specified by:
getSortIdin interfaceGroupSettings- Parameters:
groupId- The id of the group.- Returns:
- The sort id of the group.
-
setSortId
public void setSortId(int groupId, int sortId) Description copied from interface:GroupSettingsSets the sort id of a group.- Specified by:
setSortIdin interfaceGroupSettings- Parameters:
groupId- The id of the group.sortId- The sort id of the group.
-
getTeamId
Description copied from interface:GroupSettingsObtains the team id of a group.- Specified by:
getTeamIdin interfaceGroupSettings- Parameters:
groupId- The id of the group.- Returns:
- The team id of the group.
-
setTeamId
Description copied from interface:GroupSettingsSets the team id of a group.- Specified by:
setTeamIdin interfaceGroupSettings- Parameters:
groupId- The id of the group.teamId- The team id of the group.
-