Class Hib3AttributeDefDAO
java.lang.Object
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefDAO
- All Implemented Interfaces:
AttributeDefDAO
,GrouperDAO
Data Access Object for attribute def
- Version:
- $Id: Hib3AttributeDefDAO.java,v 1.6 2009-10-26 02:26:07 mchyzer Exp $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
assignFilterToQuery
(String filter, Boolean splitScope, StringBuilder whereClause, ByHqlStatic byHqlStatic, boolean findByUuidOrName, String alias) static void
attributeDefCacheAsRootIdsAndNamesAdd
(AttributeDef attributeDef) mark an attribute def as supposed to be cached, and put it in the cachestatic boolean
attributeDefCacheAsRootIdsAndNamesContains
(Object attributeDefIdOrName) static void
remove all cachesstatic void
attributeDefCacheRemove
(AttributeDef attributeDef) remove this from all cachesvoid
delete
(AttributeDef attributeDef) delete the attribute deffindAllAttributeDefsFromNamesSecure
(String scope, boolean splitScope, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> attributeDefNameIds) do a query based on various paramsfindAllAttributeDefsSecure
(String scope, boolean splitScope, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> attributeDefIds) do a query based on various paramsfindAllAttributeDefsSecure
(String scope, boolean splitScope, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> totalAttributeDefIds, Collection<String> totalNamesOfAttributeDefs) do a query based on various paramsfindAttributeDefsInStemWithoutPrivilege
(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString) see which attributeDefs do not have this privilegefindAttributeDefsInStemWithPrivilege
(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString) see which attributeDefs do not have this privilegefindByAttributeDefNameIdSecure
(String attributeDefNameId, boolean exceptionIfNotFound) find by attributeDefNameId.findByCreator
(Member member) find attribute defs by creatorfind by id.findById
(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) find by id.findByIdIndex
(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) not a secure method, find by id indexfindByIdIndexSecure
(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) secure method, find by id indexfindByIdSecure
(String id, boolean exceptionIfNotFound) find by id.findByIdSecure
(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) find by id.findByIdsSecure
(Collection<String> ids, QueryOptions queryOptions) find by ids securefindByName
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attribute def by name.findByNameSecure
(String name, boolean exceptionIfNotFound) find an attribute def by name.findByNameSecure
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attribute def by name.findByStem
(String id) Find all that have the given stem id.findByUuidOrName
(String id, String name, boolean exceptionIfNotFound) search for an attribute def by id or namefindByUuidOrName
(String id, String name, boolean exceptionIfNotFound, QueryOptions queryOptions) search for an attribute def by id or namegetAllAttributeDefsSecure
(GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions) get all attribute defs securegetAllAttributeDefsSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions) get all attribute defs securegetAllAttributeDefsSplitScopeSecure
(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType) get all attribute defs secure, split the scope by whitespacestatic void
massageSortFields
(QuerySort querySort) if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDbstatic void
massageSortFields
(QuerySort querySort, String alias) if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDbvoid
saveOrUpdate
(AttributeDef attributeDef) insert or update an attribute def objectvoid
saveUpdateProperties
(AttributeDef attributeDef) save the update properties which are auto saved when business method is calledMethods 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
-
Hib3AttributeDefDAO
public Hib3AttributeDefDAO()
-
-
Method Details
-
attributeDefCacheClear
public static void attributeDefCacheClear()remove all caches -
findByIdSecure
Description copied from interface:AttributeDefDAO
find by id. This is a secure method, a grouperSession needs to be open- Specified by:
findByIdSecure
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null if not there
- See Also:
-
findByIdSecure
public AttributeDef findByIdSecure(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) Description copied from interface:AttributeDefDAO
find by id. This is a secure method, a grouperSession needs to be open- Specified by:
findByIdSecure
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null if not there
- See Also:
-
findById
Description copied from interface:AttributeDefDAO
find by id. This is NOT a secure method, a grouperSession does not need to be open- Specified by:
findById
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null if not there
- See Also:
-
findById
Description copied from interface:AttributeDefDAO
find by id. This is NOT a secure method, a grouperSession does not need to be open- Specified by:
findById
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null if not there
- See Also:
-
saveOrUpdate
Description copied from interface:AttributeDefDAO
insert or update an attribute def object- Specified by:
saveOrUpdate
in interfaceAttributeDefDAO
- See Also:
-
findByNameSecure
public AttributeDef findByNameSecure(String name, boolean exceptionIfNotFound) throws GrouperDAOException, AttributeDefNotFoundException Description copied from interface:AttributeDefDAO
find an attribute def by name. this is a secure method, a grouperSession needs to be open- Specified by:
findByNameSecure
in interfaceAttributeDefDAO
- Returns:
- attribute def
- Throws:
GrouperDAOException
AttributeDefNotFoundException
- See Also:
-
findByNameSecure
public AttributeDef findByNameSecure(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) throws GrouperDAOException, AttributeDefNotFoundException Description copied from interface:AttributeDefDAO
find an attribute def by name. this is a secure method, a grouperSession needs to be open- Specified by:
findByNameSecure
in interfaceAttributeDefDAO
- Returns:
- attribute def
- Throws:
GrouperDAOException
AttributeDefNotFoundException
- See Also:
-
findByAttributeDefNameIdSecure
public AttributeDef findByAttributeDefNameIdSecure(String attributeDefNameId, boolean exceptionIfNotFound) Description copied from interface:AttributeDefDAO
find by attributeDefNameId. This is a secure method, a grouperSession needs to be open- Specified by:
findByAttributeDefNameIdSecure
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null if not there
- See Also:
-
findByStem
Description copied from interface:AttributeDefDAO
Find all that have the given stem id.- Specified by:
findByStem
in interfaceAttributeDefDAO
- Returns:
- set of stems
- See Also:
-
findByUuidOrName
Description copied from interface:AttributeDefDAO
search for an attribute def by id or name- Specified by:
findByUuidOrName
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null
- See Also:
-
findByUuidOrName
public AttributeDef findByUuidOrName(String id, String name, boolean exceptionIfNotFound, QueryOptions queryOptions) Description copied from interface:AttributeDefDAO
search for an attribute def by id or name- Specified by:
findByUuidOrName
in interfaceAttributeDefDAO
- Returns:
- the attribute def or null
- See Also:
-
saveUpdateProperties
Description copied from interface:AttributeDefDAO
save the update properties which are auto saved when business method is called- Specified by:
saveUpdateProperties
in interfaceAttributeDefDAO
- See Also:
-
delete
Description copied from interface:AttributeDefDAO
delete the attribute def- Specified by:
delete
in interfaceAttributeDefDAO
- See Also:
-
getAllAttributeDefsSecure
public Set<AttributeDef> getAllAttributeDefsSecure(GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions) Description copied from interface:AttributeDefDAO
get all attribute defs secure- Specified by:
getAllAttributeDefsSecure
in interfaceAttributeDefDAO
- Returns:
- attribute defs
- See Also:
-
getAllAttributeDefsSecure
public Set<AttributeDef> getAllAttributeDefsSecure(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions) Description copied from interface:AttributeDefDAO
get all attribute defs secure- Specified by:
getAllAttributeDefsSecure
in interfaceAttributeDefDAO
- Returns:
- set of attribute defs
- See Also:
-
findByCreator
find attribute defs by creator- Specified by:
findByCreator
in interfaceAttributeDefDAO
- Parameters:
member
-- Returns:
- the attribute defs
-
assignFilterToQuery
public static String assignFilterToQuery(String filter, Boolean splitScope, StringBuilder whereClause, ByHqlStatic byHqlStatic, boolean findByUuidOrName, String alias) - Parameters:
byHqlStatic
-filter
-splitScope
- default truewhereClause
-findByUuidOrName
- generally this is falsealias
- e.g. theGroup whatever alias in hql query- Returns:
- scope lowercased
-
findAttributeDefsInStemWithoutPrivilege
public Set<AttributeDef> findAttributeDefsInStemWithoutPrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString) Description copied from interface:AttributeDefDAO
see which attributeDefs do not have this privilege- Specified by:
findAttributeDefsInStemWithoutPrivilege
in interfaceAttributeDefDAO
- Returns:
- the attributeDefs
- See Also:
-
getAllAttributeDefsSplitScopeSecure
public Set<AttributeDef> getAllAttributeDefsSplitScopeSecure(String scope, GrouperSession grouperSession, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType) Description copied from interface:AttributeDefDAO
get all attribute defs secure, split the scope by whitespace- Specified by:
getAllAttributeDefsSplitScopeSecure
in interfaceAttributeDefDAO
- Returns:
- set of attribute defs
- See Also:
-
massageSortFields
if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDb- Parameters:
querySort
-
-
massageSortFields
if there are sort fields, go through them, and replace name with nameDb, etc, extension for extensionDb- Parameters:
querySort
-alias
-
-
findByIdIndex
public AttributeDef findByIdIndex(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws AttributeDefNotFoundException not a secure method, find by id index- Specified by:
findByIdIndex
in interfaceAttributeDefDAO
- Throws:
AttributeDefNotFoundException
-
findByIdIndexSecure
public AttributeDef findByIdIndexSecure(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws AttributeDefNotFoundException secure method, find by id index- Specified by:
findByIdIndexSecure
in interfaceAttributeDefDAO
- Throws:
AttributeDefNotFoundException
-
findByIdsSecure
Description copied from interface:AttributeDefDAO
find by ids secure- Specified by:
findByIdsSecure
in interfaceAttributeDefDAO
- Returns:
- the attributeDefs or null or exception
- See Also:
-
findAllAttributeDefsSecure
public Set<AttributeDef> findAllAttributeDefsSecure(String scope, boolean splitScope, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> totalAttributeDefIds, Collection<String> totalNamesOfAttributeDefs) Description copied from interface:AttributeDefDAO
do a query based on various params- Specified by:
findAllAttributeDefsSecure
in interfaceAttributeDefDAO
- Returns:
- the result set
- See Also:
-
findAttributeDefsInStemWithPrivilege
public Set<AttributeDef> findAttributeDefsInStemWithPrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString) Description copied from interface:AttributeDefDAO
see which attributeDefs do not have this privilege- Specified by:
findAttributeDefsInStemWithPrivilege
in interfaceAttributeDefDAO
- Returns:
- the attributeDefs
- See Also:
-
attributeDefCacheAsRootIdsAndNamesAdd
mark an attribute def as supposed to be cached, and put it in the cache- Parameters:
attributeDef
-
-
attributeDefCacheAsRootIdsAndNamesContains
- Parameters:
attributeDefIdOrName
- or id index- Returns:
- if this is cached
-
attributeDefCacheRemove
remove this from all caches- Parameters:
attributeDef
-
-
findByName
public AttributeDef findByName(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) throws GrouperDAOException, AttributeDefNotFoundException Description copied from interface:AttributeDefDAO
find an attribute def by name. this is a secure method, a grouperSession needs to be open- Specified by:
findByName
in interfaceAttributeDefDAO
- Returns:
- attribute def
- Throws:
GrouperDAOException
AttributeDefNotFoundException
- See Also:
-
findAllAttributeDefsFromNamesSecure
public Set<AttributeDef> findAllAttributeDefsFromNamesSecure(String scope, boolean splitScope, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> attributeDefNameIds) Description copied from interface:AttributeDefDAO
do a query based on various params- Specified by:
findAllAttributeDefsFromNamesSecure
in interfaceAttributeDefDAO
- Returns:
- the result set
- See Also:
-
findAllAttributeDefsSecure
public Set<AttributeDef> findAllAttributeDefsSecure(String scope, boolean splitScope, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> attributeDefIds) Description copied from interface:AttributeDefDAO
do a query based on various params- Specified by:
findAllAttributeDefsSecure
in interfaceAttributeDefDAO
- Returns:
- the result set
-