Class Group2GroupCacheDAOImpl

    • Constructor Detail

      • Group2GroupCacheDAOImpl

        protected Group2GroupCacheDAOImpl()
    • Method Detail

      • getCache

        public Set<org.apache.commons.lang3.tuple.Pair<UUID,​UUID>> getCache​(Context context)
                                                                           throws SQLException
        Description copied from interface: Group2GroupCacheDAO
        Returns the current cache table as a set of UUID pairs.
        Specified by:
        getCache in interface Group2GroupCacheDAO
        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: Group2GroupCacheDAO
        Returns all cache entities that are children of a given parent Group entity.
        Specified by:
        findByParent in interface Group2GroupCacheDAO
        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: Group2GroupCacheDAO
        Returns all cache entities that are parents of at least one group from a children groups list.
        Specified by:
        findByChildren in interface Group2GroupCacheDAO
        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.
      • find

        public Group2GroupCache find​(Context context,
                                     Group parent,
                                     Group child)
                              throws SQLException
        Description copied from interface: Group2GroupCacheDAO
        Returns the cache entity given specific parent and child groups.
        Specified by:
        find in interface Group2GroupCacheDAO
        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: Group2GroupCacheDAO
        Completely deletes the current cache table.
        Specified by:
        deleteAll in interface Group2GroupCacheDAO
        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: Group2GroupCacheDAO
        Deletes a specific cache row given parent and child groups UUIDs.
        Specified by:
        deleteFromCache in interface Group2GroupCacheDAO
        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: Group2GroupCacheDAO
        Adds a single row to the cache table given parent and child groups UUIDs.
        Specified by:
        addToCache in interface Group2GroupCacheDAO
        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.