Class Hib3StemDAO
java.lang.Object
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3StemDAO
- All Implemented Interfaces:
GrouperDAO
,StemDAO
Basic Hibernate
Stem
DAO interface.- Since:
- Version:
- $Id: Hib3StemDAO.java,v 1.38 2009-11-17 02:52:29 mchyzer Exp $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
assignFilterToQuery
(String scope, Boolean splitScope, StringBuilder whereClause, ByHqlStatic byHqlStatic, boolean findByUuidOrName, boolean excludeAlternateNames, String alias) static String
assignFilterToQuery
(String scope, Boolean splitScope, StringBuilder whereClause, ByHqlStatic byHqlStatic, boolean findByUuidOrName, String alias) 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
boolean
findAllByApproximateDisplayExtension
(String val, String scope) findAllByApproximateDisplayName
(String val, String scope) findAllByApproximateExtension
(String val, String scope) findAllByApproximateName
(String val, String scope) findAllByApproximateNameAny
(String name, String scope) findAllByApproximateNameAny
(String name, String scope, QueryOptions queryOptions) findAllByCreatedAfter
(Date d, String scope) findAllByCreatedBefore
(Date d, String scope) findAllChildGroups
(Stem ns, Stem.Scope scope) Find all child groups within specified scope.findAllChildGroupsSecure
(Stem ns, Stem.Scope scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) Find all child groups within specified scope, and make sure the grouper session can see themfindAllChildGroupsSecure
(Stem ns, Stem.Scope scope, GrouperSession grouperSession, 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 themfindAllChildGroupsSecure
(Stem ns, Stem.Scope scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, Set<TypeOfGroup> typeOfGroups, Boolean enabled) (non-Javadoc)findAllChildMembershipGroupsSecure
(Stem ns, Stem.Scope scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) Find all child groups within specified scope, and make sure the grouper session can see themfindAllChildStems
(Stem ns, Stem.Scope scope) Find all child stems within specified scope.findAllChildStems
(Stem ns, Stem.Scope scope, boolean orderByName) Find all child stems within specified scope.findAllChildStems
(Stem ns, Stem.Scope scope, QueryOptions queryOptions) Find all child stems within specified scope.findAllChildStems
(Stem ns, Stem.Scope scope, QueryOptions queryOptions, boolean checkSecurity) Find all child stems within specified scope.findAllChildStemsSecure
(Stem ns, Stem.Scope scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) Find all child stems within specified scope, and make sure the grouper session can see themfindByAlternateName
(String name, boolean exceptionIfNull, QueryOptions queryOptions) Find a stem by its alternate name only.findByCreatorOrModifier
(Member member) find stems by creator or modifierfindByCurrentName
(String name, boolean exceptionIfNull, QueryOptions queryOptions) Find a stem by its current name only.findByIdIndex
(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) not a secure method, find by id indexfindByName
(String name) Deprecated.findByName
(String name, boolean exceptionIfNull) findByName
(String name, boolean exceptionIfNull, QueryOptions queryOptions) findByNames
(Collection<String> names, boolean exceptionOnNotFound) find all stems by namefindByUuid
(String uuid) Deprecated.findByUuid
(String uuid, boolean exceptionIfNull) findByUuid
(String uuid, boolean exceptionIfNull, QueryOptions queryOptions) findByUuidOrName
(String uuid, String name, boolean exceptionIfNull) findByUuidOrName
(String uuid, String name, boolean exceptionIfNull, QueryOptions queryOptions) findByUuids
(Collection<String> uuids, QueryOptions queryOptions) note, dont pass more than 100 idsfindParentsByGroups
(Collection<Group> groups) find all parent stems by groupfindStemsInStemWithoutPrivilege
(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString) see which stems do not have this privilegefindStemsInStemWithPrivilege
(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString) see which stems do not have this privilegegetAllStemsSecure
(GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) getAllStemsSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) getAllStemsSecure
(String scope, GrouperSession grouperSession, 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) getAllStemsSecure
(String scope, GrouperSession grouperSession, 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) getAllStemsSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> stemIds, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef, Set<Object> attributeValuesOnAssignment) getAllStemsSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> stemIds, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef, Set<Object> attributeValuesOnAssignment, String idOfAttributeDefName2, Object attributeValue2, Set<Object> attributeValuesOnAssignment2, boolean attributeNotAssigned) getAllStemsSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> stemIds, Collection<String> stemNames, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef, Set<Object> attributeValuesOnAssignment, String idOfAttributeDefName2, Object attributeValue2, Set<Object> attributeValuesOnAssignment2, boolean attributeNotAssigned, boolean excludeAlternateName) getAllStemsSplitScopeSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions) get all stems secure, split the scope by whitespacegetAllStemsWithGroupsSecure
(GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) get stems with groups that have privilegesgetImmediateChildrenSecure
(GrouperSession grouperSession, Stem stem, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) get immediate children (stems) securestatic void
massageSortFields
(QuerySort querySort) if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDb, displayName with displayNameDb, and displayExtension with displayExtensionDbstatic void
massageSortFields
(QuerySort querySort, String alias) if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDb, displayName with displayNameDb, and displayExtension with displayExtensionDbvoid
moveStemSets
(List<StemSet> ifHasStemSetsOfParentStem, List<StemSet> oldStemSets, String currentStemId, int depthOfFirstParent) void
renameStemAndChildren
(Set children) protected static void
reset
(HibernateSession hibernateSession) void
saveUpdateProperties
(Stem stem) save the udpate properties which are auto saved when business method is calledvoid
void
updateLastMembershipChange
(String stemId) void
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, getConfiguration, getSessionFactory, getSessionFactory, hibernateInitted, initHibernateIfNotInitted, initHibernateIfNotInitted, resourceNameFromClassName, session, session
-
Constructor Details
-
Hib3StemDAO
public Hib3StemDAO()
-
-
Method Details
-
createChildGroup
- Specified by:
createChildGroup
in interfaceStemDAO
- Parameters:
_stem
-_group
-_member
-- Throws:
GrouperDAOException
- Since:
-
createChildAttributeDef
public void createChildAttributeDef(Stem _stem, AttributeDef attributeDef) throws GrouperDAOException - Specified by:
createChildAttributeDef
in interfaceStemDAO
- Parameters:
_stem
-attributeDef
-- Throws:
GrouperDAOException
- Since:
-
createChildStem
- Specified by:
createChildStem
in interfaceStemDAO
- Parameters:
_child
-- Throws:
GrouperDAOException
- Since:
-
createRootStem
- Specified by:
createRootStem
in interfaceStemDAO
- Parameters:
_root
-- Throws:
GrouperDAOException
- Since:
-
createStemSetsForStem
- Parameters:
stemId
-parentStemId
-
-
moveStemSets
public void moveStemSets(List<StemSet> ifHasStemSetsOfParentStem, List<StemSet> oldStemSets, String currentStemId, int depthOfFirstParent) - Specified by:
moveStemSets
in interfaceStemDAO
- See Also:
-
delete
- Specified by:
delete
in interfaceStemDAO
- Parameters:
_ns
-- Throws:
GrouperDAOException
- Since:
-
exists
- Specified by:
exists
in interfaceStemDAO
- Parameters:
uuid
-- Returns:
- if exists
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateDisplayExtension
- Specified by:
findAllByApproximateDisplayExtension
in interfaceStemDAO
- Parameters:
val
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateDisplayExtension
public Set<Stem> findAllByApproximateDisplayExtension(String val, String scope) throws GrouperDAOException - Specified by:
findAllByApproximateDisplayExtension
in interfaceStemDAO
- Parameters:
val
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateDisplayName
- Specified by:
findAllByApproximateDisplayName
in interfaceStemDAO
- Parameters:
val
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateDisplayName
public Set<Stem> findAllByApproximateDisplayName(String val, String scope) throws GrouperDAOException - Specified by:
findAllByApproximateDisplayName
in interfaceStemDAO
- Parameters:
val
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateExtension
- Specified by:
findAllByApproximateExtension
in interfaceStemDAO
- Parameters:
val
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateExtension
- Specified by:
findAllByApproximateExtension
in interfaceStemDAO
- Parameters:
val
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateName
- Specified by:
findAllByApproximateName
in interfaceStemDAO
- Parameters:
val
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateName
- Specified by:
findAllByApproximateName
in interfaceStemDAO
- Parameters:
val
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateNameAny
- Specified by:
findAllByApproximateNameAny
in interfaceStemDAO
- Parameters:
name
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
massageSortFields
if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDb, displayName with displayNameDb, and displayExtension with displayExtensionDb- Parameters:
querySort
-
-
massageSortFields
if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDb, displayName with displayNameDb, and displayExtension with displayExtensionDb- Parameters:
querySort
-alias
- is the hql alias
-
findAllByApproximateNameAny
- Specified by:
findAllByApproximateNameAny
in interfaceStemDAO
- Parameters:
name
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByApproximateNameAny
public Set<Stem> findAllByApproximateNameAny(String name, String scope, QueryOptions queryOptions) throws GrouperDAOException - Specified by:
findAllByApproximateNameAny
in interfaceStemDAO
- Parameters:
name
-scope
-queryOptions
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByCreatedAfter
- Specified by:
findAllByCreatedAfter
in interfaceStemDAO
- Parameters:
d
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByCreatedAfter
- Specified by:
findAllByCreatedAfter
in interfaceStemDAO
- Parameters:
d
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByCreatedBefore
- Specified by:
findAllByCreatedBefore
in interfaceStemDAO
- Parameters:
d
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllByCreatedBefore
- Specified by:
findAllByCreatedBefore
in interfaceStemDAO
- Parameters:
d
-scope
-- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
findAllChildGroups
Description copied from interface:StemDAO
Find all child groups within specified scope.- Specified by:
findAllChildGroups
in interfaceStemDAO
- Throws:
GrouperDAOException
- Since:
- See Also:
-
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 interfaceStemDAO
- Throws:
IllegalStateException
- if unknown scope.GrouperDAOException
- Since:
- See Also:
-
findAllChildStems
Description copied from interface:StemDAO
Find all child stems within specified scope.- Specified by:
findAllChildStems
in interfaceStemDAO
- Parameters:
ns
-scope
-orderByName
-- Returns:
- set stem
- Throws:
GrouperDAOException
IllegalStateException
- if unknown scope.- Since:
- See Also:
-
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 interfaceStemDAO
- Parameters:
ns
-scope
-queryOptions
-- Returns:
- set stem
- Throws:
GrouperDAOException
IllegalStateException
- if unknown scope.- Since:
- See Also:
-
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 interfaceStemDAO
- Parameters:
ns
-scope
-queryOptions
-checkSecurity
-- Returns:
- set stem
- Throws:
GrouperDAOException
IllegalStateException
- if unknown scope.- Since:
- See Also:
-
findByName
Deprecated.- Specified by:
findByName
in interfaceStemDAO
- Parameters:
name
-- Returns:
- stem
- Throws:
GrouperDAOException
StemNotFoundException
-
findByName
public Stem findByName(String name, boolean exceptionIfNull) throws GrouperDAOException, StemNotFoundException - Specified by:
findByName
in interfaceStemDAO
- Parameters:
name
-exceptionIfNull
-- Returns:
- stem
- Throws:
GrouperDAOException
StemNotFoundException
-
findByUuid
Deprecated.- Specified by:
findByUuid
in interfaceStemDAO
- Parameters:
uuid
-- Returns:
- stem
- Throws:
GrouperDAOException
StemNotFoundException
-
findByUuid
public Stem findByUuid(String uuid, boolean exceptionIfNull) throws GrouperDAOException, StemNotFoundException - Specified by:
findByUuid
in interfaceStemDAO
- Parameters:
uuid
-exceptionIfNull
-- Returns:
- stem
- Throws:
GrouperDAOException
StemNotFoundException
-
getAllStems
- Specified by:
getAllStems
in interfaceStemDAO
- Returns:
- set stems
- Throws:
GrouperDAOException
- Since:
-
renameStemAndChildren
- Specified by:
renameStemAndChildren
in interfaceStemDAO
- Parameters:
children
-- Throws:
GrouperDAOException
- Since:
-
update
- Specified by:
update
in interfaceStemDAO
- Parameters:
_ns
-- Throws:
GrouperDAOException
- Since:
-
reset
protected static void reset(HibernateSession hibernateSession) throws org.hibernate.HibernateException - Parameters:
hibernateSession
-- Throws:
org.hibernate.HibernateException
-
findByCreatorOrModifier
find stems by creator or modifier- Specified by:
findByCreatorOrModifier
in interfaceStemDAO
- Parameters:
member
-- Returns:
- the stems
-
findAllChildGroupsSecure
public Set<Group> findAllChildGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, 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 interfaceStemDAO
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:
-
findAllChildGroupsSecure
public Set<Group> findAllChildGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, 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 interfaceStemDAO
inPrivSet
- is a set of privs that the subject must have one of to display a row. AccessPrivilege has some pre-baked set constants availabletypeOfGroups
- type of groups to return or null for all- Returns:
- the groups
- Throws:
GrouperDAOException
- See Also:
-
findAllChildGroupsSecure
public Set<Group> findAllChildGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, Set<TypeOfGroup> typeOfGroups, Boolean enabled) throws GrouperDAOException (non-Javadoc)- Specified by:
findAllChildGroupsSecure
in interfaceStemDAO
inPrivSet
- is a set of privs that the subject must have one of to display a row. AccessPrivilege has some pre-baked set constants availabletypeOfGroups
- type of groups to return or null for all- Returns:
- the groups
- Throws:
GrouperDAOException
- See Also:
-
findAllChildMembershipGroupsSecure
public Set<Group> findAllChildMembershipGroupsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, 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 interfaceStemDAO
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:
-
findAllChildStemsSecure
public Set<Stem> findAllChildStemsSecure(Stem ns, Stem.Scope scope, GrouperSession grouperSession, 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 interfaceStemDAO
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:
-
getImmediateChildrenSecure
public Set<Stem> getImmediateChildrenSecure(GrouperSession grouperSession, Stem stem, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) throws GrouperDAOException Description copied from interface:StemDAO
get immediate children (stems) secure- Specified by:
getImmediateChildrenSecure
in interfaceStemDAO
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:
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) throws GrouperDAOException - Specified by:
getAllStemsSecure
in interfaceStemDAO
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:
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions) throws GrouperDAOException - Specified by:
getAllStemsSecure
in interfaceStemDAO
- Parameters:
scope
- is blank for no scopeinPrivSet
- 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:
-
assignFilterToQuery
public static String assignFilterToQuery(String scope, Boolean splitScope, StringBuilder whereClause, ByHqlStatic byHqlStatic, boolean findByUuidOrName, String alias) - Parameters:
byHqlStatic
-scope
-splitScope
- default truewhereClause
-findByUuidOrName
- generally this is falsealias
- e.g. theGroup whatever alias in hql query- Returns:
- scope lowercased
-
assignFilterToQuery
public static String assignFilterToQuery(String scope, Boolean splitScope, StringBuilder whereClause, ByHqlStatic byHqlStatic, boolean findByUuidOrName, boolean excludeAlternateNames, String alias) - Parameters:
byHqlStatic
-scope
-splitScope
- default truewhereClause
-findByUuidOrName
- generally this is falseexcludeAlternateNames
- whether to exclude alternate names when using scope or splitScopealias
- e.g. theGroup whatever alias in hql query- Returns:
- scope lowercased
-
createChildAttributeDefName
public void createChildAttributeDefName(Stem _parent, AttributeDefName attributeDefName) throws GrouperDAOException - Specified by:
createChildAttributeDefName
in interfaceStemDAO
- Parameters:
_parent
-attributeDefName
-- Throws:
GrouperDAOException
-
updateLastMembershipChange
- Specified by:
updateLastMembershipChange
in interfaceStemDAO
- See Also:
-
updateLastMembershipChangeIncludeAncestorGroups
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 interfaceStemDAO
- See Also:
-
findByName
public Stem findByName(String name, boolean exceptionIfNull, QueryOptions queryOptions) throws GrouperDAOException, StemNotFoundException - Specified by:
findByName
in interfaceStemDAO
- 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 interfaceStemDAO
- 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 interfaceStemDAO
- 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 interfaceStemDAO
- 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 interfaceStemDAO
- Returns:
- the stem or null
- Throws:
GrouperDAOException
StemNotFoundException
- See Also:
-
findByUuidOrName
public Stem findByUuidOrName(String uuid, String name, boolean exceptionIfNull, QueryOptions queryOptions) throws GrouperDAOException, StemNotFoundException - Specified by:
findByUuidOrName
in interfaceStemDAO
- Returns:
- the stem or null
- Throws:
GrouperDAOException
StemNotFoundException
- See Also:
-
saveUpdateProperties
Description copied from interface:StemDAO
save the udpate properties which are auto saved when business method is called- Specified by:
saveUpdateProperties
in interfaceStemDAO
- See Also:
-
findParentsByGroups
find all parent stems by group- Specified by:
findParentsByGroups
in interfaceStemDAO
- 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 interfaceStemDAO
- Returns:
- the stems
- Throws:
StemNotFoundException
- See Also:
-
getAllStemsWithGroupsSecure
public Set<Stem> getAllStemsWithGroupsSecure(GrouperSession grouperSession, 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 interfaceStemDAO
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:
-
findStemsInStemWithoutPrivilege
public Set<Stem> findStemsInStemWithoutPrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, 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 interfaceStemDAO
- Returns:
- the stems
- See Also:
-
getAllStemsSplitScopeSecure
public Set<Stem> getAllStemsSplitScopeSecure(String scope, GrouperSession grouperSession, 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 interfaceStemDAO
- Returns:
- set of attribute defs
- See Also:
-
findByUuids
Description copied from interface:StemDAO
note, dont pass more than 100 ids- Specified by:
findByUuids
in interfaceStemDAO
- See Also:
-
findByIdIndex
public Stem findByIdIndex(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws GroupNotFoundException not a secure method, find by id index- Specified by:
findByIdIndex
in interfaceStemDAO
- Throws:
GroupNotFoundException
- See Also:
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, 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 interfaceStemDAO
- Parameters:
scope
- is blank for no scopeinPrivSet
- 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 setssplitScope
- true to split scopes by whitespaceparentStemId
- true if filtering by parent of ancestorstemScope
- ONE or SUBfindByUuidOrName
- if we are looking up a stem, only look by uuid or nameuserHasInGroupFields
- find stems where the user has these fields in a groupuserHasInAttributeFields
- find stems where the user has these fields in an attribute- Returns:
- the stems
- Throws:
GrouperDAOException
- See Also:
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, 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 interfaceStemDAO
- Parameters:
scope
- is blank for no scopeinPrivSet
- 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 setssplitScope
- true to split scopes by whitespaceparentStemId
- true if filtering by parent of ancestorstemScope
- ONE or SUBfindByUuidOrName
- if we are looking up a stem, only look by uuid or nameuserHasInGroupFields
- find stems where the user has these fields in a groupuserHasInAttributeFields
- find stems where the user has these fields in an attributeidOfAttributeDefName
- if looking for groups that have this attribute def nameattributeValue
- if looking for groups that have this attribute value on the attribute def nameattributeCheckReadOnAttributeDef
- if check read on attribute for attribute on stem- Returns:
- the stems
- Throws:
GrouperDAOException
- See Also:
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> stemIds, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef, Set<Object> attributeValuesOnAssignment) throws GrouperDAOException - Specified by:
getAllStemsSecure
in interfaceStemDAO
- Parameters:
scope
- is blank for no scopeinPrivSet
- 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 setssplitScope
- true to split scopes by whitespaceparentStemId
- true if filtering by parent of ancestorstemScope
- ONE or SUBfindByUuidOrName
- if we are looking up a stem, only look by uuid or nameuserHasInGroupFields
- find stems where the user has these fields in a groupuserHasInAttributeFields
- find stems where the user has these fields in an attributeidOfAttributeDefName
- if looking for groups that have this attribute def nameattributeValue
- if looking for groups that have this attribute value on the attribute def nameattributeCheckReadOnAttributeDef
- if check read on attribute for attribute on stemattributeValuesOnAssignment
- if looking for an attribute value on an assignment, could be multiple values- Returns:
- the stems
- Throws:
GrouperDAOException
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> stemIds, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef, Set<Object> attributeValuesOnAssignment, String idOfAttributeDefName2, Object attributeValue2, Set<Object> attributeValuesOnAssignment2, boolean attributeNotAssigned) throws GrouperDAOException - Specified by:
getAllStemsSecure
in interfaceStemDAO
- Parameters:
scope
- is blank for no scopeinPrivSet
- 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 setssplitScope
- true to split scopes by whitespaceparentStemId
- true if filtering by parent of ancestorstemScope
- ONE or SUBfindByUuidOrName
- if we are looking up a stem, only look by uuid or nameuserHasInGroupFields
- find stems where the user has these fields in a groupuserHasInAttributeFields
- find stems where the user has these fields in an attributeidOfAttributeDefName
- if looking for groups that have this attribute def nameattributeValue
- if looking for groups that have this attribute value on the attribute def nameattributeCheckReadOnAttributeDef
- if check read on attribute for attribute on stemattributeValuesOnAssignment
- if looking for an attribute value on an assignment, could be multiple valuesidOfAttributeDefName2
- if looking for groups that have this attribute def name2attributeValue2
- if looking for groups that have this attribute value2 on the attribute def name2attributeValuesOnAssignment2
- if looking for an attribute value on an assignment2, could be multiple valuesattributeNotAssigned
- find stems that don't have the given type assigned- Returns:
- the stems
- Throws:
GrouperDAOException
- See Also:
-
edu.internet2.middleware.grouper.internal.dao.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, boolean, java.lang.String, edu.internet2.middleware.grouper.Stem.Scope, boolean, java.util.Collection, java.util.Collection, java.util.Collection, java.lang.String, java.lang.Object, java.lang.Boolean, java.util.Set, java.lang.String, java.lang.Object, java.util.Set)
-
getAllStemsSecure
public Set<Stem> getAllStemsSecure(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> inPrivSet, QueryOptions queryOptions, boolean splitScope, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<Field> userHasInGroupFields, Collection<Field> userHasInAttributeFields, Collection<String> stemIds, Collection<String> stemNames, String idOfAttributeDefName, Object attributeValue, Boolean attributeCheckReadOnAttributeDef, Set<Object> attributeValuesOnAssignment, String idOfAttributeDefName2, Object attributeValue2, Set<Object> attributeValuesOnAssignment2, boolean attributeNotAssigned, boolean excludeAlternateName) throws GrouperDAOException - Specified by:
getAllStemsSecure
in interfaceStemDAO
- Parameters:
scope
- is blank for no scopeinPrivSet
- 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 setssplitScope
- true to split scopes by whitespaceparentStemId
- true if filtering by parent of ancestorstemScope
- ONE or SUBfindByUuidOrName
- if we are looking up a stem, only look by uuid or nameuserHasInGroupFields
- find stems where the user has these fields in a groupuserHasInAttributeFields
- find stems where the user has these fields in an attributestemIds
- the stem Ids to search forstemNames
- the stem names to search foridOfAttributeDefName
- if looking for groups that have this attribute def nameattributeValue
- if looking for groups that have this attribute value on the attribute def nameattributeCheckReadOnAttributeDef
- if check read on attribute for attribute on stemattributeValuesOnAssignment
- if looking for an attribute value on an assignment, could be multiple valuesidOfAttributeDefName2
- if looking for groups that have this attribute def name2attributeValue2
- if looking for groups that have this attribute value2 on the attribute def name2attributeValuesOnAssignment2
- if looking for an attribute value on an assignment2, could be multiple valuesattributeNotAssigned
- find stems that don't have the given type assignedexcludeAlternateName
- whether to exclude alternate names from name or scope search- Returns:
- the stems
- Throws:
GrouperDAOException
-
findStemsInStemWithPrivilege
public Set<Stem> findStemsInStemWithPrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, 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:
findStemsInStemWithPrivilege
in interfaceStemDAO
- Returns:
- the stems
- See Also:
-