Class Hib3MemberDAO
java.lang.Object
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO
- All Implemented Interfaces:
GrouperDAO,MemberDAO
Basic Hibernate
Member DAO interface.- Since:
- Version:
- $Id: Hib3MemberDAO.java,v 1.20 2009-12-28 06:08:37 mchyzer Exp $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intnumber of subjects to put in member query -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_internal_membersComplement(String groupUuid1, String groupUuid2) find the set of member uuids of the complement of two groups_internal_membersIntersection(String groupUuid1, String groupUuid2) find the set of member uuids of the intersection of two groups_internal_membersUnion(String groupUuid1, String groupUuid2) find the set of member uuids of the union of two groupsvoidbooleanvoidexistsCachePut(String uuid, boolean exists) Deprecated.findAll()Returns member ids for deleted groups and local entities that are deleted but still marked as resolvable or not deleted.Returns member ids that are checked by USDUReturns member ids that need to have subject resolution eligible updated to FfindAllUsed(Source source) find all members that are used somewhere (e.g.findByIdIndex(Long idIndex, boolean exceptionIfNotFound) not a secure method, find by id indexfindByIds(Collection<String> idsOrig, QueryOptions queryOptions) find by ids securefindByInternalIds(Collection<Long> internalIds, boolean exceptionOnNotFound, QueryOptions queryOptions) find members by internal idsfindBySubject(Subject subj) Deprecated.use overloadfindBySubject(Subject subj, boolean exceptionIfNull) findBySubject(String subjectId) Deprecated.use overloadfindBySubject(String subjectId, boolean exceptionIfNull) find by subject id only (cant be duplicates)findBySubject(String subjectId, String src) Deprecated.use overloadfindBySubject(String subjectId, String src, boolean exceptionIfNull) find by subject id and source idfindBySubject(String id, String src, String type) Deprecated.use overloadfindBySubject(String id, String src, String type, boolean exceptionIfNull) findBySubject(String id, String src, String type, boolean exceptionIfNull, QueryOptions queryOptions) find member by subjectfindBySubjectIdentifier(String subjectIdentifier, String src, boolean exceptionIfNull) find by subject identifier and source idfindBySubjectIds(Collection<String> subjectIds, String subjectSourceId) Retrieve Member objects based on a list of SubjectIds within a single SubjectSourcefindBySubjects(Collection<Subject> subjectsOrig, boolean createIfNotExists) find members by subjects and create if not exist possiblyfindBySubjectsInGroup(GrouperSession grouperSession, Set<Subject> subjects, Group group, Field field, MembershipType membershipType) convert a set of subjects to a set of membersfindByUuid(String uuid) Deprecated.use overloadfindByUuid(String uuid, boolean exceptionIfNull) findByUuid(String uuid, boolean exceptionIfNull, QueryOptions queryOptions) findByUuidOrSubject(String uuid, String subjectId, String source, boolean exceptionIfNull) find a member by uuid or subject idgetAllMembersSecure(GrouperSession grouperSession, QueryOptions queryOptions, String idOfAttributeDefName, Object attributeValue, Set<Object> attributeValuesOnAssignment, Boolean attributeCheckReadOnAttributeDef, String idOfAttributeDefName2, Object attributeValue2, Set<Object> attributeValuesOnAssignment2) get all members securegetUnresolvableMembers(QueryOptions queryOptions, Boolean deleted) static voidmassageMemberSortFields(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 voidmassageMemberSortFields(QuerySort querySort, String alias) if there are sort fields, go through them, and replace name with m.subjectIdDb, etc, sort_string0 for m.sortString0, etcstatic voidremove all cachesstatic voidmembersCacheRemove(Member member) remove this from all cachesprotected static voidreset(HibernateSession hibernateSession) voidsaveUpdateProperties(Member member) save the udpate properties which are auto saved when business method is calledselectByDataProvider(Long dataProviderInternalId) get all the members that are assigned in a data provider to fields or rowsvoidvoiduuid2dtoCacheRemove(String uuid) Deprecated.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
-
Field Details
-
MEMBER_SUBJECT_BATCH_SIZE
public static int MEMBER_SUBJECT_BATCH_SIZEnumber of subjects to put in member query
-
-
Constructor Details
-
Hib3MemberDAO
public Hib3MemberDAO()
-
-
Method Details
-
create
- Specified by:
createin interfaceMemberDAO- Throws:
GrouperDAOException- Since:
-
exists
- Specified by:
existsin interfaceMemberDAO- Throws:
GrouperDAOException- Since:
-
findAll
- Specified by:
findAllin interfaceMemberDAO- Throws:
GrouperDAOException- Since:
-
findAll
- Specified by:
findAllin interfaceMemberDAO- Throws:
GrouperDAOException- Since:
-
findBySubject
@Deprecated public Member findBySubject(Subject subj) throws GrouperDAOException, MemberNotFoundException Deprecated.use overload- Specified by:
findBySubjectin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException
-
findBySubject
public Member findBySubject(Subject subj, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException - Specified by:
findBySubjectin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException
-
findBySubject
@Deprecated public Member findBySubject(String id, String src, String type) throws GrouperDAOException, MemberNotFoundException Deprecated.use overload- Specified by:
findBySubjectin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException
-
findBySubject
public Member findBySubject(String id, String src, String type, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException - Specified by:
findBySubjectin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException- See Also:
-
massageMemberSortFields
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-
-
massageMemberSortFields
if there are sort fields, go through them, and replace name with m.subjectIdDb, etc, sort_string0 for m.sortString0, etc- Parameters:
querySort-
-
findBySubject
public Member findBySubject(String id, String src, String type, boolean exceptionIfNull, QueryOptions queryOptions) throws GrouperDAOException, MemberNotFoundException Description copied from interface:MemberDAOfind member by subject- Specified by:
findBySubjectin interfaceMemberDAO- Parameters:
id-src-type-exceptionIfNull-queryOptions-- Returns:
- member
- Throws:
GrouperDAOExceptionMemberNotFoundException
-
findByUuid
@Deprecated public Member findByUuid(String uuid) throws GrouperDAOException, MemberNotFoundException Deprecated.use overload- Specified by:
findByUuidin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException
-
findByUuid
public Member findByUuid(String uuid, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException - Specified by:
findByUuidin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException- See Also:
-
findByUuid
public Member findByUuid(String uuid, boolean exceptionIfNull, QueryOptions queryOptions) throws GrouperDAOException, MemberNotFoundException - Specified by:
findByUuidin interfaceMemberDAO- Throws:
GrouperDAOExceptionMemberNotFoundException
-
existsCachePut
Deprecated.update the exists cache- Specified by:
existsCachePutin interfaceMemberDAO- Parameters:
uuid-exists-
-
membersCacheClear
public static void membersCacheClear()remove all caches -
membersCacheRemove
remove this from all caches- Parameters:
member-
-
uuid2dtoCacheRemove
Deprecated.remove from cache- Specified by:
uuid2dtoCacheRemovein interfaceMemberDAO- Parameters:
uuid-
-
update
- Specified by:
updatein interfaceMemberDAO- Throws:
GrouperDAOException- Since:
-
reset
protected static void reset(HibernateSession hibernateSession) throws org.hibernate.HibernateException - Throws:
org.hibernate.HibernateException
-
findBySubject
@Deprecated public Member findBySubject(String subjectId) throws GrouperDAOException, MemberNotFoundException, MemberNotUniqueException Deprecated.use overloadDescription copied from interface:MemberDAOfind by subject id only (cant be duplicates)- Specified by:
findBySubjectin interfaceMemberDAO- Returns:
- the member
- Throws:
GrouperDAOExceptionMemberNotFoundExceptionMemberNotUniqueException- See Also:
-
findBySubject
public Member findBySubject(String subjectId, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException, MemberNotUniqueException Description copied from interface:MemberDAOfind by subject id only (cant be duplicates)- Specified by:
findBySubjectin interfaceMemberDAO- Returns:
- the member
- Throws:
GrouperDAOExceptionMemberNotFoundExceptionMemberNotUniqueException
-
findBySubject
@Deprecated public Member findBySubject(String subjectId, String src) throws GrouperDAOException, MemberNotFoundException Deprecated.use overloadDescription copied from interface:MemberDAOfind by subject id and source id- Specified by:
findBySubjectin interfaceMemberDAO- Returns:
- the member
- Throws:
GrouperDAOExceptionMemberNotFoundException- See Also:
-
findBySubject
public Member findBySubject(String subjectId, String src, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException Description copied from interface:MemberDAOfind by subject id and source id- Specified by:
findBySubjectin interfaceMemberDAO- Returns:
- the member
- Throws:
GrouperDAOExceptionMemberNotFoundException
-
findBySubjectIdentifier
public Member findBySubjectIdentifier(String subjectIdentifier, String src, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException Description copied from interface:MemberDAOfind by subject identifier and source id- Specified by:
findBySubjectIdentifierin interfaceMemberDAO- Returns:
- the member
- Throws:
GrouperDAOExceptionMemberNotFoundException
-
_internal_membersIntersection
Description copied from interface:MemberDAOfind the set of member uuids of the intersection of two groups- Specified by:
_internal_membersIntersectionin interfaceMemberDAO- Returns:
- the set of member uuids (non null)
- See Also:
-
_internal_membersUnion
Description copied from interface:MemberDAOfind the set of member uuids of the union of two groups- Specified by:
_internal_membersUnionin interfaceMemberDAO- Returns:
- the set of member uuids (non null)
- See Also:
-
_internal_membersComplement
Description copied from interface:MemberDAOfind the set of member uuids of the complement of two groups- Specified by:
_internal_membersComplementin interfaceMemberDAO- Returns:
- the set of member uuids (non null)
- See Also:
-
findBySubjectIds
Retrieve Member objects based on a list of SubjectIds within a single SubjectSource- Specified by:
findBySubjectIdsin interfaceMemberDAO- Parameters:
subjectIds-subjectSourceId-- Returns:
-
findByInternalIds
public Map<Long,Member> findByInternalIds(Collection<Long> internalIds, boolean exceptionOnNotFound, QueryOptions queryOptions) Description copied from interface:MemberDAOfind members by internal ids- Specified by:
findByInternalIdsin interfaceMemberDAO- Returns:
- See Also:
-
findBySubjects
find members by subjects and create if not exist possibly- Specified by:
findBySubjectsin interfaceMemberDAO- Parameters:
subjectsOrig-createIfNotExists-- Returns:
- the members
-
findBySubjectsInGroup
public Set<Member> findBySubjectsInGroup(GrouperSession grouperSession, Set<Subject> subjects, Group group, Field field, MembershipType membershipType) convert a set of subjects to a set of members- Specified by:
findBySubjectsInGroupin interfaceMemberDAO- Parameters:
grouperSession-subjects- to convert to membersgroup- that subjects must be infield- that they must be in in the group (null will default to eh members listmembershipType- that they must be in in the group or null for any- Returns:
- the members in the group
- See Also:
-
findByUuidOrSubject
public Member findByUuidOrSubject(String uuid, String subjectId, String source, boolean exceptionIfNull) Description copied from interface:MemberDAOfind a member by uuid or subject id- Specified by:
findByUuidOrSubjectin interfaceMemberDAO- Returns:
- the member
- See Also:
-
saveUpdateProperties
Description copied from interface:MemberDAOsave the udpate properties which are auto saved when business method is called- Specified by:
saveUpdatePropertiesin interfaceMemberDAO- See Also:
-
findAllUsed
Description copied from interface:MemberDAOfind all members that are used somewhere (e.g. memberships or attributes)- Specified by:
findAllUsedin interfaceMemberDAO- Returns:
- the members
- Throws:
GrouperDAOException- See Also:
-
findAllMemberIdsForUnresolvableCheck
Description copied from interface:MemberDAOReturns member ids that are checked by USDU- Specified by:
findAllMemberIdsForUnresolvableCheckin interfaceMemberDAO- Returns:
- set of member ids
- Throws:
GrouperDAOException
-
findAllDeletedGroupMemberIdsIncorrectSubjectResolutionAttributes
Description copied from interface:MemberDAOReturns member ids for deleted groups and local entities that are deleted but still marked as resolvable or not deleted.- Specified by:
findAllDeletedGroupMemberIdsIncorrectSubjectResolutionAttributesin interfaceMemberDAO- Returns:
- set of member ids
-
findAllMemberIdsNoLongerSubjectResolutionEligible
Description copied from interface:MemberDAOReturns member ids that need to have subject resolution eligible updated to F- Specified by:
findAllMemberIdsNoLongerSubjectResolutionEligiblein interfaceMemberDAO- Returns:
- set of member ids
-
selectByDataProvider
get all the members that are assigned in a data provider to fields or rows- Specified by:
selectByDataProviderin interfaceMemberDAO- Parameters:
dataProviderInternalId-- Returns:
- the member internal ids
-
findByIds
Description copied from interface:MemberDAOfind by ids secure -
getAllMembersSecure
public Set<Member> getAllMembersSecure(GrouperSession grouperSession, QueryOptions queryOptions, String idOfAttributeDefName, Object attributeValue, Set<Object> attributeValuesOnAssignment, Boolean attributeCheckReadOnAttributeDef, String idOfAttributeDefName2, Object attributeValue2, Set<Object> attributeValuesOnAssignment2) Description copied from interface:MemberDAOget all members secure- Specified by:
getAllMembersSecurein interfaceMemberDAOidOfAttributeDefName- if looking for members that have this attribute def nameattributeValue- if looking for members that have this attribute value on the attribute def nameattributeValuesOnAssignment- if looking for an attribute value on an assignment, could be multiple valuesattributeCheckReadOnAttributeDef- use security around attribute def? default is trueidOfAttributeDefName2- if looking for members that have this attribute def name2attributeValue2- if looking for members that have this attribute value2 on the attribute def name2attributeValuesOnAssignment2- if looking for an attribute value on an assignment2, could be multiple values- Returns:
- set of member
- See Also:
-
getUnresolvableMembers
- Specified by:
getUnresolvableMembersin interfaceMemberDAOdeleted- true - return unresolvable members that are deleted false - return unresolvable members that are not deleted null - return all unresolvable members- Returns:
- unresolvable members
-
findByIdIndex
public Member findByIdIndex(Long idIndex, boolean exceptionIfNotFound) throws MemberNotFoundException not a secure method, find by id index- Specified by:
findByIdIndexin interfaceMemberDAO- Returns:
- member
- Throws:
MemberNotFoundException
-