Interface Group2GroupCacheDAO

All Superinterfaces:
GenericDAO<Group2GroupCache>
All Known Implementing Classes:
Group2GroupCacheDAOImpl

public interface Group2GroupCacheDAO extends GenericDAO<Group2GroupCache>
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 Details

    • getCache

      Set<org.apache.commons.lang3.tuple.Pair<UUID,UUID>> getCache(Context context) throws SQLException
      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

      List<Group2GroupCache> findByParent(Context context, Group group) throws SQLException
      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

      List<Group2GroupCache> findByChildren(Context context, Iterable<Group> groups) throws SQLException
      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

      Group2GroupCache find(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.
    • deleteAll

      void deleteAll(Context context) throws SQLException
      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

      void deleteFromCache(Context context, UUID parent, UUID child) throws SQLException
      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

      void addToCache(Context context, UUID parent, UUID child) throws SQLException
      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.