public class FiscalYearMakersDaoOjb extends org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb implements FiscalYearMakersDao
org.kuali.ole.coa.batch.dataaccess.FiscalYearMakersDao
Modifier and Type | Field and Description |
---|---|
protected static String |
KEY_STRING_DELIMITER |
Constructor and Description |
---|
FiscalYearMakersDaoOjb() |
Modifier and Type | Method and Description |
---|---|
protected void |
addToKeysWritten(FiscalYearMaker fiscalYearMaker,
List<String> keyFieldNames,
FiscalYearBasedBusinessObject copiedObject,
Set<String> keysWritten)
Builds a string from the primary key values and adds to given set
|
Collection<String> |
createNewYearRows(Integer baseYear,
FiscalYearMaker fiscalYearMaker,
boolean replaceMode,
Map<Class<? extends FiscalYearBasedBusinessObject>,Set<String>> parentKeysWritten,
boolean isParentClass)
Populates records for the new year and object
|
void |
deleteNewYearRows(Integer baseYear,
FiscalYearMaker objectFiscalYearMaker)
Clears out records for the new year and object being copied
|
protected String |
getForeignKeyStringForReference(FiscalYearMaker fiscalYearMaker,
FiscalYearBasedBusinessObject businessObject,
String referenceName)
Builds a String containing foreign key values for the given reference of the business object
|
protected String |
getKeyString(FiscalYearMaker fiscalYearMaker,
List<String> keyFieldNames,
FiscalYearBasedBusinessObject businessObject) |
protected void |
removeNonPrimitiveFields(FiscalYearMaker fiscalYearMaker,
FiscalYearBasedBusinessObject businessObject)
Sets all reference and collection fields defined in the persistence layer to null on the given object
|
protected boolean |
validateChildParentReferencesExist(FiscalYearMaker objectFiscalYearMaker,
FiscalYearBasedBusinessObject childRecord,
Class<? extends FiscalYearBasedBusinessObject> parentClass,
Set<String> parentKeys,
List<String> copyErrors)
Validates the parent record(s) exists for the child record by retrieving the OJB reference (if found and foreign keys have
value)
|
protected boolean |
validateParentRecordsExist(FiscalYearMaker objectFiscalYearMaker,
FiscalYearBasedBusinessObject childRecord,
Map<Class<? extends FiscalYearBasedBusinessObject>,Set<String>> parentKeysWritten,
List<String> copyErrors)
Checks all parents for the object we are copying has a corresponding record for the child record
|
protected void |
writeMissingParentCopyError(FiscalYearBasedBusinessObject childRecord,
Class<? extends FiscalYearBasedBusinessObject> parentClass,
String foreignKeyString,
Collection<String> copyErrors)
Builds an error message when a parent record was not found for the child
|
getDbPlatform, setDbPlatform
protected static final String KEY_STRING_DELIMITER
public FiscalYearMakersDaoOjb()
public void deleteNewYearRows(Integer baseYear, FiscalYearMaker objectFiscalYearMaker)
FiscalYearMakersDao
deleteNewYearRows
in interface FiscalYearMakersDao
baseYear
- fiscal year that we are copyingobjectFiscalYearMaker
- FiscalYearMaker implementation for the object we are copyingorg.kuali.ole.coa.batch.dataaccess.FiscalYearMakersDao#deleteNewYearRows(java.lang.Integer,
org.kuali.ole.coa.batch.dataaccess.FiscalYearMakerHelper)
public Collection<String> createNewYearRows(Integer baseYear, FiscalYearMaker fiscalYearMaker, boolean replaceMode, Map<Class<? extends FiscalYearBasedBusinessObject>,Set<String>> parentKeysWritten, boolean isParentClass) throws Exception
FiscalYearMakersDao
createNewYearRows
in interface FiscalYearMakersDao
baseYear
- fiscal year that we are copyingfiscalYearMaker
- FiscalYearMaker implementation for the object we are copyingreplaceMode
- indicates whether records found for the new year should be replaced or left aloneparentKeysWritten
- Map that contains class as key and Set of of primary key strings representing records writtenisParentClass
- indicates whether the class being copied is a parent to another FYM class that will be copiedException
org.kuali.ole.sys.batch.dataaccess.FiscalYearMakersDao#createNewYearRows(java.lang.Integer,
org.kuali.ole.sys.batch.dataaccess.FiscalYearMaker, boolean, java.util.Map)
protected void removeNonPrimitiveFields(FiscalYearMaker fiscalYearMaker, FiscalYearBasedBusinessObject businessObject)
businessObject
- object to set properties forprotected boolean validateParentRecordsExist(FiscalYearMaker objectFiscalYearMaker, FiscalYearBasedBusinessObject childRecord, Map<Class<? extends FiscalYearBasedBusinessObject>,Set<String>> parentKeysWritten, List<String> copyErrors) throws Exception
Exception
protected boolean validateChildParentReferencesExist(FiscalYearMaker objectFiscalYearMaker, FiscalYearBasedBusinessObject childRecord, Class<? extends FiscalYearBasedBusinessObject> parentClass, Set<String> parentKeys, List<String> copyErrors) throws Exception
childRecord
- child record we are insertingparentClass
- class for parent of childparentKeys
- Set of parent key Strings that have been writtencopyErrors
- Collection for adding error messagesException
protected String getForeignKeyStringForReference(FiscalYearMaker fiscalYearMaker, FiscalYearBasedBusinessObject businessObject, String referenceName) throws Exception
businessObject
- business object instance with referencereferenceName
- name of referenceException
protected void writeMissingParentCopyError(FiscalYearBasedBusinessObject childRecord, Class<? extends FiscalYearBasedBusinessObject> parentClass, String foreignKeyString, Collection<String> copyErrors)
childRecord
- child record we are insertingparentClass
- class for parent of childforeignKeyString
- string of foreign key values that was not found in parentcopyErrors
- Collection for adding error messagesprotected void addToKeysWritten(FiscalYearMaker fiscalYearMaker, List<String> keyFieldNames, FiscalYearBasedBusinessObject copiedObject, Set<String> keysWritten) throws Exception
copiedObject
- object to grab key values forkeysWritten
- Set containing all pk stringsException
protected String getKeyString(FiscalYearMaker fiscalYearMaker, List<String> keyFieldNames, FiscalYearBasedBusinessObject businessObject) throws Exception
Exception
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.