Class UserParentProviderImpl
java.lang.Object
de.murmelmeister.murmelapi.user.parent.UserParentProviderImpl
- All Implemented Interfaces:
UserParentProvider
UserParentProvider is a class that provides methods to manage user-parent relationships in the database.
It implements the UserParent interface and uses the Database class to interact with the database.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RefreshTypeprivate final UserParentCacheprivate final de.murmelmeister.library.database.Databaseprivate final RefreshTypeprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionUserParentProviderImpl(de.murmelmeister.library.database.Database database, Long fetchLimit, long cacheCapcity, Duration refreshInterval) -
Method Summary
Modifier and TypeMethodDescriptionadd(int userId, int parentId, long duration, int createdBy) intclear(int userId) voidgetParent(int userId, int parentId) getParents(int userId) intvoidintremove(int userId, int parentId) static voidsetup(de.murmelmeister.library.database.Database database) update(int userId, int parentId, long duration, int changedBy)
-
Field Details
-
TABLE_NAME
- See Also:
-
database
private final de.murmelmeister.library.database.Database database -
cache
-
all
-
single
-
-
Constructor Details
-
UserParentProviderImpl
-
-
Method Details
-
setup
public static void setup(de.murmelmeister.library.database.Database database) -
closeCache
public void closeCache()- Specified by:
closeCachein interfaceUserParentProvider
-
refreshCache
public void refreshCache()- Specified by:
refreshCachein interfaceUserParentProvider
-
getParent
- Specified by:
getParentin interfaceUserParentProvider
-
getParents
- Specified by:
getParentsin interfaceUserParentProvider
-
add
- Specified by:
addin interfaceUserParentProvider
-
remove
public int remove(int userId, int parentId) - Specified by:
removein interfaceUserParentProvider
-
clear
public int clear(int userId) - Specified by:
clearin interfaceUserParentProvider
-
update
- Specified by:
updatein interfaceUserParentProvider
-
loadExpired
public int loadExpired()- Specified by:
loadExpiredin interfaceUserParentProvider
-