Class Hib3AttributeDefNameDAO
java.lang.Object
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefNameDAO
- All Implemented Interfaces:
AttributeDefNameDAO
,GrouperDAO
Data Access Object for attribute def name
- Version:
- $Id: Hib3AttributeDefNameDAO.java,v 1.6 2009-11-17 02:52:29 mchyzer Exp $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
attributeDefNameCacheAsRootIdsAndNamesAdd
(AttributeDefName attributeDefName) static boolean
attributeDefNameCacheAsRootIdsAndNamesContains
(Object uuidOrNameOfAttributeDefName) static void
remove all cachesstatic void
attributeDefNameCacheRemove
(AttributeDefName attributeDefName) remove this from all cachesvoid
delete
(AttributeDefName attributeDefName) delete this attribute def namefindAllAttributeNamesSecure
(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType) get all attribute names secure, split the scope by whitespacefindAllAttributeNamesSecure
(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType, ServiceRole serviceRole, boolean anyServiceRole) get all attribute names secure, split the scope by whitespacefindAllAttributeNamesSecure
(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType, ServiceRole serviceRole, boolean anyServiceRole, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName) get all attribute names secure, split the scope by whitespacefindAllAttributeNamesSecure
(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType, ServiceRole serviceRole, boolean anyServiceRole, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Set<String> idsOfAttributeDefNames, Collection<String> namesOfAttributeDefNames) get all attribute names secure, split the scope by whitespacefindAllAttributeNamesSplitScopeSecure
(String scope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType) get all attribute names secure, split the scope by whitespacefindAllSecure
(String searchField, Set<String> searchInAttributeDefIds, QueryOptions queryOptions) search for attributeDefName by name, display name, or description.Find all that have the given attribute def id.findByAttributeDefLike
(String attributeDefId, String likeString) search for all by attribute def id, and like stringfindByIdIndex
(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) findByIdSecure
(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) findByIdsSecure
(Collection<String> ids, QueryOptions queryOptions) find by ids securefindByName
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attribute def name by name as root (no security)findByNameSecure
(String name, boolean exceptionIfNotFound) find an attribute def name by namefindByNameSecure
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attribute def name by namefindByStem
(String id) Find all that have the given stem id.findByUuidOrName
(String id, String name, boolean exceptionIfNotFound) find a record by uuid or namefindByUuidOrName
(String id, String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find a record by uuid or namefindLegacyAttributeByName
(String name, boolean exceptionIfNull) Returns legacy attribute that was either migrated or created in the new attribute framework.void
saveOrUpdate
(AttributeDefName attributeDefName) insert or update an attribute def name objectvoid
saveUpdateProperties
(AttributeDefName attributeDefName) 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
-
Hib3AttributeDefNameDAO
public Hib3AttributeDefNameDAO()
-
-
Method Details
-
attributeDefNameCacheClear
public static void attributeDefNameCacheClear()remove all caches -
findByIdSecure
- Specified by:
findByIdSecure
in interfaceAttributeDefNameDAO
- Returns:
- the attribute def name or null if not there
- See Also:
-
findByIdSecure
public AttributeDefName findByIdSecure(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) - Specified by:
findByIdSecure
in interfaceAttributeDefNameDAO
- Returns:
- the attribute def name or null if not there
- See Also:
-
findById
- Specified by:
findById
in interfaceAttributeDefNameDAO
- Returns:
- the attribute def name or null if not there
- See Also:
-
saveOrUpdate
Description copied from interface:AttributeDefNameDAO
insert or update an attribute def name object- Specified by:
saveOrUpdate
in interfaceAttributeDefNameDAO
- See Also:
-
findByNameSecure
public AttributeDefName findByNameSecure(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) throws GrouperDAOException, AttributeDefNameNotFoundException Description copied from interface:AttributeDefNameDAO
find an attribute def name by name- Specified by:
findByNameSecure
in interfaceAttributeDefNameDAO
- Returns:
- name
- Throws:
GrouperDAOException
AttributeDefNameNotFoundException
- See Also:
-
findByNameSecure
public AttributeDefName findByNameSecure(String name, boolean exceptionIfNotFound) throws GrouperDAOException, AttributeDefNameNotFoundException Description copied from interface:AttributeDefNameDAO
find an attribute def name by name- Specified by:
findByNameSecure
in interfaceAttributeDefNameDAO
- Returns:
- name
- Throws:
GrouperDAOException
AttributeDefNameNotFoundException
- See Also:
-
delete
Description copied from interface:AttributeDefNameDAO
delete this attribute def name- Specified by:
delete
in interfaceAttributeDefNameDAO
- See Also:
-
findByStem
Description copied from interface:AttributeDefNameDAO
Find all that have the given stem id.- Specified by:
findByStem
in interfaceAttributeDefNameDAO
- Returns:
- set of attribute def names
- See Also:
-
findByUuidOrName
Description copied from interface:AttributeDefNameDAO
find a record by uuid or name- Specified by:
findByUuidOrName
in interfaceAttributeDefNameDAO
- Returns:
- the attribute def name
- See Also:
-
findByUuidOrName
public AttributeDefName findByUuidOrName(String id, String name, boolean exceptionIfNotFound, QueryOptions queryOptions) Description copied from interface:AttributeDefNameDAO
find a record by uuid or name- Specified by:
findByUuidOrName
in interfaceAttributeDefNameDAO
- Returns:
- the attribute def name
- See Also:
-
saveUpdateProperties
Description copied from interface:AttributeDefNameDAO
save the update properties which are auto saved when business method is called- Specified by:
saveUpdateProperties
in interfaceAttributeDefNameDAO
- See Also:
-
findByAttributeDef
Description copied from interface:AttributeDefNameDAO
Find all that have the given attribute def id.- Specified by:
findByAttributeDef
in interfaceAttributeDefNameDAO
- Returns:
- set of attribute def names
- See Also:
-
findAllSecure
public Set<AttributeDefName> findAllSecure(String searchField, Set<String> searchInAttributeDefIds, QueryOptions queryOptions) Description copied from interface:AttributeDefNameDAO
search for attributeDefName by name, display name, or description. This is a secure method, a GrouperSession must be open. Note, you should add the % signs before calling this method- Specified by:
findAllSecure
in interfaceAttributeDefNameDAO
- Parameters:
searchField
- substring to search forsearchInAttributeDefIds
- ids to search in or null for all- Returns:
- the attribute def names or empty set
- See Also:
-
findByAttributeDefLike
Description copied from interface:AttributeDefNameDAO
search for all by attribute def id, and like string- Specified by:
findByAttributeDefLike
in interfaceAttributeDefNameDAO
- Returns:
- the attribute def names or empty set
- See Also:
-
findAllAttributeNamesSecure
public Set<AttributeDefName> findAllAttributeNamesSecure(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType) Description copied from interface:AttributeDefNameDAO
get all attribute names secure, split the scope by whitespace- Specified by:
findAllAttributeNamesSecure
in interfaceAttributeDefNameDAO
attributeDefId
- optional if filtering by names in a certain attribute definition- Returns:
- set of attribute defs
- See Also:
-
findByIdIndex
public AttributeDefName findByIdIndex(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws AttributeDefNameNotFoundException not a secure method, find by id index- Specified by:
findByIdIndex
in interfaceAttributeDefNameDAO
- Throws:
AttributeDefNameNotFoundException
-
findByIdIndexSecure
public AttributeDefName findByIdIndexSecure(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws AttributeDefNameNotFoundException secure method, find by id index- Specified by:
findByIdIndexSecure
in interfaceAttributeDefNameDAO
- Throws:
AttributeDefNameNotFoundException
-
findAllAttributeNamesSecure
public Set<AttributeDefName> findAllAttributeNamesSecure(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType, ServiceRole serviceRole, boolean anyServiceRole) Description copied from interface:AttributeDefNameDAO
get all attribute names secure, split the scope by whitespace- Specified by:
findAllAttributeNamesSecure
in interfaceAttributeDefNameDAO
attributeDefId
- optional if filtering by names in a certain attribute definitionanyServiceRole
- will see if the user has any role in a service, and return those services- Returns:
- set of attribute defs
- See Also:
-
findAllAttributeNamesSplitScopeSecure
public Set<AttributeDefName> findAllAttributeNamesSplitScopeSecure(String scope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType) Description copied from interface:AttributeDefNameDAO
get all attribute names secure, split the scope by whitespace- Specified by:
findAllAttributeNamesSplitScopeSecure
in interfaceAttributeDefNameDAO
attributeDefId
- optional if filtering by names in a certain attribute definition- Returns:
- set of attribute defs
- See Also:
-
findLegacyAttributeByName
Description copied from interface:AttributeDefNameDAO
Returns legacy attribute that was either migrated or created in the new attribute framework.- Specified by:
findLegacyAttributeByName
in interfaceAttributeDefNameDAO
- Parameters:
name
- the name of the legacy attribute (without prefix or path)- Returns:
- attribute def name
- See Also:
-
findByIdsSecure
Description copied from interface:AttributeDefNameDAO
find by ids secure- Specified by:
findByIdsSecure
in interfaceAttributeDefNameDAO
- Returns:
- the attributeDefNames or null or exception
- See Also:
-
findAllAttributeNamesSecure
public Set<AttributeDefName> findAllAttributeNamesSecure(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType, ServiceRole serviceRole, boolean anyServiceRole, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName) Description copied from interface:AttributeDefNameDAO
get all attribute names secure, split the scope by whitespace- Specified by:
findAllAttributeNamesSecure
in interfaceAttributeDefNameDAO
attributeDefId
- optional if filtering by names in a certain attribute definitionanyServiceRole
- will see if the user has any role in a service, and return those servicesparentStemId
- is the id of the parent or ancestor of the object returnedstemScope
- is if the stem scope is ONE or SUBfindByUuidOrName
- if looking for attribute def names by uuid or name- Returns:
- set of attribute defs
- See Also:
-
findAllAttributeNamesSecure
public Set<AttributeDefName> findAllAttributeNamesSecure(String scope, boolean splitScope, GrouperSession grouperSession, String attributeDefId, Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType, ServiceRole serviceRole, boolean anyServiceRole, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Set<String> idsOfAttributeDefNames, Collection<String> namesOfAttributeDefNames) Description copied from interface:AttributeDefNameDAO
get all attribute names secure, split the scope by whitespace- Specified by:
findAllAttributeNamesSecure
in interfaceAttributeDefNameDAO
attributeDefId
- optional if filtering by names in a certain attribute definitionanyServiceRole
- will see if the user has any role in a service, and return those servicesparentStemId
- is the id of the parent or ancestor of the object returnedstemScope
- is if the stem scope is ONE or SUBfindByUuidOrName
- if looking for attribute def names by uuid or nameidsOfAttributeDefNames
- ids of attribute def names to lookupnamesOfAttributeDefNames
- names of attribute def names to lookup- Returns:
- set of attribute defs
- See Also:
-
AttributeDefNameDAO#findAllAttributeNamesSecure(String, boolean, GrouperSession, String, Subject, Set, QueryOptions, AttributeAssignType, AttributeDefType, ServiceRole, boolean, String, Scope, boolean, Set, Set)
-
attributeDefNameCacheAsRootIdsAndNamesAdd
- Parameters:
attributeDefName
-
-
attributeDefNameCacheAsRootIdsAndNamesContains
public static boolean attributeDefNameCacheAsRootIdsAndNamesContains(Object uuidOrNameOfAttributeDefName) - Parameters:
uuidOrNameOfAttributeDefName
- or id index- Returns:
- if should be cached
-
attributeDefNameCacheRemove
remove this from all caches- Parameters:
attributeDefName
-
-
findByName
public AttributeDefName findByName(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) throws GrouperDAOException, AttributeDefNameNotFoundException Description copied from interface:AttributeDefNameDAO
find an attribute def name by name as root (no security)- Specified by:
findByName
in interfaceAttributeDefNameDAO
- Returns:
- name
- Throws:
GrouperDAOException
AttributeDefNameNotFoundException
- See Also:
-