Package org.dspace.eperson.dao.impl
Class Group2GroupCacheDAOImpl
java.lang.Object
org.dspace.core.AbstractHibernateDAO<Group2GroupCache>
org.dspace.eperson.dao.impl.Group2GroupCacheDAOImpl
- All Implemented Interfaces:
GenericDAO<Group2GroupCache>,Group2GroupCacheDAO
public class Group2GroupCacheDAOImpl
extends AbstractHibernateDAO<Group2GroupCache>
implements Group2GroupCacheDAO
Hibernate implementation of the Database Access Object interface class for the Group2GroupCache object.
This class is responsible for all database calls for the Group2GroupCache object and is autowired by Spring.
This class should never be accessed directly.
- Author:
- kevinvandevelde at atmire.com
-
Constructor Summary
Constructors -
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.Methods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, createQuery, delete, executeCriteriaQuery, findAll, findAll, findByID, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResult
-
Constructor Details
-
Group2GroupCacheDAOImpl
protected Group2GroupCacheDAOImpl()
-
-
Method Details
-
getCache
public Set<org.apache.commons.lang3.tuple.Pair<UUID,UUID>> getCache(Context context) throws SQLException Description copied from interface:Group2GroupCacheDAOReturns the current cache table as a set of UUID pairs.- Specified by:
getCachein interfaceGroup2GroupCacheDAO- 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
Description copied from interface:Group2GroupCacheDAOReturns all cache entities that are children of a given parent Group entity.- Specified by:
findByParentin interfaceGroup2GroupCacheDAO- 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
public List<Group2GroupCache> findByChildren(Context context, Iterable<Group> groups) throws SQLException Description copied from interface:Group2GroupCacheDAOReturns all cache entities that are parents of at least one group from a children groups list.- Specified by:
findByChildrenin interfaceGroup2GroupCacheDAO- 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
public Group2GroupCache findByParentAndChild(Context context, Group parent, Group child) throws SQLException Description copied from interface:Group2GroupCacheDAOReturns the cache entity given specific parent and child groups.- Specified by:
findByParentAndChildin interfaceGroup2GroupCacheDAO- 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
Description copied from interface:Group2GroupCacheDAOReturns the cache entity given specific parent and child groups.- Specified by:
findin interfaceGroup2GroupCacheDAO- 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
Description copied from interface:Group2GroupCacheDAOCompletely deletes the current cache table.- Specified by:
deleteAllin interfaceGroup2GroupCacheDAO- Parameters:
context- The relevant DSpace Context.- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
deleteFromCache
Description copied from interface:Group2GroupCacheDAODeletes a specific cache row given parent and child groups UUIDs.- Specified by:
deleteFromCachein interfaceGroup2GroupCacheDAO- 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
Description copied from interface:Group2GroupCacheDAOAdds a single row to the cache table given parent and child groups UUIDs.- Specified by:
addToCachein interfaceGroup2GroupCacheDAO- 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.
-