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

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

public class Hib3AttributeDefNameSetDAO
extends Hib3DAO
implements AttributeDefNameSetDAO

Data Access Object for attribute def name set

Version:
$Id: Hib3AttributeDefNameSetDAO.java,v 1.11 2009-11-17 02:52:29 mchyzer Exp $
Author:
mchyzer

Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
hibernateInitted
 
Constructor Summary
Hib3AttributeDefNameSetDAO()
           
 
Method Summary
 Set<AttributeDefName> attributeDefNamesImpliedByThis(String attributeDefNameId)
          get all the THEN rows from attributeDefNameSet about this id.
 Set<AttributeDefName> attributeDefNamesImpliedByThisImmediate(String attributeDefNameId)
          get all the THEN rows from attributeDefNameSet about this id (immediate).
 Set<AttributeDefName> attributeDefNamesThatImplyThis(String attributeDefNameId)
          get all the IF rows from attributeDefNameSet about this id.
 Set<AttributeDefName> attributeDefNamesThatImplyThisImmediate(String attributeDefNameId)
          get all the IF rows from attributeDefNameSet about this id (immediate only).
 void delete(AttributeDefNameSet attributeDefNameSet)
          delete an attribute def name set
 void deleteByIfHasAttributeDefName(AttributeDefName attributeDefName)
          delete attributeDefName sets by owner, so the attributeDefName can be deleted
 Set<AttributeDefNameSet> findByDepthOneForAttributeDef(String attributeDefId)
          find by depth one for attribute def
 AttributeDefNameSet findById(String id, boolean exceptionIfNotFound)
           
 Set<AttributeDefNameSet> findByIfHasAttributeDefNameId(String id)
          find by set owner
 Set<AttributeDefNameSet> findByIfThenHasAttributeDefNameId(String attributeDefNameSetForThens, String attributeDefNameSetForIfs)
           this will help with deletes.
 AttributeDefNameSet findByIfThenImmediate(String attributeDefNameIdIf, String attributeDefNameIdThen, boolean exceptionIfNotFound)
          find by if and then (not same) with depth of 1 (immediate)
 Set<AttributeDefNameSet> findByThenHasAttributeDefNameId(String id)
          find by member
 AttributeDefNameSet findByUuidOrKey(String id, String ifHasAttributeDefNameId, String thenHasAttributeDefNameId, String parentAttributeDefNameSetId, int depth, boolean exceptionIfNull)
          find a record by uuid or key
 void saveOrUpdate(AttributeDefNameSet attributeDefNameSet)
          insert or update an attribute def name set
 void saveUpdateProperties(AttributeDefNameSet attributeDefNameSet)
          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

Hib3AttributeDefNameSetDAO

public Hib3AttributeDefNameSetDAO()
Method Detail

findById

public AttributeDefNameSet findById(String id,
                                    boolean exceptionIfNotFound)
                             throws AttributeDefNameSetNotFoundException
Specified by:
findById in interface AttributeDefNameSetDAO
Returns:
the attribute def name set or null if not there
Throws:
AttributeDefNameSetNotFoundException
See Also:
AttributeDefNameSetDAO.findById(java.lang.String, boolean)

saveOrUpdate

public void saveOrUpdate(AttributeDefNameSet attributeDefNameSet)
Description copied from interface: AttributeDefNameSetDAO
insert or update an attribute def name set

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

findByIfHasAttributeDefNameId

public Set<AttributeDefNameSet> findByIfHasAttributeDefNameId(String id)
Description copied from interface: AttributeDefNameSetDAO
find by set owner

Specified by:
findByIfHasAttributeDefNameId in interface AttributeDefNameSetDAO
Returns:
the attribute def name set or null if not there
See Also:
AttributeDefNameSetDAO.findByIfHasAttributeDefNameId(String)

findByThenHasAttributeDefNameId

public Set<AttributeDefNameSet> findByThenHasAttributeDefNameId(String id)
Description copied from interface: AttributeDefNameSetDAO
find by member

Specified by:
findByThenHasAttributeDefNameId in interface AttributeDefNameSetDAO
Returns:
the attribute def name set or null if not there
See Also:
AttributeDefNameSetDAO.findByThenHasAttributeDefNameId(String)

findByIfThenHasAttributeDefNameId

public Set<AttributeDefNameSet> findByIfThenHasAttributeDefNameId(String attributeDefNameSetForThens,
                                                                  String attributeDefNameSetForIfs)
Description copied from interface: AttributeDefNameSetDAO
 this will help with deletes.  It will find sets who have if's which match thens provided, and thens which 
 match ifs provided.
 
 So if there is this path: A -> B -> C -> D
 And the inputs here are B and C (removing that path)
 Then return A -> C, A -> D, B -> C, B -> D
 
 

Specified by:
findByIfThenHasAttributeDefNameId in interface AttributeDefNameSetDAO
Returns:
the attribute def name set or null if not there
See Also:
AttributeDefNameSetDAO.findByIfThenHasAttributeDefNameId(java.lang.String, java.lang.String)

delete

public void delete(AttributeDefNameSet attributeDefNameSet)
Description copied from interface: AttributeDefNameSetDAO
delete an attribute def name set

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

findByIfThenImmediate

public AttributeDefNameSet findByIfThenImmediate(String attributeDefNameIdIf,
                                                 String attributeDefNameIdThen,
                                                 boolean exceptionIfNotFound)
                                          throws AttributeDefNameSetNotFoundException
Description copied from interface: AttributeDefNameSetDAO
find by if and then (not same) with depth of 1 (immediate)

Specified by:
findByIfThenImmediate in interface AttributeDefNameSetDAO
Returns:
the attributeDefNameSet
Throws:
AttributeDefNameSetNotFoundException
See Also:
AttributeDefNameSetDAO.findByIfThenImmediate(java.lang.String, java.lang.String, boolean)

deleteByIfHasAttributeDefName

public void deleteByIfHasAttributeDefName(AttributeDefName attributeDefName)
Description copied from interface: AttributeDefNameSetDAO
delete attributeDefName sets by owner, so the attributeDefName can be deleted

Specified by:
deleteByIfHasAttributeDefName in interface AttributeDefNameSetDAO
See Also:
AttributeDefNameSetDAO.deleteByIfHasAttributeDefName(edu.internet2.middleware.grouper.attr.AttributeDefName)

attributeDefNamesImpliedByThis

public Set<AttributeDefName> attributeDefNamesImpliedByThis(String attributeDefNameId)
Description copied from interface: AttributeDefNameSetDAO
get all the THEN rows from attributeDefNameSet about this id. The ones returned are implied if this one is assigned. Those are the children, this is the parent

Specified by:
attributeDefNamesImpliedByThis in interface AttributeDefNameSetDAO
Returns:
the AttributeDefName
See Also:
AttributeDefNameSetDAO.attributeDefNamesImpliedByThis(java.lang.String)

attributeDefNamesImpliedByThisImmediate

public Set<AttributeDefName> attributeDefNamesImpliedByThisImmediate(String attributeDefNameId)
Description copied from interface: AttributeDefNameSetDAO
get all the THEN rows from attributeDefNameSet about this id (immediate). The ones returned are implied if this one is assigned. Those are the children, this is the parent

Specified by:
attributeDefNamesImpliedByThisImmediate in interface AttributeDefNameSetDAO
Returns:
the AttributeDefName
See Also:
AttributeDefNameSetDAO.attributeDefNamesImpliedByThisImmediate(java.lang.String)

attributeDefNamesThatImplyThis

public Set<AttributeDefName> attributeDefNamesThatImplyThis(String attributeDefNameId)
Description copied from interface: AttributeDefNameSetDAO
get all the IF rows from attributeDefNameSet about this id. The ones returned imply that this is also assigned. Those are the parents, this is the child.

Specified by:
attributeDefNamesThatImplyThis in interface AttributeDefNameSetDAO
Returns:
the AttributeDefName
See Also:
AttributeDefNameSetDAO.attributeDefNamesThatImplyThis(java.lang.String)

attributeDefNamesThatImplyThisImmediate

public Set<AttributeDefName> attributeDefNamesThatImplyThisImmediate(String attributeDefNameId)
Description copied from interface: AttributeDefNameSetDAO
get all the IF rows from attributeDefNameSet about this id (immediate only). The ones returned imply that this is also assigned. Those are the parents, this is the child.

Specified by:
attributeDefNamesThatImplyThisImmediate in interface AttributeDefNameSetDAO
Returns:
the AttributeDefName
See Also:
AttributeDefNameSetDAO.attributeDefNamesThatImplyThisImmediate(java.lang.String)

findByUuidOrKey

public AttributeDefNameSet findByUuidOrKey(String id,
                                           String ifHasAttributeDefNameId,
                                           String thenHasAttributeDefNameId,
                                           String parentAttributeDefNameSetId,
                                           int depth,
                                           boolean exceptionIfNull)
Description copied from interface: AttributeDefNameSetDAO
find a record by uuid or key

Specified by:
findByUuidOrKey in interface AttributeDefNameSetDAO
Returns:
the AttributeDefNameSet or null
See Also:
AttributeDefNameSetDAO.findByUuidOrKey(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, boolean)

saveUpdateProperties

public void saveUpdateProperties(AttributeDefNameSet attributeDefNameSet)
Description copied from interface: AttributeDefNameSetDAO
save the update properties which are auto saved when business method is called

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

findByDepthOneForAttributeDef

public Set<AttributeDefNameSet> findByDepthOneForAttributeDef(String attributeDefId)
Description copied from interface: AttributeDefNameSetDAO
find by depth one for attribute def

Specified by:
findByDepthOneForAttributeDef in interface AttributeDefNameSetDAO
Returns:
the attribute def name set or null if not there
See Also:
AttributeDefNameSetDAO.findByDepthOneForAttributeDef(String)