org.kuali.kfs.gl.dataaccess.impl
Class OriginEntryGroupDaoOjb

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springmodules.orm.ojb.support.PersistenceBrokerDaoSupport
          extended by org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
              extended by org.kuali.kfs.gl.dataaccess.impl.OriginEntryGroupDaoOjb
All Implemented Interfaces:
OriginEntryGroupDao, org.kuali.rice.kns.dao.PlatformAwareDao, org.springframework.beans.factory.InitializingBean

public class OriginEntryGroupDaoOjb
extends org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
implements OriginEntryGroupDao

An OJB specific implementation of OriginEntryGroupDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
OriginEntryGroupDaoOjb()
           
 
Method Summary
 void deleteGroups(Collection<OriginEntryGroup> groups)
          Delete all the groups in the list.
 Collection<OriginEntryGroup> getAllScrubbableBackupGroups()
          Gets a collection of all backup groups that are scrubbable (i.e.
 OriginEntryGroup getExactMatchingEntryGroup(Integer id)
          We all know that computers aren't naturally exact.
 Collection getGroupsToBackup(Date groupDate)
          Get all the groups to be copied into the backup group
 OriginEntryGroup getGroupWithMaxIdFromSource(String sourceCode)
          Given an origin entry group source type (defined in OriginEntrySource)
 Collection getMatchingGroups(Map searchCriteria)
          Builds an OJB query out of the given map of criteria and fetches all the groups that match the criteria
 Collection<OriginEntryGroup> getOlderGroups(Date day)
          Get all the groups that are older than a date
 Collection getPosterGroups(String groupSourceCode)
          Get all the groups for the poster (that is to say, Groups with "Process" being true)
 Collection<OriginEntryGroup> getRecentGroups(Date day)
          Given a date, finds all origin entry groups that were created on or after that date
 void save(OriginEntryGroup group)
          Saves an origin entry group
 
Methods inherited from class org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
getDbPlatform, setDbPlatform
 
Methods inherited from class org.springmodules.orm.ojb.support.PersistenceBrokerDaoSupport
checkDaoConfig, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OriginEntryGroupDaoOjb

public OriginEntryGroupDaoOjb()
Method Detail

getGroupWithMaxIdFromSource

public OriginEntryGroup getGroupWithMaxIdFromSource(String sourceCode)
Given an origin entry group source type (defined in OriginEntrySource)

Specified by:
getGroupWithMaxIdFromSource in interface OriginEntryGroupDao
Parameters:
sourceCode - the source code of the groups to find
Returns:
a OriginEntryGroup with the given source code and max ORIGIN_ENTRY_GRP_ID
See Also:
OriginEntrySource, OriginEntryGroupDao.getGroupWithMaxIdFromSource(java.lang.String)

getOlderGroups

public Collection<OriginEntryGroup> getOlderGroups(Date day)
Get all the groups that are older than a date

Specified by:
getOlderGroups in interface OriginEntryGroupDao
Parameters:
day - the date groups returned should be older than
Returns:
a Collection of origin entry groups older than that date
See Also:
OriginEntryGroupDao.getOlderGroups(Date)

deleteGroups

public void deleteGroups(Collection<OriginEntryGroup> groups)
Delete all the groups in the list. Note...it doesn't delete the entries within them, you need OriginEntryDao.deleteGroups for that

Specified by:
deleteGroups in interface OriginEntryGroupDao
See Also:
OriginEntryGroupDao.deleteGroups(java.util.Collection)

getMatchingGroups

public Collection getMatchingGroups(Map searchCriteria)
Builds an OJB query out of the given map of criteria and fetches all the groups that match the criteria

Specified by:
getMatchingGroups in interface OriginEntryGroupDao
Parameters:
searchCriteria - a Map of search criteria to form the query
Returns:
a Collection of Origin Entry Groups that match that criteria
See Also:
OriginEntryGroupDao.getMatchingGroups(java.util.Map)

getPosterGroups

public Collection getPosterGroups(String groupSourceCode)
Get all the groups for the poster (that is to say, Groups with "Process" being true)

Specified by:
getPosterGroups in interface OriginEntryGroupDao
Parameters:
groupSourceCode - the source code of origin entry groups to return
Returns:
a Collection of origin entry groups that should be processed by the poster
See Also:
OriginEntryGroupDao.getPosterGroups(java.lang.String)

getAllScrubbableBackupGroups

public Collection<OriginEntryGroup> getAllScrubbableBackupGroups()
Gets a collection of all backup groups that are scrubbable (i.e. valid, process, scrub indicators all set to true)

Specified by:
getAllScrubbableBackupGroups in interface OriginEntryGroupDao
Returns:
a Collection of scrubbable origin entry groups
See Also:
OriginEntryGroupDao.getAllScrubbableBackupGroups()

getGroupsToBackup

public Collection getGroupsToBackup(Date groupDate)
Get all the groups to be copied into the backup group

Specified by:
getGroupsToBackup in interface OriginEntryGroupDao
Parameters:
groupDate - the date returned origin entry groups must have been created on or before
Returns:
a Collection of origin entry groups to backup
See Also:
org.kuali.kfs.gl.dataaccess.OriginEntryGroupDao#getScrubberGroups(java.sql.Date)

save

public void save(OriginEntryGroup group)
Saves an origin entry group

Specified by:
save in interface OriginEntryGroupDao
Parameters:
group - the group to save
See Also:
OriginEntryGroupDao.save(org.kuali.kfs.gl.businessobject.OriginEntryGroup)

getExactMatchingEntryGroup

public OriginEntryGroup getExactMatchingEntryGroup(Integer id)
We all know that computers aren't naturally exact. They like to fudge things. Databases especially. If you send a database a table name and a primary key on that table, you really never know what you're going to get, now do you? But this method makes sure that that rascally database returns the origin entry group with the primary key of the given group id. Or null if it can't find anything. It works by magic.

Specified by:
getExactMatchingEntryGroup in interface OriginEntryGroupDao
Parameters:
id - the id of the origin entry group to return
Returns:
an Origin Entry Group, or null if the exact one couldn't be found
See Also:
OriginEntryGroupDao.getExactMatchingEntryGroup(java.lang.Integer)

getRecentGroups

public Collection<OriginEntryGroup> getRecentGroups(Date day)
Given a date, finds all origin entry groups that were created on or after that date

Specified by:
getRecentGroups in interface OriginEntryGroupDao
Parameters:
day - the date that defines recency - all qualifying origin entries groups will have been created on or after that day
Returns:
a Collection of OriginEntryGroup records
See Also:
OriginEntryGroupDao.getRecentGroups(Date)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.