edu.internet2.middleware.grouper.internal.dao.hib3
Class Hib3StemDAO

java.lang.Object
  extended by edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
      extended by edu.internet2.middleware.grouper.internal.dao.hib3.Hib3StemDAO
All Implemented Interfaces:
GrouperDAO, StemDAO

public class Hib3StemDAO
extends Hib3DAO
implements StemDAO

Basic Hibernate Stem DAO interface.

Since:
@HEAD@
Version:
$Id: Hib3StemDAO.java,v 1.38 2009-11-17 02:52:29 mchyzer Exp $
Author:
blair christensen.

Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
hibernateInitted
 
Constructor Summary
Hib3StemDAO()
           
 
Method Summary
 void createChildAttributeDef(Stem _stem, AttributeDef attributeDef)
           
 void createChildAttributeDefName(Stem _parent, AttributeDefName attributeDefName)
           
 void createChildGroup(Stem _stem, Group _group, Member _member)
           
 void createChildStem(Stem _child)
           
 void createRootStem(Stem _root)
           
 void createStemSetsForStem(String stemId, String parentStemId)
           
 void delete(Stem _ns)
           
 boolean exists(String uuid)
           
 Set<Stem> findAllByApproximateDisplayExtension(String val)
           
 Set<Stem> findAllByApproximateDisplayExtension(String val, String scope)
           
 Set<Stem> findAllByApproximateDisplayName(String val)
           
 Set<Stem> findAllByApproximateDisplayName(String val, String scope)
           
 Set<Stem> findAllByApproximateExtension(String val)
           
 Set<Stem> findAllByApproximateExtension(String val, String scope)
           
 Set<Stem> findAllByApproximateName(String val)
           
 Set<Stem> findAllByApproximateName(String val, String scope)
           
 Set<Stem> findAllByApproximateNameAny(String name)
           
 Set<Stem> findAllByApproximateNameAny(String name, String scope)
           
 Set<Stem> findAllByApproximateNameAny(String name, String scope, QueryOptions queryOptions)
           
 Set<Stem> findAllByCreatedAfter(Date d)
           
 Set<Stem> findAllByCreatedAfter(Date d, String scope)
           
 Set<Stem> findAllByCreatedBefore(Date d)
           
 Set<Stem> findAllByCreatedBefore(Date d, String scope)
           
 Set<Group> findAllChildGroups(Stem ns, Stem.Scope scope)
          Find all child groups within specified scope.
 Set<Group> findAllChildGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
          Find all child groups within specified scope, and make sure the grouper session can see them
 Set<Group> findAllChildGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, Set<TypeOfGroup> typeOfGroups)
          Find all child groups within specified scope, and make sure the grouper session can see them
 Set<Group> findAllChildMembershipGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
          Find all child groups within specified scope, and make sure the grouper session can see them
 Set<Stem> findAllChildStems(Stem ns, Stem.Scope scope)
          Find all child stems within specified scope.
 Set<Stem> findAllChildStems(Stem ns, Stem.Scope scope, boolean orderByName)
          Find all child stems within specified scope.
 Set<Stem> findAllChildStems(Stem ns, Stem.Scope scope, QueryOptions queryOptions)
          Find all child stems within specified scope.
 Set<Stem> findAllChildStems(Stem ns, Stem.Scope scope, QueryOptions queryOptions, boolean checkSecurity)
          Find all child stems within specified scope.
 Set<Stem> findAllChildStemsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
          Find all child stems within specified scope, and make sure the grouper session can see them
 Stem findByAlternateName(String name, boolean exceptionIfNull, QueryOptions queryOptions)
          Find a stem by its alternate name only.
 Set<Stem> findByCreatorOrModifier(Member member)
          find stems by creator or modifier
 Stem findByCurrentName(String name, boolean exceptionIfNull, QueryOptions queryOptions)
          Find a stem by its current name only.
 Stem findByIdIndex(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions)
          not a secure method, find by id index
 Stem findByName(String name)
          Deprecated.  
 Stem findByName(String name, boolean exceptionIfNull)
           
 Stem findByName(String name, boolean exceptionIfNull, QueryOptions queryOptions)
           
 Set<Stem> findByNames(Collection<String> names, boolean exceptionOnNotFound)
          find all stems by name
 Stem findByUuid(String uuid)
          Deprecated.  
 Stem findByUuid(String uuid, boolean exceptionIfNull)
           
 Stem findByUuid(String uuid, boolean exceptionIfNull, QueryOptions queryOptions)
           
 Stem findByUuidOrName(String uuid, String name, boolean exceptionIfNull)
           
 Stem findByUuidOrName(String uuid, String name, boolean exceptionIfNull, QueryOptions queryOptions)
           
 Set<Stem> findByUuids(Collection<String> uuids, QueryOptions queryOptions)
          note, dont pass more than 100 ids
 Set<Stem> findParentsByGroups(Collection<Group> groups)
          find all parent stems by group
 Set<Stem> findStemsInStemWithoutPrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, edu.internet2.middleware.subject.Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString)
          see which stems do not have this privilege
 Set<Stem> getAllStems()
           
 Set<Stem> getAllStemsSecure(GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
           
 Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
           
 Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> totalStemIds)
           
 Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> totalStemIds, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef)
           
 Set<Stem> getAllStemsSplitScopeSecure(String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> privileges, QueryOptions queryOptions)
          get all stems secure, split the scope by whitespace
 Set<Stem> getAllStemsWithGroupsSecure(GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
          get stems with groups that have privileges
 Set<Stem> getImmediateChildrenSecure(GrouperSession grouperSession, Stem stem, edu.internet2.middleware.subject.Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions)
          get immediate children (stems) secure
 void moveStemSets(List<StemSet> ifHasStemSetsOfParentStem, List<StemSet> oldStemSets, String currentStemId, int depthOfFirstParent)
           
 void renameStemAndChildren(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(String stemId)
           
 void updateLastMembershipChangeIncludeAncestorGroups(String groupId)
          This will update last_membership_change for stem owners where group member in groupSet is the given groupId.
 
Methods inherited from class edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
evict, evictEntity, evictQueries, getConfiguration, getSessionFactory, initHibernateIfNotInitted, resourceNameFromClassName, session
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hib3StemDAO

public Hib3StemDAO()
Method Detail

createChildGroup

public void createChildGroup(Stem _stem,
                             Group _group,
                             Member _member)
                      throws GrouperDAOException
Specified by:
createChildGroup in interface StemDAO
Parameters:
_stem -
_group -
_member -
Throws:
GrouperDAOException
Since:

createChildAttributeDef

public void createChildAttributeDef(Stem _stem,
                                    AttributeDef attributeDef)
                             throws GrouperDAOException
Specified by:
createChildAttributeDef in interface StemDAO
Parameters:
_stem -
attributeDef -
Throws:
GrouperDAOException
Since:

createChildStem

public void createChildStem(Stem _child)
                     throws GrouperDAOException
Specified by:
createChildStem in interface StemDAO
Parameters:
_child -
Throws:
GrouperDAOException
Since:
@HEAD@

createRootStem

public void createRootStem(Stem _root)
                    throws GrouperDAOException
Specified by:
createRootStem in interface StemDAO
Parameters:
_root -
Throws:
GrouperDAOException
Since:
@HEAD@

createStemSetsForStem

public void createStemSetsForStem(String stemId,
                                  String parentStemId)
Parameters:
stemId -
parentStemId -

moveStemSets

public void moveStemSets(List<StemSet> ifHasStemSetsOfParentStem,
                         List<StemSet> oldStemSets,
                         String currentStemId,
                         int depthOfFirstParent)
Specified by:
moveStemSets in interface StemDAO
See Also:
StemDAO.moveStemSets(java.util.List, java.util.List, java.lang.String, int)

delete

public void delete(Stem _ns)
            throws GrouperDAOException
Specified by:
delete in interface StemDAO
Parameters:
_ns -
Throws:
GrouperDAOException
Since:
@HEAD@

exists

public boolean exists(String uuid)
               throws GrouperDAOException
Specified by:
exists in interface StemDAO
Parameters:
uuid -
Returns:
if exists
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateDisplayExtension

public Set<Stem> findAllByApproximateDisplayExtension(String val)
                                               throws GrouperDAOException
Specified by:
findAllByApproximateDisplayExtension in interface StemDAO
Parameters:
val -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateDisplayExtension

public Set<Stem> findAllByApproximateDisplayExtension(String val,
                                                      String scope)
                                               throws GrouperDAOException
Specified by:
findAllByApproximateDisplayExtension in interface StemDAO
Parameters:
val -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateDisplayName

public Set<Stem> findAllByApproximateDisplayName(String val)
                                          throws GrouperDAOException
Specified by:
findAllByApproximateDisplayName in interface StemDAO
Parameters:
val -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateDisplayName

public Set<Stem> findAllByApproximateDisplayName(String val,
                                                 String scope)
                                          throws GrouperDAOException
Specified by:
findAllByApproximateDisplayName in interface StemDAO
Parameters:
val -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateExtension

public Set<Stem> findAllByApproximateExtension(String val)
                                        throws GrouperDAOException
Specified by:
findAllByApproximateExtension in interface StemDAO
Parameters:
val -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateExtension

public Set<Stem> findAllByApproximateExtension(String val,
                                               String scope)
                                        throws GrouperDAOException
Specified by:
findAllByApproximateExtension in interface StemDAO
Parameters:
val -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateName

public Set<Stem> findAllByApproximateName(String val)
                                   throws GrouperDAOException
Specified by:
findAllByApproximateName in interface StemDAO
Parameters:
val -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateName

public Set<Stem> findAllByApproximateName(String val,
                                          String scope)
                                   throws GrouperDAOException
Specified by:
findAllByApproximateName in interface StemDAO
Parameters:
val -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateNameAny

public Set<Stem> findAllByApproximateNameAny(String name)
                                      throws GrouperDAOException
Specified by:
findAllByApproximateNameAny in interface StemDAO
Parameters:
name -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateNameAny

public Set<Stem> findAllByApproximateNameAny(String name,
                                             String scope)
Specified by:
findAllByApproximateNameAny in interface StemDAO
Parameters:
name -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByApproximateNameAny

public Set<Stem> findAllByApproximateNameAny(String name,
                                             String scope,
                                             QueryOptions queryOptions)
                                      throws GrouperDAOException
Specified by:
findAllByApproximateNameAny in interface StemDAO
Parameters:
name -
scope -
queryOptions -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByCreatedAfter

public Set<Stem> findAllByCreatedAfter(Date d)
                                throws GrouperDAOException
Specified by:
findAllByCreatedAfter in interface StemDAO
Parameters:
d -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByCreatedAfter

public Set<Stem> findAllByCreatedAfter(Date d,
                                       String scope)
                                throws GrouperDAOException
Specified by:
findAllByCreatedAfter in interface StemDAO
Parameters:
d -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByCreatedBefore

public Set<Stem> findAllByCreatedBefore(Date d)
                                 throws GrouperDAOException
Specified by:
findAllByCreatedBefore in interface StemDAO
Parameters:
d -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllByCreatedBefore

public Set<Stem> findAllByCreatedBefore(Date d,
                                        String scope)
                                 throws GrouperDAOException
Specified by:
findAllByCreatedBefore in interface StemDAO
Parameters:
d -
scope -
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

findAllChildGroups

public Set<Group> findAllChildGroups(Stem ns,
                                     Stem.Scope scope)
                              throws GrouperDAOException
Description copied from interface: StemDAO
Find all child groups within specified scope.

Specified by:
findAllChildGroups in interface StemDAO
Throws:
GrouperDAOException
Since:
@HEAD@
See Also:
StemDAO.findAllChildGroups(Stem, Stem.Scope)

findAllChildStems

public Set<Stem> findAllChildStems(Stem ns,
                                   Stem.Scope scope)
                            throws GrouperDAOException,
                                   IllegalStateException
Description copied from interface: StemDAO
Find all child stems within specified scope.

Specified by:
findAllChildStems in interface StemDAO
Throws:
IllegalStateException - if unknown scope.
GrouperDAOException
Since:
@HEAD@
See Also:
StemDAO.findAllChildStems(Stem, Stem.Scope)

findAllChildStems

public Set<Stem> findAllChildStems(Stem ns,
                                   Stem.Scope scope,
                                   boolean orderByName)
Description copied from interface: StemDAO
Find all child stems within specified scope.

Specified by:
findAllChildStems in interface StemDAO
Parameters:
ns -
scope -
orderByName -
Returns:
set stem
Throws:
GrouperDAOException
IllegalStateException - if unknown scope.
Since:
@HEAD@
See Also:
StemDAO.findAllChildStems(Stem, Stem.Scope)

findAllChildStems

public Set<Stem> findAllChildStems(Stem ns,
                                   Stem.Scope scope,
                                   QueryOptions queryOptions)
                            throws GrouperDAOException,
                                   IllegalStateException
Description copied from interface: StemDAO
Find all child stems within specified scope.

Specified by:
findAllChildStems in interface StemDAO
Parameters:
ns -
scope -
queryOptions -
Returns:
set stem
Throws:
GrouperDAOException
IllegalStateException - if unknown scope.
Since:
@HEAD@
See Also:
StemDAO.findAllChildStems(Stem, Stem.Scope)

findAllChildStems

public Set<Stem> findAllChildStems(Stem ns,
                                   Stem.Scope scope,
                                   QueryOptions queryOptions,
                                   boolean checkSecurity)
                            throws GrouperDAOException,
                                   IllegalStateException
Description copied from interface: StemDAO
Find all child stems within specified scope.

Specified by:
findAllChildStems in interface StemDAO
Parameters:
ns -
scope -
queryOptions -
checkSecurity -
Returns:
set stem
Throws:
GrouperDAOException
IllegalStateException - if unknown scope.
Since:
@HEAD@
See Also:
StemDAO.findAllChildStems(Stem, Stem.Scope)

findByName

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

Specified by:
findByName in interface StemDAO
Parameters:
name -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByName

public Stem findByName(String name,
                       boolean exceptionIfNull)
                throws GrouperDAOException,
                       StemNotFoundException
Specified by:
findByName in interface StemDAO
Parameters:
name -
exceptionIfNull -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByUuid

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

Specified by:
findByUuid in interface StemDAO
Parameters:
uuid -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByUuid

public Stem findByUuid(String uuid,
                       boolean exceptionIfNull)
                throws GrouperDAOException,
                       StemNotFoundException
Specified by:
findByUuid in interface StemDAO
Parameters:
uuid -
exceptionIfNull -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

getAllStems

public Set<Stem> getAllStems()
                      throws GrouperDAOException
Specified by:
getAllStems in interface StemDAO
Returns:
set stems
Throws:
GrouperDAOException
Since:
@HEAD@

renameStemAndChildren

public void renameStemAndChildren(Set children)
                           throws GrouperDAOException
Specified by:
renameStemAndChildren in interface StemDAO
Parameters:
children -
Throws:
GrouperDAOException
Since:
@HEAD@

update

public void update(Stem _ns)
            throws GrouperDAOException
Specified by:
update in interface StemDAO
Parameters:
_ns -
Throws:
GrouperDAOException
Since:
@HEAD@

findByCreatorOrModifier

public Set<Stem> findByCreatorOrModifier(Member member)
find stems by creator or modifier

Specified by:
findByCreatorOrModifier in interface StemDAO
Parameters:
member -
Returns:
the stems

findAllChildGroupsSecure

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

Specified by:
findAllChildGroupsSecure in interface StemDAO
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
See Also:
StemDAO.findAllChildGroupsSecure(edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

findAllChildGroupsSecure

public Set<Group> findAllChildGroupsSecure(Stem ns,
                                           Stem.Scope scope,
                                           GrouperSession grouperSession,
                                           edu.internet2.middleware.subject.Subject subject,
                                           Set<Privilege> inPrivSet,
                                           QueryOptions queryOptions,
                                           Set<TypeOfGroup> typeOfGroups)
                                    throws GrouperDAOException
Description copied from interface: StemDAO
Find all child groups within specified scope, and make sure the grouper session can see them

Specified by:
findAllChildGroupsSecure in interface StemDAO
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
typeOfGroups - type of groups to return or null for all
Returns:
the groups
Throws:
GrouperDAOException
See Also:
StemDAO.findAllChildGroupsSecure(edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions, Set)

findAllChildMembershipGroupsSecure

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

Specified by:
findAllChildMembershipGroupsSecure in interface StemDAO
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
See Also:
StemDAO.findAllChildMembershipGroupsSecure(edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

findAllChildStemsSecure

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

Specified by:
findAllChildStemsSecure in interface StemDAO
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
See Also:
StemDAO.findAllChildStemsSecure(edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

getImmediateChildrenSecure

public Set<Stem> getImmediateChildrenSecure(GrouperSession grouperSession,
                                            Stem stem,
                                            edu.internet2.middleware.subject.Subject subject,
                                            Set<Privilege> inPrivSet,
                                            QueryOptions queryOptions)
                                     throws GrouperDAOException
Description copied from interface: StemDAO
get immediate children (stems) secure

Specified by:
getImmediateChildrenSecure in interface StemDAO
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
See Also:
StemDAO.getImmediateChildrenSecure(edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

getAllStemsSecure

public Set<Stem> getAllStemsSecure(GrouperSession grouperSession,
                                   edu.internet2.middleware.subject.Subject subject,
                                   Set<Privilege> inPrivSet,
                                   QueryOptions queryOptions)
                            throws GrouperDAOException
Specified by:
getAllStemsSecure in interface StemDAO
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
See Also:
StemDAO.getAllStemsSecure(edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

getAllStemsSecure

public Set<Stem> getAllStemsSecure(String scope,
                                   GrouperSession grouperSession,
                                   edu.internet2.middleware.subject.Subject subject,
                                   Set<Privilege> inPrivSet,
                                   QueryOptions queryOptions)
                            throws GrouperDAOException
Specified by:
getAllStemsSecure in interface StemDAO
Parameters:
scope - is blank for no scope
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
See Also:
StemDAO.getAllStemsSecure(java.lang.String, edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

createChildAttributeDefName

public void createChildAttributeDefName(Stem _parent,
                                        AttributeDefName attributeDefName)
                                 throws GrouperDAOException
Specified by:
createChildAttributeDefName in interface StemDAO
Parameters:
_parent -
attributeDefName -
Throws:
GrouperDAOException

updateLastMembershipChange

public void updateLastMembershipChange(String stemId)
Specified by:
updateLastMembershipChange in interface StemDAO
See Also:
StemDAO.updateLastMembershipChange(java.lang.String)

updateLastMembershipChangeIncludeAncestorGroups

public void updateLastMembershipChangeIncludeAncestorGroups(String groupId)
Description copied from interface: StemDAO
This will update last_membership_change for stem owners where group member in groupSet is the given groupId.

Specified by:
updateLastMembershipChangeIncludeAncestorGroups in interface StemDAO
See Also:
StemDAO.updateLastMembershipChangeIncludeAncestorGroups(java.lang.String)

findByName

public Stem findByName(String name,
                       boolean exceptionIfNull,
                       QueryOptions queryOptions)
                throws GrouperDAOException,
                       StemNotFoundException
Specified by:
findByName in interface StemDAO
Parameters:
name -
exceptionIfNull -
queryOptions -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByCurrentName

public Stem findByCurrentName(String name,
                              boolean exceptionIfNull,
                              QueryOptions queryOptions)
                       throws GrouperDAOException,
                              StemNotFoundException
Description copied from interface: StemDAO
Find a stem by its current name only.

Specified by:
findByCurrentName in interface StemDAO
Parameters:
name -
exceptionIfNull -
queryOptions -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByAlternateName

public Stem findByAlternateName(String name,
                                boolean exceptionIfNull,
                                QueryOptions queryOptions)
                         throws GrouperDAOException,
                                StemNotFoundException
Description copied from interface: StemDAO
Find a stem by its alternate name only.

Specified by:
findByAlternateName in interface StemDAO
Parameters:
name -
exceptionIfNull -
queryOptions -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByUuid

public Stem findByUuid(String uuid,
                       boolean exceptionIfNull,
                       QueryOptions queryOptions)
                throws GrouperDAOException,
                       StemNotFoundException
Specified by:
findByUuid in interface StemDAO
Parameters:
uuid -
exceptionIfNull -
queryOptions -
Returns:
stem
Throws:
GrouperDAOException
StemNotFoundException

findByUuidOrName

public Stem findByUuidOrName(String uuid,
                             String name,
                             boolean exceptionIfNull)
                      throws GrouperDAOException,
                             StemNotFoundException
Specified by:
findByUuidOrName in interface StemDAO
Returns:
the stem or null
Throws:
GrouperDAOException
StemNotFoundException
See Also:
StemDAO.findByUuidOrName(java.lang.String, java.lang.String, boolean)

findByUuidOrName

public Stem findByUuidOrName(String uuid,
                             String name,
                             boolean exceptionIfNull,
                             QueryOptions queryOptions)
                      throws GrouperDAOException,
                             StemNotFoundException
Specified by:
findByUuidOrName in interface StemDAO
Returns:
the stem or null
Throws:
GrouperDAOException
StemNotFoundException
See Also:
StemDAO.findByUuidOrName(java.lang.String, java.lang.String, boolean, QueryOptions)

saveUpdateProperties

public void saveUpdateProperties(Stem stem)
Description copied from interface: StemDAO
save the udpate properties which are auto saved when business method is called

Specified by:
saveUpdateProperties in interface StemDAO
See Also:
StemDAO.saveUpdateProperties(edu.internet2.middleware.grouper.Stem)

findParentsByGroups

public Set<Stem> findParentsByGroups(Collection<Group> groups)
find all parent stems by group

Specified by:
findParentsByGroups in interface StemDAO
Parameters:
groups -
Returns:
the groups

findByNames

public Set<Stem> findByNames(Collection<String> names,
                             boolean exceptionOnNotFound)
                      throws StemNotFoundException
Description copied from interface: StemDAO
find all stems by name

Specified by:
findByNames in interface StemDAO
Returns:
the stems
Throws:
StemNotFoundException
See Also:
StemDAO.findByNames(java.util.Collection, boolean)

getAllStemsWithGroupsSecure

public Set<Stem> getAllStemsWithGroupsSecure(GrouperSession grouperSession,
                                             edu.internet2.middleware.subject.Subject subject,
                                             Set<Privilege> inPrivSet,
                                             QueryOptions queryOptions)
                                      throws GrouperDAOException
Description copied from interface: StemDAO
get stems with groups that have privileges

Specified by:
getAllStemsWithGroupsSecure in interface StemDAO
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
See Also:
StemDAO.getAllStemsWithGroupsSecure(edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

findStemsInStemWithoutPrivilege

public Set<Stem> findStemsInStemWithoutPrivilege(GrouperSession grouperSession,
                                                 String stemId,
                                                 Stem.Scope scope,
                                                 edu.internet2.middleware.subject.Subject subject,
                                                 Privilege privilege,
                                                 QueryOptions queryOptions,
                                                 boolean considerAllSubject,
                                                 String sqlLikeString)
Description copied from interface: StemDAO
see which stems do not have this privilege

Specified by:
findStemsInStemWithoutPrivilege in interface StemDAO
Returns:
the stems
See Also:
StemDAO#findStemsInStemWithoutPrivilege(GrouperSession, String, Scope, Subject, Privilege, QueryOptions, boolean, String)

getAllStemsSplitScopeSecure

public Set<Stem> getAllStemsSplitScopeSecure(String scope,
                                             GrouperSession grouperSession,
                                             edu.internet2.middleware.subject.Subject subject,
                                             Set<Privilege> privileges,
                                             QueryOptions queryOptions)
Description copied from interface: StemDAO
get all stems secure, split the scope by whitespace

Specified by:
getAllStemsSplitScopeSecure in interface StemDAO
Returns:
set of attribute defs
See Also:
StemDAO.getAllStemsSplitScopeSecure(String, GrouperSession, Subject, Set, QueryOptions)

findByUuids

public Set<Stem> findByUuids(Collection<String> uuids,
                             QueryOptions queryOptions)
Description copied from interface: StemDAO
note, dont pass more than 100 ids

Specified by:
findByUuids in interface StemDAO
See Also:
StemDAO.findByUuids(Collection, QueryOptions)

findByIdIndex

public Stem findByIdIndex(Long idIndex,
                          boolean exceptionIfNotFound,
                          QueryOptions queryOptions)
                   throws GroupNotFoundException
not a secure method, find by id index

Specified by:
findByIdIndex in interface StemDAO
Throws:
GroupNotFoundException
See Also:
StemDAO.findByIdIndex(Long, boolean, QueryOptions)

getAllStemsSecure

public Set<Stem> getAllStemsSecure(String scope,
                                   GrouperSession grouperSession,
                                   edu.internet2.middleware.subject.Subject subject,
                                   Set<Privilege> inPrivSet,
                                   QueryOptions queryOptions,
                                   boolean splitScope,
                                   String parentStemId,
                                   Stem.Scope stemScope,
                                   boolean findByUuidOrName,
                                   Collection<Field> userHasInGroupFields,
                                   Collection<Field> userHasInAttributeFields,
                                   Collection<String> totalStemIds)
                            throws GrouperDAOException
Specified by:
getAllStemsSecure in interface StemDAO
Parameters:
scope - is blank for no scope
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
splitScope - true to split scopes by whitespace
parentStemId - true if filtering by parent of ancestor
stemScope - ONE or SUB
findByUuidOrName - if we are looking up a stem, only look by uuid or name
userHasInGroupFields - find stems where the user has these fields in a group
userHasInAttributeFields - find stems where the user has these fields in an attribute
Returns:
the stems
Throws:
GrouperDAOException
See Also:
StemDAO#getAllStemsSecure(String, GrouperSession, Subject, Set, QueryOptions, boolean, String, Scope, boolean, Collection, Collection, Collection)

getAllStemsSecure

public Set<Stem> getAllStemsSecure(String scope,
                                   GrouperSession grouperSession,
                                   edu.internet2.middleware.subject.Subject subject,
                                   Set<Privilege> inPrivSet,
                                   QueryOptions queryOptions,
                                   boolean splitScope,
                                   String parentStemId,
                                   Stem.Scope stemScope,
                                   boolean findByUuidOrName,
                                   Collection<Field> userHasInGroupFields,
                                   Collection<Field> userHasInAttributeFields,
                                   Collection<String> totalStemIds,
                                   String idOfAttributeDefName,
                                   Object attributeValue,
                                   Boolean attributeCheckReadOnAttributeDef)
                            throws GrouperDAOException
Specified by:
getAllStemsSecure in interface StemDAO
Parameters:
scope - is blank for no scope
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
splitScope - true to split scopes by whitespace
parentStemId - true if filtering by parent of ancestor
stemScope - ONE or SUB
findByUuidOrName - if we are looking up a stem, only look by uuid or name
userHasInGroupFields - find stems where the user has these fields in a group
userHasInAttributeFields - find stems where the user has these fields in an attribute
idOfAttributeDefName - if looking for groups that have this attribute def name
attributeValue - if looking for groups that have this attribute value on the attribute def name
attributeCheckReadOnAttributeDef - if check read on attribute for attribute on stem
Returns:
the stems
Throws:
GrouperDAOException
See Also:
StemDAO#getAllStemsSecure(String, GrouperSession, Subject, Set, QueryOptions, boolean, String, Scope, boolean, Collection, Collection, Collection, String, Object, Boolean)