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
Modifier and TypeFieldDescriptionstatic int
number of subjects to put in member query -
Constructor Summary
-
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 groupsvoid
boolean
void
existsCachePut
(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 securefindBySubject
(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 void
massageMemberSortFields
(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
massageMemberSortFields
(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 void
remove all cachesstatic void
membersCacheRemove
(Member member) remove this from all cachesprotected static void
reset
(HibernateSession hibernateSession) void
saveUpdateProperties
(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 rowsvoid
void
uuid2dtoCacheRemove
(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:
create
in interfaceMemberDAO
- Throws:
GrouperDAOException
- Since:
-
exists
- Specified by:
exists
in interfaceMemberDAO
- Throws:
GrouperDAOException
- Since:
-
findAll
- Specified by:
findAll
in interfaceMemberDAO
- Throws:
GrouperDAOException
- Since:
-
findAll
- Specified by:
findAll
in interfaceMemberDAO
- Throws:
GrouperDAOException
- Since:
-
findBySubject
@Deprecated public Member findBySubject(Subject subj) throws GrouperDAOException, MemberNotFoundException Deprecated.use overload- Specified by:
findBySubject
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
-
findBySubject
public Member findBySubject(Subject subj, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException - Specified by:
findBySubject
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
-
findBySubject
@Deprecated public Member findBySubject(String id, String src, String type) throws GrouperDAOException, MemberNotFoundException Deprecated.use overload- Specified by:
findBySubject
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
-
findBySubject
public Member findBySubject(String id, String src, String type, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException - Specified by:
findBySubject
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
- 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:MemberDAO
find member by subject- Specified by:
findBySubject
in interfaceMemberDAO
- Parameters:
id
-src
-type
-exceptionIfNull
-queryOptions
-- Returns:
- member
- Throws:
GrouperDAOException
MemberNotFoundException
-
findByUuid
@Deprecated public Member findByUuid(String uuid) throws GrouperDAOException, MemberNotFoundException Deprecated.use overload- Specified by:
findByUuid
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
-
findByUuid
public Member findByUuid(String uuid, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException - Specified by:
findByUuid
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
- See Also:
-
findByUuid
public Member findByUuid(String uuid, boolean exceptionIfNull, QueryOptions queryOptions) throws GrouperDAOException, MemberNotFoundException - Specified by:
findByUuid
in interfaceMemberDAO
- Throws:
GrouperDAOException
MemberNotFoundException
-
existsCachePut
Deprecated.update the exists cache- Specified by:
existsCachePut
in 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:
uuid2dtoCacheRemove
in interfaceMemberDAO
- Parameters:
uuid
-
-
update
- Specified by:
update
in 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:MemberDAO
find by subject id only (cant be duplicates)- Specified by:
findBySubject
in interfaceMemberDAO
- Returns:
- the member
- Throws:
GrouperDAOException
MemberNotFoundException
MemberNotUniqueException
- See Also:
-
findBySubject
public Member findBySubject(String subjectId, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException, MemberNotUniqueException Description copied from interface:MemberDAO
find by subject id only (cant be duplicates)- Specified by:
findBySubject
in interfaceMemberDAO
- Returns:
- the member
- Throws:
GrouperDAOException
MemberNotFoundException
MemberNotUniqueException
-
findBySubject
@Deprecated public Member findBySubject(String subjectId, String src) throws GrouperDAOException, MemberNotFoundException Deprecated.use overloadDescription copied from interface:MemberDAO
find by subject id and source id- Specified by:
findBySubject
in interfaceMemberDAO
- Returns:
- the member
- Throws:
GrouperDAOException
MemberNotFoundException
- See Also:
-
findBySubject
public Member findBySubject(String subjectId, String src, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException Description copied from interface:MemberDAO
find by subject id and source id- Specified by:
findBySubject
in interfaceMemberDAO
- Returns:
- the member
- Throws:
GrouperDAOException
MemberNotFoundException
-
findBySubjectIdentifier
public Member findBySubjectIdentifier(String subjectIdentifier, String src, boolean exceptionIfNull) throws GrouperDAOException, MemberNotFoundException Description copied from interface:MemberDAO
find by subject identifier and source id- Specified by:
findBySubjectIdentifier
in interfaceMemberDAO
- Returns:
- the member
- Throws:
GrouperDAOException
MemberNotFoundException
-
_internal_membersIntersection
Description copied from interface:MemberDAO
find the set of member uuids of the intersection of two groups- Specified by:
_internal_membersIntersection
in interfaceMemberDAO
- Returns:
- the set of member uuids (non null)
- See Also:
-
_internal_membersUnion
Description copied from interface:MemberDAO
find the set of member uuids of the union of two groups- Specified by:
_internal_membersUnion
in interfaceMemberDAO
- Returns:
- the set of member uuids (non null)
- See Also:
-
_internal_membersComplement
Description copied from interface:MemberDAO
find the set of member uuids of the complement of two groups- Specified by:
_internal_membersComplement
in 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:
findBySubjectIds
in interfaceMemberDAO
- Parameters:
subjectIds
-subjectSourceId
-- Returns:
-
findBySubjects
find members by subjects and create if not exist possibly- Specified by:
findBySubjects
in 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:
findBySubjectsInGroup
in 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:MemberDAO
find a member by uuid or subject id- Specified by:
findByUuidOrSubject
in interfaceMemberDAO
- Returns:
- the member
- See Also:
-
saveUpdateProperties
Description copied from interface:MemberDAO
save the udpate properties which are auto saved when business method is called- Specified by:
saveUpdateProperties
in interfaceMemberDAO
- See Also:
-
findAllUsed
Description copied from interface:MemberDAO
find all members that are used somewhere (e.g. memberships or attributes)- Specified by:
findAllUsed
in interfaceMemberDAO
- Returns:
- the members
- Throws:
GrouperDAOException
- See Also:
-
findAllMemberIdsForUnresolvableCheck
Description copied from interface:MemberDAO
Returns member ids that are checked by USDU- Specified by:
findAllMemberIdsForUnresolvableCheck
in interfaceMemberDAO
- Returns:
- set of member ids
- Throws:
GrouperDAOException
-
findAllDeletedGroupMemberIdsIncorrectSubjectResolutionAttributes
Description copied from interface:MemberDAO
Returns member ids for deleted groups and local entities that are deleted but still marked as resolvable or not deleted.- Specified by:
findAllDeletedGroupMemberIdsIncorrectSubjectResolutionAttributes
in interfaceMemberDAO
- Returns:
- set of member ids
-
findAllMemberIdsNoLongerSubjectResolutionEligible
Description copied from interface:MemberDAO
Returns member ids that need to have subject resolution eligible updated to F- Specified by:
findAllMemberIdsNoLongerSubjectResolutionEligible
in interfaceMemberDAO
- Returns:
- set of member ids
-
selectByDataProvider
get all the members that are assigned in a data provider to fields or rows- Specified by:
selectByDataProvider
in interfaceMemberDAO
- Parameters:
dataProviderInternalId
-- Returns:
- the member internal ids
-
findByIds
Description copied from interface:MemberDAO
find 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:MemberDAO
get all members secure- Specified by:
getAllMembersSecure
in interfaceMemberDAO
idOfAttributeDefName
- 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:
getUnresolvableMembers
in interfaceMemberDAO
deleted
- 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:
findByIdIndex
in interfaceMemberDAO
- Returns:
- member
- Throws:
MemberNotFoundException
-