Package de.murmelmeister.murmelapi.group
Class GroupProviderImpl
java.lang.Object
de.murmelmeister.murmelapi.group.GroupProviderImpl
- All Implemented Interfaces:
GroupProvider
GroupProvider is a class that provides methods to manage groups in the database.
It implements the Group interface and uses the Database class to interact with the database.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RefreshTypeprivate final GroupCacheprivate final de.murmelmeister.library.database.Databaseprivate final RefreshTypeprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionGroupProviderImpl(de.murmelmeister.library.database.Database database, Long fetchLimit, long cacheCapcity, Duration refreshInterval) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidcreateDefaultGroup(de.murmelmeister.library.database.Database database) intdelete(int groupId) findAll()findById(int id) findByName(String groupName) voidstatic voidsetup(de.murmelmeister.library.database.Database database)
-
Field Details
-
TABLE_NAME
- See Also:
-
database
private final de.murmelmeister.library.database.Database database -
cache
-
all
-
single
-
-
Constructor Details
-
GroupProviderImpl
-
-
Method Details
-
setup
public static void setup(de.murmelmeister.library.database.Database database) -
createDefaultGroup
public static void createDefaultGroup(de.murmelmeister.library.database.Database database) -
closeCache
public void closeCache()- Specified by:
closeCachein interfaceGroupProvider
-
refreshCache
public void refreshCache()- Specified by:
refreshCachein interfaceGroupProvider
-
findById
- Specified by:
findByIdin interfaceGroupProvider
-
findByName
- Specified by:
findByNamein interfaceGroupProvider
-
findAll
- Specified by:
findAllin interfaceGroupProvider
-
findAllGroupNames
- Specified by:
findAllGroupNamesin interfaceGroupProvider
-
create
- Specified by:
createin interfaceGroupProvider
-
delete
public int delete(int groupId) - Specified by:
deletein interfaceGroupProvider
-
update
- Specified by:
updatein interfaceGroupProvider
-