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 Modifier Constructor Description protectedGroup2GroupCacheDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToCache(Context context, UUID parent, UUID child)Adds a single row to the cache table given parent and child groups UUIDs.voiddeleteAll(Context context)Completely deletes the current cache table.voiddeleteFromCache(Context context, UUID parent, UUID child)Deletes a specific cache row given parent and child groups UUIDs.Group2GroupCachefind(Context context, Group parent, Group child)Returns the cache entity given specific parent and child groups.List<Group2GroupCache>findByChildren(Context context, Iterable<Group> groups)Returns all cache entities that are parents of at least one group from a children groups list.List<Group2GroupCache>findByParent(Context context, Group group)Returns all cache entities that are children of a given parent Group entity.Group2GroupCachefindByParentAndChild(Context context, Group parent, Group child)Returns the cache entity given specific parent and child groups.Set<org.apache.commons.lang3.tuple.Pair<UUID,UUID>>getCache(Context context)Returns the current cache table as a set of UUID pairs.-
Methods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, delete, executeCriteriaQuery, findAll, findAll, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.core.GenericDAO
create, delete, findAll, findAll, findByID, findByID, findMany, findUnique, save
-
-
-
-
Method Detail
-
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
public List<Group2GroupCache> findByParent(Context context, Group group) throws SQLException
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
public Group2GroupCache find(Context context, Group parent, Group child) throws SQLException
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
public void deleteAll(Context context) throws SQLException
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
public void deleteFromCache(Context context, UUID parent, UUID child) throws SQLException
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
public void addToCache(Context context, UUID parent, UUID child) throws SQLException
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.
-
-