edu.internet2.middleware.grouper.internal.dao
Interface StemDAO

All Superinterfaces:
GrouperDAO
All Known Implementing Classes:
Hib3StemDAO

public interface StemDAO
extends GrouperDAO

Basic Stem DAO interface.

Since:
1.2.0
Version:
$Id: StemDAO.java,v 1.24 2009-11-17 02:52:29 mchyzer Exp $
Author:
blair christensen.

Method Summary
 void createChildAttributeDef(Stem _parent, AttributeDef _child)
           
 void createChildAttributeDefName(Stem _parent, AttributeDefName _child)
           
 void createChildGroup(Stem _parent, Group _child, Member _m, java.util.Map<java.lang.String,java.lang.String> attributes)
           
 void createChildStem(Stem _child)
           
 void createRootStem(Stem _root)
           
 void delete(Stem _ns)
           
 boolean exists(java.lang.String uuid)
           
 java.util.Set<Stem> findAllByApproximateDisplayExtension(java.lang.String val)
           
 java.util.Set<Stem> findAllByApproximateDisplayExtension(java.lang.String val, java.lang.String scope)
           
 java.util.Set<Stem> findAllByApproximateDisplayName(java.lang.String val)
           
 java.util.Set<Stem> findAllByApproximateDisplayName(java.lang.String val, java.lang.String scope)
           
 java.util.Set<Stem> findAllByApproximateExtension(java.lang.String val)
           
 java.util.Set<Stem> findAllByApproximateExtension(java.lang.String val, java.lang.String scope)
           
 java.util.Set<Stem> findAllByApproximateName(java.lang.String val)
           
 java.util.Set<Stem> findAllByApproximateName(java.lang.String val, java.lang.String scope)
           
 java.util.Set<Stem> findAllByApproximateNameAny(java.lang.String name)
           
 java.util.Set<Stem> findAllByApproximateNameAny(java.lang.String name, java.lang.String scope)
           
 java.util.Set<Stem> findAllByCreatedAfter(java.util.Date d)
           
 java.util.Set<Stem> findAllByCreatedAfter(java.util.Date d, java.lang.String scope)
           
 java.util.Set<Stem> findAllByCreatedBefore(java.util.Date d)
           
 java.util.Set<Stem> findAllByCreatedBefore(java.util.Date d, java.lang.String scope)
           
 java.util.Set<Group> findAllChildGroups(Stem ns, Stem.Scope scope)
          Find all child groups within specified scope.
 java.util.Set<Group> findAllChildGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
          Find all child groups within specified scope, and make sure the grouper session can see them
 java.util.Set<Group> findAllChildMembershipGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
          Find all child groups within specified scope, and make sure the grouper session can see them
 java.util.Set<Stem> findAllChildStems(Stem ns, Stem.Scope scope)
          Find all child stems within specified scope.
 java.util.Set<Stem> findAllChildStems(Stem ns, Stem.Scope scope, boolean orderByName)
          Find all child stems within specified scope.
 java.util.Set<Stem> findAllChildStemsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
          Find all child stems within specified scope, and make sure the grouper session can see them
 java.util.Set<Stem> findByCreatorOrModifier(Member member)
          find stems by creator or modifier
 Stem findByName(java.lang.String name)
          Deprecated.  
 Stem findByName(java.lang.String name, boolean exceptionIfNull)
           
 Stem findByName(java.lang.String name, boolean exceptionIfNull, QueryOptions queryOptions)
           
 java.util.Set<Stem> findByNames(java.util.Collection<java.lang.String> names, boolean exceptionOnNotFound)
          find all stems by name
 Stem findByUuid(java.lang.String uuid)
          Deprecated.  
 Stem findByUuid(java.lang.String uuid, boolean exceptionIfNull)
           
 Stem findByUuid(java.lang.String uuid, boolean exceptionIfNull, QueryOptions queryOptions)
           
 Stem findByUuidOrName(java.lang.String uuid, java.lang.String name, boolean exceptionIfNull)
           
 java.util.Set<Stem> findParentsByGroups(java.util.Collection<Group> groups)
          find all parent stems of groups (and grandparents, etc)
 java.util.Set<Stem> getAllStems()
           
 java.util.Set<Stem> getAllStemsSecure(GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
           
 java.util.Set<Stem> getAllStemsSecure(java.lang.String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
           
 java.util.Set<Stem> getAllStemsWithGroupsSecure(GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
          get stems with groups that have privileges
 java.util.Set<Stem> getImmediateChildrenSecure(GrouperSession grouperSession, Stem stem, edu.internet2.middleware.subject.Subject subject, java.util.Set<Privilege> inPrivSet, QueryOptions queryOptions)
          get immediate children (stems) secure
 void renameStemAndChildren(Stem _ns, java.util.Set children)
           
 void saveUpdateProperties(Stem stem)
          save the udpate properties which are auto saved when business method is called
 void update(Stem _ns)
           
 void updateLastMembershipChange(java.lang.String stemId)
           
 void updateLastMembershipChangeIncludeAncestorGroups(java.lang.String groupId)
          This will update last_membership_change for stem owners where group member in groupSet is the given groupId.
 

Method Detail

findByNames

java.util.Set<Stem> findByNames(java.util.Collection<java.lang.String> names,
                                boolean exceptionOnNotFound)
                                throws StemNotFoundException
find all stems by name

Parameters:
names -
exceptionOnNotFound -
Returns:
the stems
Throws:
StemNotFoundException

findParentsByGroups

java.util.Set<Stem> findParentsByGroups(java.util.Collection<Group> groups)
find all parent stems of groups (and grandparents, etc)

Parameters:
groups -
Returns:
the stems

createChildAttributeDef

void createChildAttributeDef(Stem _parent,
                             AttributeDef _child)
                             throws GrouperDAOException
Throws:
GrouperDAOException

createChildAttributeDefName

void createChildAttributeDefName(Stem _parent,
                                 AttributeDefName _child)
                                 throws GrouperDAOException
Throws:
GrouperDAOException

createChildGroup

void createChildGroup(Stem _parent,
                      Group _child,
                      Member _m,
                      java.util.Map<java.lang.String,java.lang.String> attributes)
                      throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

createChildStem

void createChildStem(Stem _child)
                     throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

createRootStem

void createRootStem(Stem _root)
                    throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

delete

void delete(Stem _ns)
            throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

exists

boolean exists(java.lang.String uuid)
               throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByApproximateDisplayExtension

java.util.Set<Stem> findAllByApproximateDisplayExtension(java.lang.String val)
                                                         throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByApproximateDisplayExtension

java.util.Set<Stem> findAllByApproximateDisplayExtension(java.lang.String val,
                                                         java.lang.String scope)
                                                         throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllByApproximateDisplayName

java.util.Set<Stem> findAllByApproximateDisplayName(java.lang.String val)
                                                    throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByApproximateDisplayName

java.util.Set<Stem> findAllByApproximateDisplayName(java.lang.String val,
                                                    java.lang.String scope)
                                                    throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllByApproximateExtension

java.util.Set<Stem> findAllByApproximateExtension(java.lang.String val)
                                                  throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByApproximateExtension

java.util.Set<Stem> findAllByApproximateExtension(java.lang.String val,
                                                  java.lang.String scope)
                                                  throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllByApproximateName

java.util.Set<Stem> findAllByApproximateName(java.lang.String val)
                                             throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByApproximateName

java.util.Set<Stem> findAllByApproximateName(java.lang.String val,
                                             java.lang.String scope)
                                             throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllByApproximateNameAny

java.util.Set<Stem> findAllByApproximateNameAny(java.lang.String name)
                                                throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByApproximateNameAny

java.util.Set<Stem> findAllByApproximateNameAny(java.lang.String name,
                                                java.lang.String scope)
                                                throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllByCreatedAfter

java.util.Set<Stem> findAllByCreatedAfter(java.util.Date d)
                                          throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByCreatedAfter

java.util.Set<Stem> findAllByCreatedAfter(java.util.Date d,
                                          java.lang.String scope)
                                          throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllByCreatedBefore

java.util.Set<Stem> findAllByCreatedBefore(java.util.Date d)
                                           throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findAllByCreatedBefore

java.util.Set<Stem> findAllByCreatedBefore(java.util.Date d,
                                           java.lang.String scope)
                                           throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.4.0

findAllChildGroups

java.util.Set<Group> findAllChildGroups(Stem ns,
                                        Stem.Scope scope)
                                        throws GrouperDAOException
Find all child groups within specified scope.

Throws:
GrouperDAOException
Since:
1.2.1

findAllChildGroupsSecure

java.util.Set<Group> findAllChildGroupsSecure(Stem ns,
                                              Stem.Scope scope,
                                              GrouperSession grouperSession,
                                              edu.internet2.middleware.subject.Subject subject,
                                              java.util.Set<Privilege> inPrivSet,
                                              QueryOptions queryOptions)
                                              throws GrouperDAOException
Find all child groups within specified scope, and make sure the grouper session can see them

Parameters:
ns -
scope -
grouperSession -
subject -
queryOptions -
inPrivSet - is a set of privs that the subject must have one of to display a row. AccessPrivilege has some pre-baked set constants available
Returns:
the groups
Throws:
GrouperDAOException
Since:
1.2.1

findAllChildMembershipGroupsSecure

java.util.Set<Group> findAllChildMembershipGroupsSecure(Stem ns,
                                                        Stem.Scope scope,
                                                        GrouperSession grouperSession,
                                                        edu.internet2.middleware.subject.Subject subject,
                                                        java.util.Set<Privilege> inPrivSet,
                                                        QueryOptions queryOptions)
                                                        throws GrouperDAOException
Find all child groups within specified scope, and make sure the grouper session can see them

Parameters:
ns -
scope -
grouperSession -
subject -
queryOptions -
inPrivSet - is a set of privs that the subject must have one of to display a row. AccessPrivilege has some pre-baked set constants available
Returns:
the groups
Throws:
GrouperDAOException
Since:
1.2.1

findAllChildStemsSecure

java.util.Set<Stem> findAllChildStemsSecure(Stem ns,
                                            Stem.Scope scope,
                                            GrouperSession grouperSession,
                                            edu.internet2.middleware.subject.Subject subject,
                                            java.util.Set<Privilege> inPrivSet,
                                            QueryOptions queryOptions)
                                            throws GrouperDAOException
Find all child stems within specified scope, and make sure the grouper session can see them

Parameters:
ns -
scope -
grouperSession -
subject -
queryOptions -
inPrivSet - is a set of privs that the subject must have one of to display a row. NamingPrivilege has some pre-baked set constants available
Returns:
the groups
Throws:
GrouperDAOException
Since:
1.2.1

findAllChildStems

java.util.Set<Stem> findAllChildStems(Stem ns,
                                      Stem.Scope scope)
                                      throws GrouperDAOException
Find all child stems within specified scope.

Throws:
GrouperDAOException
Since:
1.2.1

findAllChildStems

java.util.Set<Stem> findAllChildStems(Stem ns,
                                      Stem.Scope scope,
                                      boolean orderByName)
                                      throws GrouperDAOException
Find all child stems within specified scope.

Parameters:
ns -
scope -
orderByName -
Returns:
set of stems
Throws:
GrouperDAOException

findByName

@Deprecated
Stem findByName(java.lang.String name)
                throws GrouperDAOException,
                       StemNotFoundException
Deprecated. 

Throws:
GrouperDAOException
StemNotFoundException
Since:
1.2.0

findByUuid

@Deprecated
Stem findByUuid(java.lang.String uuid)
                throws GrouperDAOException,
                       StemNotFoundException
Deprecated. 

Throws:
GrouperDAOException
StemNotFoundException
Since:
1.2.0

findByName

Stem findByName(java.lang.String name,
                boolean exceptionIfNull,
                QueryOptions queryOptions)
                throws GrouperDAOException,
                       StemNotFoundException
Throws:
GrouperDAOException
StemNotFoundException
Since:
1.2.0

findByUuid

Stem findByUuid(java.lang.String uuid,
                boolean exceptionIfNull,
                QueryOptions queryOptions)
                throws GrouperDAOException,
                       StemNotFoundException
Throws:
GrouperDAOException
StemNotFoundException
Since:
1.2.0

findByName

Stem findByName(java.lang.String name,
                boolean exceptionIfNull)
                throws GrouperDAOException,
                       StemNotFoundException
Throws:
GrouperDAOException
StemNotFoundException
Since:
1.2.0

findByUuidOrName

Stem findByUuidOrName(java.lang.String uuid,
                      java.lang.String name,
                      boolean exceptionIfNull)
                      throws GrouperDAOException,
                             StemNotFoundException
Parameters:
uuid -
name -
exceptionIfNull -
Returns:
the stem or null
Throws:
GrouperDAOException
StemNotFoundException
Since:
1.6.0

findByUuid

Stem findByUuid(java.lang.String uuid,
                boolean exceptionIfNull)
                throws GrouperDAOException,
                       StemNotFoundException
Throws:
GrouperDAOException
StemNotFoundException
Since:
1.2.0

getAllStems

java.util.Set<Stem> getAllStems()
                                throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.3.1

renameStemAndChildren

void renameStemAndChildren(Stem _ns,
                           java.util.Set children)
                           throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

update

void update(Stem _ns)
            throws GrouperDAOException
Throws:
GrouperDAOException
Since:
1.2.0

findByCreatorOrModifier

java.util.Set<Stem> findByCreatorOrModifier(Member member)
find stems by creator or modifier

Parameters:
member -
Returns:
the groups

getImmediateChildrenSecure

java.util.Set<Stem> getImmediateChildrenSecure(GrouperSession grouperSession,
                                               Stem stem,
                                               edu.internet2.middleware.subject.Subject subject,
                                               java.util.Set<Privilege> inPrivSet,
                                               QueryOptions queryOptions)
                                               throws GrouperDAOException
get immediate children (stems) secure

Parameters:
grouperSession -
stem -
subject -
queryOptions -
inPrivSet - means that each row must have a matching priv in this set to user or GrouperAll. There are some constants in AccessPrivilege of pre-canned sets
Returns:
the set of groups
Throws:
GrouperDAOException

getAllStemsSecure

java.util.Set<Stem> getAllStemsSecure(GrouperSession grouperSession,
                                      edu.internet2.middleware.subject.Subject subject,
                                      java.util.Set<Privilege> inPrivSet,
                                      QueryOptions queryOptions)
                                      throws GrouperDAOException
Parameters:
grouperSession -
subject -
queryOptions -
inPrivSet - means that each row must have a matching priv in this set to user or GrouperAll. There are some constants in NamingPrivilege of pre-canned sets
Returns:
stems
Throws:
GrouperDAOException

getAllStemsSecure

java.util.Set<Stem> getAllStemsSecure(java.lang.String scope,
                                      GrouperSession grouperSession,
                                      edu.internet2.middleware.subject.Subject subject,
                                      java.util.Set<Privilege> inPrivSet,
                                      QueryOptions queryOptions)
                                      throws GrouperDAOException
Parameters:
scope - is blank for no scope
grouperSession -
subject -
queryOptions -
inPrivSet - means that each row must have a matching priv in this set to user or GrouperAll. There are some constants in NamingPrivilege of pre-canned sets
Returns:
the stems
Throws:
GrouperDAOException

updateLastMembershipChange

void updateLastMembershipChange(java.lang.String stemId)
Parameters:
stemId -

updateLastMembershipChangeIncludeAncestorGroups

void updateLastMembershipChangeIncludeAncestorGroups(java.lang.String groupId)
This will update last_membership_change for stem owners where group member in groupSet is the given groupId.

Parameters:
groupId -

saveUpdateProperties

void saveUpdateProperties(Stem stem)
save the udpate properties which are auto saved when business method is called

Parameters:
stem -

getAllStemsWithGroupsSecure

java.util.Set<Stem> getAllStemsWithGroupsSecure(GrouperSession grouperSession,
                                                edu.internet2.middleware.subject.Subject subject,
                                                java.util.Set<Privilege> inPrivSet,
                                                QueryOptions queryOptions)
                                                throws GrouperDAOException
get stems with groups that have privileges

Parameters:
grouperSession -
subject -
queryOptions -
inPrivSet - means that each row must have a matching priv in this set to user or GrouperAll. There are some constants in AccessPrivilege of pre-canned sets
Returns:
stems
Throws:
GrouperDAOException