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

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

public class Hib3PITGroupSetDAO
extends Hib3DAO
implements PITGroupSetDAO

Author:
shilen $Id$

Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.internal.dao.hib3.Hib3DAO
hibernateInitted
 
Constructor Summary
Hib3PITGroupSetDAO()
           
 
Method Summary
 void delete(PITGroupSet pitGroupSet)
          delete
 void delete(String id)
          Delete (won't run pre and post delete methods)
 void deleteInactiveRecords(Timestamp time)
          Delete records that ended before the given date.
 void deleteSelfByPITOwnerId(String id)
           
 Set<String> findActiveDuplicates()
           
 PITGroupSet findActiveImmediateByPITOwnerAndPITMemberAndPITField(String ownerId, String memberId, String fieldId)
           
 PITGroupSet findActiveImmediateChildByParentAndMemberPITGroup(PITGroupSet parentPITGroupSet, String memberGroupId)
           
 Set<PITGroupSet> findAllActiveByMemberPITGroup(String groupId)
           
 Set<PITGroupSet> findAllActiveByPITGroupOwnerAndPITField(String groupId, PITField field)
           
 Set<PITGroupSet> findAllActiveChildren(PITGroupSet pitGroupSet)
           
 Set<PITGroupSet> findAllByMemberPITGroup(String groupId)
           
 Set<PITGroupSet> findAllSelfPITGroupSetsByPITOwnerId(String id)
           
 PITGroupSet findById(String id, boolean exceptionIfNotFound)
           
 Set<PITGroupSet> findBySourceId(String id, boolean exceptionIfNotFound)
           
 PITGroupSet findBySourceIdActive(String id, boolean exceptionIfNotFound)
           
 PITGroupSet findBySourceIdUnique(String id, boolean exceptionIfNotFound)
           
 Set<PITGroupSet> findImmediateChildren(PITGroupSet groupSet)
           
 Set<GroupSet> findMissingActivePITGroupSets(QueryOptions options)
           
 Set<GroupSet> findMissingActivePITGroupSetsSecondPass()
           
 Set<PITGroupSet> findMissingInactivePITGroupSets()
           
 PITGroupSet findSelfPITGroupSet(String ownerId, String fieldId, boolean activeOnly)
           
 void insertSelfPITGroupSetsByField(String fieldId, Long startTime, String contextId)
           
 void insertSelfPITGroupSetsByOwner(String ownerId, Long startTime, String contextId, boolean checkIfAlreadyExists)
           
static void reset(HibernateSession hibernateSession)
          reset
 void saveBatch(Set<PITGroupSet> pitGroupSets)
          insert a batch of pit group set objects
 void saveOrUpdate(PITGroupSet pitGroupSet)
          insert or update
 void saveOrUpdate(Set<PITGroupSet> pitGroupSets)
          insert or update
 void updateEndTimeByPITField(String fieldId, Long endTime, String contextId)
           
 void updateEndTimeByPITOwner(String ownerId, Long endTime, String contextId)
           
 void updateEndTimeByPITOwnerAndPITField(String ownerId, String fieldId, Long endTime, String contextId)
           
 
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

Hib3PITGroupSetDAO

public Hib3PITGroupSetDAO()
Method Detail

saveOrUpdate

public void saveOrUpdate(PITGroupSet pitGroupSet)
Description copied from interface: PITGroupSetDAO
insert or update

Specified by:
saveOrUpdate in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.saveOrUpdate(edu.internet2.middleware.grouper.pit.PITGroupSet)

saveOrUpdate

public void saveOrUpdate(Set<PITGroupSet> pitGroupSets)
Description copied from interface: PITGroupSetDAO
insert or update

Specified by:
saveOrUpdate in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.saveOrUpdate(java.util.Set)

delete

public void delete(PITGroupSet pitGroupSet)
Description copied from interface: PITGroupSetDAO
delete

Specified by:
delete in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.delete(edu.internet2.middleware.grouper.pit.PITGroupSet)

saveBatch

public void saveBatch(Set<PITGroupSet> pitGroupSets)
Description copied from interface: PITGroupSetDAO
insert a batch of pit group set objects

Specified by:
saveBatch in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.saveBatch(java.util.Set)

reset

public static void reset(HibernateSession hibernateSession)
reset

Parameters:
hibernateSession -

findBySourceIdActive

public PITGroupSet findBySourceIdActive(String id,
                                        boolean exceptionIfNotFound)
Specified by:
findBySourceIdActive in interface PITGroupSetDAO
Returns:
PITGroupSet
See Also:
PITGroupSetDAO.findBySourceIdActive(java.lang.String, boolean)

findBySourceIdUnique

public PITGroupSet findBySourceIdUnique(String id,
                                        boolean exceptionIfNotFound)
Specified by:
findBySourceIdUnique in interface PITGroupSetDAO
Returns:
PITGroupSet
See Also:
PITGroupSetDAO.findBySourceIdUnique(java.lang.String, boolean)

findById

public PITGroupSet findById(String id,
                            boolean exceptionIfNotFound)
Specified by:
findById in interface PITGroupSetDAO
Returns:
PITGroupSet
See Also:
PITGroupSetDAO.findById(java.lang.String, boolean)

insertSelfPITGroupSetsByOwner

public void insertSelfPITGroupSetsByOwner(String ownerId,
                                          Long startTime,
                                          String contextId,
                                          boolean checkIfAlreadyExists)
Specified by:
insertSelfPITGroupSetsByOwner in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.insertSelfPITGroupSetsByOwner(java.lang.String, java.lang.Long, java.lang.String, boolean)

insertSelfPITGroupSetsByField

public void insertSelfPITGroupSetsByField(String fieldId,
                                          Long startTime,
                                          String contextId)
Specified by:
insertSelfPITGroupSetsByField in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.insertSelfPITGroupSetsByField(java.lang.String, java.lang.Long, java.lang.String)

updateEndTimeByPITOwner

public void updateEndTimeByPITOwner(String ownerId,
                                    Long endTime,
                                    String contextId)
Specified by:
updateEndTimeByPITOwner in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.updateEndTimeByPITOwner(java.lang.String, java.lang.Long, java.lang.String)

updateEndTimeByPITField

public void updateEndTimeByPITField(String fieldId,
                                    Long endTime,
                                    String contextId)
Specified by:
updateEndTimeByPITField in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.updateEndTimeByPITField(java.lang.String, java.lang.Long, java.lang.String)

updateEndTimeByPITOwnerAndPITField

public void updateEndTimeByPITOwnerAndPITField(String ownerId,
                                               String fieldId,
                                               Long endTime,
                                               String contextId)
Specified by:
updateEndTimeByPITOwnerAndPITField in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.updateEndTimeByPITOwnerAndPITField(java.lang.String, java.lang.String, java.lang.Long, java.lang.String)

findSelfPITGroupSet

public PITGroupSet findSelfPITGroupSet(String ownerId,
                                       String fieldId,
                                       boolean activeOnly)
Specified by:
findSelfPITGroupSet in interface PITGroupSetDAO
Returns:
pit group set
See Also:
PITGroupSetDAO.findSelfPITGroupSet(java.lang.String, java.lang.String, boolean)

findActiveImmediateByPITOwnerAndPITMemberAndPITField

public PITGroupSet findActiveImmediateByPITOwnerAndPITMemberAndPITField(String ownerId,
                                                                        String memberId,
                                                                        String fieldId)
Specified by:
findActiveImmediateByPITOwnerAndPITMemberAndPITField in interface PITGroupSetDAO
Returns:
pit group set
See Also:
PITGroupSetDAO.findActiveImmediateByPITOwnerAndPITMemberAndPITField(java.lang.String, java.lang.String, java.lang.String)

findAllActiveByPITGroupOwnerAndPITField

public Set<PITGroupSet> findAllActiveByPITGroupOwnerAndPITField(String groupId,
                                                                PITField field)
Specified by:
findAllActiveByPITGroupOwnerAndPITField in interface PITGroupSetDAO
Returns:
pit group sets
See Also:
PITGroupSetDAO.findAllActiveByPITGroupOwnerAndPITField(java.lang.String, edu.internet2.middleware.grouper.pit.PITField)

findAllActiveByMemberPITGroup

public Set<PITGroupSet> findAllActiveByMemberPITGroup(String groupId)
Specified by:
findAllActiveByMemberPITGroup in interface PITGroupSetDAO
Returns:
pit group sets
See Also:
PITGroupSetDAO.findAllActiveByMemberPITGroup(java.lang.String)

findAllByMemberPITGroup

public Set<PITGroupSet> findAllByMemberPITGroup(String groupId)
Specified by:
findAllByMemberPITGroup in interface PITGroupSetDAO
Returns:
pit group sets
See Also:
PITGroupSetDAO.findAllByMemberPITGroup(java.lang.String)

findAllActiveChildren

public Set<PITGroupSet> findAllActiveChildren(PITGroupSet pitGroupSet)
Specified by:
findAllActiveChildren in interface PITGroupSetDAO
Returns:
all nested children of the pit group set
See Also:
PITGroupSetDAO.findAllActiveChildren(edu.internet2.middleware.grouper.pit.PITGroupSet)

findActiveImmediateChildByParentAndMemberPITGroup

public PITGroupSet findActiveImmediateChildByParentAndMemberPITGroup(PITGroupSet parentPITGroupSet,
                                                                     String memberGroupId)
Specified by:
findActiveImmediateChildByParentAndMemberPITGroup in interface PITGroupSetDAO
Returns:
pit group set
See Also:
PITGroupSetDAO.findActiveImmediateChildByParentAndMemberPITGroup(edu.internet2.middleware.grouper.pit.PITGroupSet, java.lang.String)

deleteInactiveRecords

public void deleteInactiveRecords(Timestamp time)
Description copied from interface: PITGroupSetDAO
Delete records that ended before the given date.

Specified by:
deleteInactiveRecords in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.deleteInactiveRecords(java.sql.Timestamp)

findImmediateChildren

public Set<PITGroupSet> findImmediateChildren(PITGroupSet groupSet)
Specified by:
findImmediateChildren in interface PITGroupSetDAO
Returns:
pit group sets
See Also:
PITGroupSetDAO.findImmediateChildren(edu.internet2.middleware.grouper.pit.PITGroupSet)

findAllSelfPITGroupSetsByPITOwnerId

public Set<PITGroupSet> findAllSelfPITGroupSetsByPITOwnerId(String id)
Specified by:
findAllSelfPITGroupSetsByPITOwnerId in interface PITGroupSetDAO
Returns:
pit group sets
See Also:
PITGroupSetDAO.findAllSelfPITGroupSetsByPITOwnerId(java.lang.String)

deleteSelfByPITOwnerId

public void deleteSelfByPITOwnerId(String id)
Specified by:
deleteSelfByPITOwnerId in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.deleteSelfByPITOwnerId(java.lang.String)

findMissingActivePITGroupSets

public Set<GroupSet> findMissingActivePITGroupSets(QueryOptions options)
Specified by:
findMissingActivePITGroupSets in interface PITGroupSetDAO
Returns:
active group sets that are missing in point in time
See Also:
PITGroupSetDAO.findMissingActivePITGroupSets(edu.internet2.middleware.grouper.internal.dao.QueryOptions)

findMissingActivePITGroupSetsSecondPass

public Set<GroupSet> findMissingActivePITGroupSetsSecondPass()
Specified by:
findMissingActivePITGroupSetsSecondPass in interface PITGroupSetDAO
Returns:
active group sets that are missing in point in time (this time looking for effective issues)
See Also:
PITGroupSetDAO.findMissingActivePITGroupSetsSecondPass()

findMissingInactivePITGroupSets

public Set<PITGroupSet> findMissingInactivePITGroupSets()
Specified by:
findMissingInactivePITGroupSets in interface PITGroupSetDAO
Returns:
active point in time group sets that should be inactive
See Also:
PITGroupSetDAO.findMissingInactivePITGroupSets()

findActiveDuplicates

public Set<String> findActiveDuplicates()
Specified by:
findActiveDuplicates in interface PITGroupSetDAO
Returns:
source ids of records that have duplicate active entries in PIT
See Also:
PITGroupSetDAO.findActiveDuplicates()

findBySourceId

public Set<PITGroupSet> findBySourceId(String id,
                                       boolean exceptionIfNotFound)
Specified by:
findBySourceId in interface PITGroupSetDAO
Returns:
set of PITGroupSet
See Also:
PITGroupSetDAO.findBySourceId(java.lang.String, boolean)

delete

public void delete(String id)
Description copied from interface: PITGroupSetDAO
Delete (won't run pre and post delete methods)

Specified by:
delete in interface PITGroupSetDAO
See Also:
PITGroupSetDAO.delete(java.lang.String)