edu.internet2.middleware.grouper.internal.dao.hib3
Class Hib3AttributeDefDAO

java.lang.Object
  extended by edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
      extended by edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefDAO
All Implemented Interfaces:
AttributeDefDAO, GrouperDAO

public class Hib3AttributeDefDAO
extends Hib3DAO
implements AttributeDefDAO

Data Access Object for attribute def

Version:
$Id: Hib3AttributeDefDAO.java,v 1.6 2009-10-26 02:26:07 mchyzer Exp $
Author:
mchyzer

Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
hibernateInitted
 
Constructor Summary
Hib3AttributeDefDAO()
           
 
Method Summary
 void delete(AttributeDef attributeDef)
          delete the attribute def
 Set<AttributeDef> findAllAttributeDefsSecure(String scope, boolean splitScope, edu.internet2.middleware.subject.Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, String parentStemId, Stem.Scope stemScope, boolean findByUuidOrName, Collection<String> totalAttributeDefIds)
          do a query based on various params
 Set<AttributeDef> findAttributeDefsInStemWithoutPrivilege(GrouperSession grouperSession, String stemId, Stem.Scope scope, edu.internet2.middleware.subject.Subject subject, Privilege privilege, QueryOptions queryOptions, boolean considerAllSubject, String sqlLikeString)
          see which attributeDefs do not have this privilege
 AttributeDef findByAttributeDefNameIdSecure(String attributeDefNameId, boolean exceptionIfNotFound)
          find by attributeDefNameId.
 AttributeDef findById(String id, boolean exceptionIfNotFound)
          find by id.
 AttributeDef findById(String id, boolean exceptionIfNotFound, QueryOptions queryOptions)
          find by id.
 AttributeDef findByIdIndex(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions)
          not a secure method, find by id index
 AttributeDef findByIdIndexSecure(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions)
          secure method, find by id index
 AttributeDef findByIdSecure(String id, boolean exceptionIfNotFound)
          find by id.
 AttributeDef findByIdSecure(String id, boolean exceptionIfNotFound, QueryOptions queryOptions)
          find by id.
 Set<AttributeDef> findByIdsSecure(Collection<String> ids, QueryOptions queryOptions)
          find by ids secure
 AttributeDef findByNameSecure(String name, boolean exceptionIfNotFound)
          find an attribute def by name.
 AttributeDef findByNameSecure(String name, boolean exceptionIfNotFound, QueryOptions queryOptions)
          find an attribute def by name.
 Set<AttributeDef> findByStem(String id)
          Find all that have the given stem id.
 AttributeDef findByUuidOrName(String id, String name, boolean exceptionIfNotFound)
          search for an attribute def by id or name
 AttributeDef findByUuidOrName(String id, String name, boolean exceptionIfNotFound, QueryOptions queryOptions)
          search for an attribute def by id or name
 Set<AttributeDef> getAllAttributeDefsSecure(GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> privileges, QueryOptions queryOptions)
          get all attribute defs secure
 Set<AttributeDef> getAllAttributeDefsSecure(String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> privileges, QueryOptions queryOptions)
          get all attribute defs secure
 Set<AttributeDef> getAllAttributeDefsSplitScopeSecure(String scope, GrouperSession grouperSession, edu.internet2.middleware.subject.Subject subject, Set<Privilege> privileges, QueryOptions queryOptions, AttributeAssignType attributeAssignType, AttributeDefType attributeDefType)
          get all attribute defs secure, split the scope by whitespace
 void saveOrUpdate(AttributeDef attributeDef)
          insert or update an attribute def object
 void saveUpdateProperties(AttributeDef attributeDef)
          save the update properties which are auto saved when business method is called
 
Methods inherited from class edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
evict, evictEntity, evictQueries, getConfiguration, getSessionFactory, initHibernateIfNotInitted, resourceNameFromClassName, session
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hib3AttributeDefDAO

public Hib3AttributeDefDAO()
Method Detail

findByIdSecure

public AttributeDef findByIdSecure(String id,
                                   boolean exceptionIfNotFound)
Description copied from interface: AttributeDefDAO
find by id. This is a secure method, a grouperSession needs to be open

Specified by:
findByIdSecure in interface AttributeDefDAO
Returns:
the attribute def or null if not there
See Also:
AttributeDefDAO.findByIdSecure(java.lang.String, boolean)

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 interface AttributeDefDAO
Returns:
the attribute def or null if not there
See Also:
AttributeDefDAO.findByIdSecure(String, boolean, QueryOptions)

findById

public AttributeDef findById(String id,
                             boolean exceptionIfNotFound)
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 interface AttributeDefDAO
Returns:
the attribute def or null if not there
See Also:
AttributeDefDAO.findById(java.lang.String, boolean)

findById

public AttributeDef findById(String id,
                             boolean exceptionIfNotFound,
                             QueryOptions queryOptions)
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 interface AttributeDefDAO
Returns:
the attribute def or null if not there
See Also:
AttributeDefDAO.findById(java.lang.String, boolean, QueryOptions)

saveOrUpdate

public void saveOrUpdate(AttributeDef attributeDef)
Description copied from interface: AttributeDefDAO
insert or update an attribute def object

Specified by:
saveOrUpdate in interface AttributeDefDAO
See Also:
AttributeDefDAO.saveOrUpdate(edu.internet2.middleware.grouper.attr.AttributeDef)

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 interface AttributeDefDAO
Returns:
attribute def
Throws:
GrouperDAOException
AttributeDefNotFoundException
See Also:
AttributeDefDAO.findByNameSecure(java.lang.String, boolean)

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 interface AttributeDefDAO
Returns:
attribute def
Throws:
GrouperDAOException
AttributeDefNotFoundException
See Also:
AttributeDefDAO.findByNameSecure(java.lang.String, boolean)

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 interface AttributeDefDAO
Returns:
the attribute def or null if not there
See Also:
AttributeDefDAO.findByAttributeDefNameIdSecure(java.lang.String, boolean)

findByStem

public Set<AttributeDef> findByStem(String id)
Description copied from interface: AttributeDefDAO
Find all that have the given stem id.

Specified by:
findByStem in interface AttributeDefDAO
Returns:
set of stems
See Also:
AttributeDefDAO.findByStem(java.lang.String)

findByUuidOrName

public AttributeDef findByUuidOrName(String id,
                                     String name,
                                     boolean exceptionIfNotFound)
Description copied from interface: AttributeDefDAO
search for an attribute def by id or name

Specified by:
findByUuidOrName in interface AttributeDefDAO
Returns:
the attribute def or null
See Also:
AttributeDefDAO.findByUuidOrName(java.lang.String, java.lang.String, boolean)

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 interface AttributeDefDAO
Returns:
the attribute def or null
See Also:
AttributeDefDAO.findByUuidOrName(java.lang.String, java.lang.String, boolean)

saveUpdateProperties

public void saveUpdateProperties(AttributeDef attributeDef)
Description copied from interface: AttributeDefDAO
save the update properties which are auto saved when business method is called

Specified by:
saveUpdateProperties in interface AttributeDefDAO
See Also:
AttributeDefDAO.saveUpdateProperties(edu.internet2.middleware.grouper.attr.AttributeDef)

delete

public void delete(AttributeDef attributeDef)
Description copied from interface: AttributeDefDAO
delete the attribute def

Specified by:
delete in interface AttributeDefDAO
See Also:
AttributeDefDAO.delete(edu.internet2.middleware.grouper.attr.AttributeDef)

getAllAttributeDefsSecure

public Set<AttributeDef> getAllAttributeDefsSecure(GrouperSession grouperSession,
                                                   edu.internet2.middleware.subject.Subject subject,
                                                   Set<Privilege> privileges,
                                                   QueryOptions queryOptions)
Description copied from interface: AttributeDefDAO
get all attribute defs secure

Specified by:
getAllAttributeDefsSecure in interface AttributeDefDAO
Returns:
attribute defs
See Also:
AttributeDefDAO.getAllAttributeDefsSecure(edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

getAllAttributeDefsSecure

public Set<AttributeDef> getAllAttributeDefsSecure(String scope,
                                                   GrouperSession grouperSession,
                                                   edu.internet2.middleware.subject.Subject subject,
                                                   Set<Privilege> privileges,
                                                   QueryOptions queryOptions)
Description copied from interface: AttributeDefDAO
get all attribute defs secure

Specified by:
getAllAttributeDefsSecure in interface AttributeDefDAO
Returns:
set of attribute defs
See Also:
AttributeDefDAO.getAllAttributeDefsSecure(java.lang.String, edu.internet2.middleware.grouper.GrouperSession, edu.internet2.middleware.subject.Subject, java.util.Set, edu.internet2.middleware.grouper.internal.dao.QueryOptions)

findAttributeDefsInStemWithoutPrivilege

public Set<AttributeDef> findAttributeDefsInStemWithoutPrivilege(GrouperSession grouperSession,
                                                                 String stemId,
                                                                 Stem.Scope scope,
                                                                 edu.internet2.middleware.subject.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 interface AttributeDefDAO
Returns:
the attributeDefs
See Also:
AttributeDefDAO#findAttributeDefsInStemWithoutPrivilege(GrouperSession, String, Scope, Subject, Privilege, QueryOptions, boolean, String)

getAllAttributeDefsSplitScopeSecure

public Set<AttributeDef> getAllAttributeDefsSplitScopeSecure(String scope,
                                                             GrouperSession grouperSession,
                                                             edu.internet2.middleware.subject.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 interface AttributeDefDAO
Returns:
set of attribute defs
See Also:
AttributeDefDAO.getAllAttributeDefsSplitScopeSecure(String, GrouperSession, Subject, Set, QueryOptions, AttributeAssignType, AttributeDefType)

findByIdIndex

public AttributeDef findByIdIndex(Long idIndex,
                                  boolean exceptionIfNotFound,
                                  QueryOptions queryOptions)
                           throws AttributeDefNotFoundException
not a secure method, find by id index

Specified by:
findByIdIndex in interface AttributeDefDAO
Throws:
AttributeDefNotFoundException

findByIdIndexSecure

public AttributeDef findByIdIndexSecure(Long idIndex,
                                        boolean exceptionIfNotFound,
                                        QueryOptions queryOptions)
                                 throws AttributeDefNotFoundException
secure method, find by id index

Specified by:
findByIdIndexSecure in interface AttributeDefDAO
Throws:
AttributeDefNotFoundException

findByIdsSecure

public Set<AttributeDef> findByIdsSecure(Collection<String> ids,
                                         QueryOptions queryOptions)
Description copied from interface: AttributeDefDAO
find by ids secure

Specified by:
findByIdsSecure in interface AttributeDefDAO
Returns:
the attributeDefs or null or exception
See Also:
AttributeDefDAO.findByIdsSecure(Collection, QueryOptions)

findAllAttributeDefsSecure

public Set<AttributeDef> findAllAttributeDefsSecure(String scope,
                                                    boolean splitScope,
                                                    edu.internet2.middleware.subject.Subject subject,
                                                    Set<Privilege> privileges,
                                                    QueryOptions queryOptions,
                                                    String parentStemId,
                                                    Stem.Scope stemScope,
                                                    boolean findByUuidOrName,
                                                    Collection<String> totalAttributeDefIds)
Description copied from interface: AttributeDefDAO
do a query based on various params

Specified by:
findAllAttributeDefsSecure in interface AttributeDefDAO
Returns:
the result set
See Also:
AttributeDefDAO#findAllAttributeDefsSecure(String, boolean, Subject, Set, QueryOptions, String, Scope, boolean, Collection)