org.kuali.kfs.sys.batch.dataaccess
Interface FiscalYearMaker

All Known Implementing Classes:
AccountingPeriodFiscalYearMakerImpl, EffortCertificationReportDefinitionFiscalYearMakerImpl, FiscalYearMakerImpl, ObjectCodeFiscalYearMakerImpl, SystemOptionsFiscalYearMakerImpl, UniversityDateFiscalYearMakerImpl

public interface FiscalYearMaker

Defines methods that must be implemented for a DAO making an entity for a new fiscal year


Method Summary
 void changeForNewYear(Integer baseFiscalYear, org.kuali.rice.kns.bo.PersistableBusinessObject currentRecord)
          Does any necessary changes on the base record (for base fiscal year) for storing as a record of the new fiscal year.
 org.apache.ojb.broker.query.Criteria createDeleteCriteria(Integer baseFiscalYear)
          Creates OJB Criteria object that will be used to delete records in the target year
 org.apache.ojb.broker.query.Criteria createSelectionCriteria(Integer baseFiscalYear)
          Creates OJB Criteria object that will be used to query for records to copy
 boolean doCustomProcessingOnly()
          Indicator for determining whether we should do normal FYM process and call custom hook or only custom
 Class<? extends org.kuali.rice.kns.bo.PersistableBusinessObject> getBusinessObjectClass()
          Returns the class for the business object the fiscal year maker implementation operates on
 Set<Class<? extends org.kuali.rice.kns.bo.PersistableBusinessObject>> getParentClasses()
          Returns Set of Class objects that are parents to this business object.
 boolean isAllowOverrideTargetYear()
          Indicates whether records of this type can be cleared for target year (if Override parameter is set to true).
 boolean isTwoYearCopy()
          Indicates whether records should be created for two fiscal years out as opposed to just one
 void performCustomProcessing(Integer baseFiscalYear, boolean firstCopyYear)
          Hook to do custom new population for a business object
 

Method Detail

changeForNewYear

void changeForNewYear(Integer baseFiscalYear,
                      org.kuali.rice.kns.bo.PersistableBusinessObject currentRecord)
Does any necessary changes on the base record (for base fiscal year) for storing as a record of the new fiscal year. The fiscal year field should be updated an minimum.

Parameters:
baseFiscalYear - fiscal year of the base record
currentRecord - business object of type (@see org.kuali.kfs.coa.dataaccess.FiscalYearMakerDao.getBusinessObjectClass()) populated with the current year record data

createSelectionCriteria

org.apache.ojb.broker.query.Criteria createSelectionCriteria(Integer baseFiscalYear)
Creates OJB Criteria object that will be used to query for records to copy

Parameters:
baseFiscalYear - fiscal year of the base record
Returns:
OJB criteria object
See Also:
Criteria

createDeleteCriteria

org.apache.ojb.broker.query.Criteria createDeleteCriteria(Integer baseFiscalYear)
Creates OJB Criteria object that will be used to delete records in the target year

Parameters:
baseFiscalYear - fiscal year of the base record
Returns:
OJB criteria object
See Also:
Criteria

performCustomProcessing

void performCustomProcessing(Integer baseFiscalYear,
                             boolean firstCopyYear)
Hook to do custom new population for a business object

Parameters:
baseFiscalYear - fiscal year of the base record
firstCopyYear - boolean that indicates whether this is the first year being copied (useful for two year copies)

doCustomProcessingOnly

boolean doCustomProcessingOnly()
Indicator for determining whether we should do normal FYM process and call custom hook or only custom

Returns:
true if only custom processing should be done, false if both normal FYM process and custom should be performed

getBusinessObjectClass

Class<? extends org.kuali.rice.kns.bo.PersistableBusinessObject> getBusinessObjectClass()
Returns the class for the business object the fiscal year maker implementation operates on

Returns:
business object class

getParentClasses

Set<Class<? extends org.kuali.rice.kns.bo.PersistableBusinessObject>> getParentClasses()
Returns Set of Class objects that are parents to this business object. Parents will be copied before this object to satisfy referential integrity in the database

Returns:
Set of Class objects that extend PersistableBusinessObject

isTwoYearCopy

boolean isTwoYearCopy()
Indicates whether records should be created for two fiscal years out as opposed to just one

Returns:
true if two years should be copied, false otherwise (only the default one)

isAllowOverrideTargetYear

boolean isAllowOverrideTargetYear()
Indicates whether records of this type can be cleared for target year (if Override parameter is set to true). Clearing records for some tables causes RI issues therefore they cannot be safely deleted once created

Returns:
true if target year data can be cleared, false if not


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