public class FiscalYearMakerImpl extends org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb implements FiscalYearMaker
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowOverrideTargetYear |
protected Class<? extends FiscalYearBasedBusinessObject> |
businessObjectClass |
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected boolean |
carryForwardInactive |
protected Map<String,Class> |
collectionObjects |
protected boolean |
fiscalYearOneAhead |
protected boolean |
fiscalYearOneBehind |
protected Boolean |
hasExtension |
protected static Long |
ONE |
protected Set<Class<? extends FiscalYearBasedBusinessObject>> |
parentClasses |
protected org.kuali.rice.krad.service.PersistenceStructureService |
persistenceStructureService |
protected List<String> |
primaryKeyPropertyNames |
protected List<String> |
propertyNames |
protected Map<String,Map<String,String>> |
referenceForeignKeys |
protected Map<String,Class> |
referenceObjects |
protected boolean |
twoYearCopy |
| Constructor and Description |
|---|
FiscalYearMakerImpl()
Constructs a FiscalYearMakerImpl.java.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addYearCriteria(org.apache.ojb.broker.query.Criteria criteria,
Integer baseFiscalYear,
boolean createTwoYears)
Adds fiscal year criteria based on the configuration (copy two years, lagging, or normal)
|
void |
changeForNewYear(Integer baseFiscalYear,
FiscalYearBasedBusinessObject currentRecord)
Sets fiscal year field up one, resets version number and assigns a new Guid for the object id
|
org.apache.ojb.broker.query.Criteria |
createDeleteCriteria(Integer baseFiscalYear)
Selects records to delete for base year + 1 (or base year for lagging, and base year + 2 for two year)
|
org.apache.ojb.broker.query.Criteria |
createNextYearSelectionCriteria(Integer baseFiscalYear) |
org.apache.ojb.broker.query.Criteria |
createSelectionCriteria(Integer baseFiscalYear)
Selects records for the given base year or base year minus one if this is a lagging copy.
|
boolean |
doCustomProcessingOnly()
Default to doing both normal FYM process and custom
|
Class<? extends FiscalYearBasedBusinessObject> |
getBusinessObjectClass()
Returns the class for the business object the fiscal year maker implementation operates on
|
Map<String,Class> |
getCollectionProperties() |
Map<String,String> |
getForeignKeyMappings(String referenceName) |
Set<Class<? extends FiscalYearBasedBusinessObject>> |
getParentClasses()
Options is the parent for univFiscalYear which all our copy objects should have. |
List<String> |
getPrimaryKeyPropertyNames() |
List<String> |
getPropertyNames() |
Map<String,Class> |
getReferenceObjectProperties() |
protected boolean |
hasExtension() |
boolean |
isAllowOverrideTargetYear()
Gets the allowOverrideTargetYear attribute.
|
boolean |
isCarryForwardInactive()
Gets the carryForwardInactive attribute.
|
boolean |
isFiscalYearOneAhead()
Gets the fiscalYearOneAhead attribute.
|
boolean |
isFiscalYearOneBehind()
Gets the fiscalYearOneBehind attribute.
|
boolean |
isTwoYearCopy()
Gets the twoYearCopy attribute.
|
void |
performCustomProcessing(Integer baseFiscalYear,
boolean firstCopyYear)
Default implementation does nothing
|
void |
setAllowOverrideTargetYear(boolean allowOverrideTargetYear)
Sets the allowOverrideTargetYear attribute value.
|
void |
setBusinessObjectClass(Class<? extends FiscalYearBasedBusinessObject> businessObjectClass)
Sets the businessObjectClass attribute value.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setCarryForwardInactive(boolean carryForwardInactive)
Sets the carryForwardInactive attribute value.
|
void |
setFiscalYearOneAhead(boolean fiscalYearOneAhead)
Sets the fiscalYearOneAhead attribute value.
|
void |
setFiscalYearOneBehind(boolean fiscalYearOneBehind)
Sets the fiscalYearOneBehind attribute value.
|
void |
setParentClasses(Set<Class<? extends FiscalYearBasedBusinessObject>> parentClasses)
Sets the parentClasses attribute value.
|
void |
setPersistenceStructureService(org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService)
Sets the persistenceStructureService attribute value.
|
void |
setTwoYearCopy(boolean twoYearCopy)
Sets the twoYearCopy attribute value.
|
protected void |
updateExtensionRecord(Integer newFiscalYear,
org.kuali.rice.krad.bo.PersistableBusinessObject currentRecord)
Determines if an extension record is mapped up and exists for the current record.
|
getDbPlatform, setDbPlatformprotected org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
protected Class<? extends FiscalYearBasedBusinessObject> businessObjectClass
protected Set<Class<? extends FiscalYearBasedBusinessObject>> parentClasses
protected boolean fiscalYearOneBehind
protected boolean fiscalYearOneAhead
protected boolean twoYearCopy
protected boolean carryForwardInactive
protected boolean allowOverrideTargetYear
protected Boolean hasExtension
protected List<String> primaryKeyPropertyNames
protected List<String> propertyNames
protected Map<String,Class> referenceObjects
protected Map<String,Class> collectionObjects
public FiscalYearMakerImpl()
protected boolean hasExtension()
public List<String> getPrimaryKeyPropertyNames()
getPrimaryKeyPropertyNames in interface FiscalYearMakerpublic List<String> getPropertyNames()
getPropertyNames in interface FiscalYearMakerpublic Map<String,Class> getReferenceObjectProperties()
getReferenceObjectProperties in interface FiscalYearMakerpublic Map<String,Class> getCollectionProperties()
getCollectionProperties in interface FiscalYearMakerpublic Map<String,String> getForeignKeyMappings(String referenceName)
getForeignKeyMappings in interface FiscalYearMakerpublic void changeForNewYear(Integer baseFiscalYear, FiscalYearBasedBusinessObject currentRecord)
changeForNewYear in interface FiscalYearMakerbaseFiscalYear - fiscal year of the base recordcurrentRecord - business object of type (@see org.kuali.ole.coa.dataaccess.FiscalYearMakerDao.getBusinessObjectClass())
populated with the current year record dataorg.kuali.ole.coa.dataaccess.FiscalYearMaker#changeForNewYear(java.lang.Integer,
org.kuali.rice.krad.bo.PersistableBusinessObject)protected void updateExtensionRecord(Integer newFiscalYear, org.kuali.rice.krad.bo.PersistableBusinessObject currentRecord) throws Exception
newFiscalYear - fiscal year to setcurrentRecord - main record with possible extension referenceExceptionpublic org.apache.ojb.broker.query.Criteria createNextYearSelectionCriteria(Integer baseFiscalYear)
createNextYearSelectionCriteria in interface FiscalYearMakerMutableInactivatable,
org.kuali.ole.coa.dataaccess.FiscalYearMaker#createSelectionCriteria(java.lang.Integer)public org.apache.ojb.broker.query.Criteria createSelectionCriteria(Integer baseFiscalYear)
createSelectionCriteria in interface FiscalYearMakerbaseFiscalYear - fiscal year of the base recordMutableInactivatable,
org.kuali.ole.coa.dataaccess.FiscalYearMaker#createSelectionCriteria(java.lang.Integer)public org.apache.ojb.broker.query.Criteria createDeleteCriteria(Integer baseFiscalYear)
createDeleteCriteria in interface FiscalYearMakerbaseFiscalYear - fiscal year of the base recordorg.kuali.ole.coa.batch.dataaccess.FiscalYearMakerHelper#createDeleteCriteria(java.lang.Integer)protected void addYearCriteria(org.apache.ojb.broker.query.Criteria criteria, Integer baseFiscalYear, boolean createTwoYears)
criteria - OJB Criteria objectbaseFiscalYear - Fiscal year for critieracreateTwoYears - indicates whether two years of fiscal year criteria should be addedpublic void performCustomProcessing(Integer baseFiscalYear, boolean firstCopyYear)
performCustomProcessing in interface FiscalYearMakerbaseFiscalYear - fiscal year of the base recordfirstCopyYear - boolean that indicates whether this is the first year being copied (useful for two year copies)org.kuali.ole.coa.batch.dataaccess.FiscalYearMakerHelper#performCustomProcessing(java.lang.Integer)public boolean doCustomProcessingOnly()
doCustomProcessingOnly in interface FiscalYearMakerorg.kuali.ole.coa.batch.dataaccess.FiscalYearMakerHelper#doCustomProcessingOnly()public Class<? extends FiscalYearBasedBusinessObject> getBusinessObjectClass()
FiscalYearMakergetBusinessObjectClass in interface FiscalYearMakerorg.kuali.ole.coa.dataaccess.FiscalYearMaker#getBusinessObjectClass()public Set<Class<? extends FiscalYearBasedBusinessObject>> getParentClasses()
Options is the parent for univFiscalYear which all our copy objects should have. Added to list here by default.getParentClasses in interface FiscalYearMakerorg.kuali.ole.coa.batch.dataaccess.FiscalYearMakerHelper#getParentClasses(),
org.kuali.ole.sys.businessobject.Optionspublic void setBusinessObjectClass(Class<? extends FiscalYearBasedBusinessObject> businessObjectClass)
businessObjectClass - The businessObjectClass to set.public void setParentClasses(Set<Class<? extends FiscalYearBasedBusinessObject>> parentClasses)
parentClasses - The parentClasses to set.public boolean isFiscalYearOneBehind()
public void setFiscalYearOneBehind(boolean fiscalYearOneBehind)
fiscalYearOneBehind - The fiscalYearOneBehind to set.public boolean isFiscalYearOneAhead()
public void setFiscalYearOneAhead(boolean fiscalYearOneAhead)
fiscalYearOneAhead - The fiscalYearOneAhead to set.public boolean isTwoYearCopy()
isTwoYearCopy in interface FiscalYearMakerpublic void setTwoYearCopy(boolean twoYearCopy)
twoYearCopy - The twoYearCopy to set.public boolean isCarryForwardInactive()
public void setCarryForwardInactive(boolean carryForwardInactive)
carryForwardInactive - The carryForwardInactive to set.public void setPersistenceStructureService(org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService)
persistenceStructureService - The persistenceStructureService to set.public boolean isAllowOverrideTargetYear()
isAllowOverrideTargetYear in interface FiscalYearMakerpublic void setAllowOverrideTargetYear(boolean allowOverrideTargetYear)
allowOverrideTargetYear - The allowOverrideTargetYear to set.public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.