Package org.dspace.eperson.dao
Interface Group2GroupCacheDAO
- All Superinterfaces:
GenericDAO<Group2GroupCache>
- All Known Implementing Classes:
Group2GroupCacheDAOImpl
Database Access Object interface class for the Group2GroupCache object.
The implementation of this class is responsible for all database calls for the Group2GroupCache object and is
autowired by spring
This class should only be accessed from a single service and should never be exposed outside of the API
- Author:
- kevinvandevelde at atmire.com
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCache(Context context, UUID parent, UUID child) Adds a single row to the cache table given parent and child groups UUIDs.voidCompletely deletes the current cache table.voiddeleteFromCache(Context context, UUID parent, UUID child) Deletes a specific cache row given parent and child groups UUIDs.Returns the cache entity given specific parent and child groups.findByChildren(Context context, Iterable<Group> groups) Returns all cache entities that are parents of at least one group from a children groups list.findByParent(Context context, Group group) Returns all cache entities that are children of a given parent Group entity.findByParentAndChild(Context context, Group parent, Group child) Returns the cache entity given specific parent and child groups.Returns the current cache table as a set of UUID pairs.
-
Method Details
-
getCache
Returns the current cache table as a set of UUID pairs.- Parameters:
context- The relevant DSpace Context.- Returns:
- Set of UUID pairs, where the first element is the parent UUID and the second one is the child UUID.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
findByParent
Returns all cache entities that are children of a given parent Group entity.- Parameters:
context- The relevant DSpace Context.group- Parent group to perform the search.- Returns:
- List of cached groups that are children of the parent group.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
findByChildren
Returns all cache entities that are parents of at least one group from a children groups list.- Parameters:
context- The relevant DSpace Context.groups- Children groups to perform the search.- Returns:
- List of cached groups that are parents of at least one group from the children groups list.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
findByParentAndChild
Group2GroupCache findByParentAndChild(Context context, Group parent, Group child) throws SQLException Returns the cache entity given specific parent and child groups.- Parameters:
context- The relevant DSpace Context.parent- Parent group.child- Child gruoup.- Returns:
- Cached group.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
find
Returns the cache entity given specific parent and child groups.- Parameters:
context- The relevant DSpace Context.parent- Parent group.child- Child gruoup.- Returns:
- Cached group.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
deleteAll
Completely deletes the current cache table.- Parameters:
context- The relevant DSpace Context.- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
deleteFromCache
Deletes a specific cache row given parent and child groups UUIDs.- Parameters:
context- The relevant DSpace Context.parent- Parent group UUID.child- Child group UUID.- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
addToCache
Adds a single row to the cache table given parent and child groups UUIDs.- Parameters:
context- The relevant DSpace Context.parent- Parent group UUID.child- Child group UUID.- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-