@Transactional public class ReconciliationServiceImpl extends Object implements ReconciliationService
Modifier and Type | Class and Description |
---|---|
protected class |
ReconciliationServiceImpl.JavaAttributeAugmentedColumnReconciliation
A wrapper around
ColumnReconciliation objects to provide it with information specific to the java beans representing
each BO. |
Constructor and Description |
---|
ReconciliationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected org.kuali.rice.core.api.util.type.KualiDecimal[] |
createColumnSumsArray(int size)
Creates an array of
KualiDecimal s of a given size, and initializes all elements to KualiDecimal.ZERO |
protected Message |
generateColumnSumErrorMessage(ColumnReconciliation column,
org.kuali.rice.core.api.util.type.KualiDecimal actualValue)
Generates the error message for the sum of column(s) not matching the reconciliation value
|
protected Message |
generateRowCountMismatchMessage(ReconciliationBlock block,
int actualRowCount)
Generates the error message for the number of entries reconciled being unequal to the expected value
|
protected Class<? extends OriginEntryFull> |
getOriginEntryClass()
Gets the originEntryClass attribute.
|
protected ReconciliationDao |
getReconciliationDao()
Gets the reconciliationDao attribute.
|
protected boolean |
performSanityChecks(List<ColumnReconciliation> columns,
List<ReconciliationServiceImpl.JavaAttributeAugmentedColumnReconciliation> javaAttributeNames,
org.kuali.rice.core.api.util.type.KualiDecimal[] columnSums,
List<Message> errorMessages)
Performs basic checking to ensure that values are set up so that reconciliation can proceed
|
void |
reconcile(Iterator<OriginEntryFull> entries,
ReconciliationBlock reconBlock,
List<Message> errorMessages)
Performs the reconciliation on origin entries using the data from the
ReconciliationBlock parameter |
protected List<ReconciliationServiceImpl.JavaAttributeAugmentedColumnReconciliation> |
resolveJavaAttributeNames(List<ColumnReconciliation> columns)
Resolves a mapping between the database columns and the java attribute name (i.e.
|
void |
setOriginEntryClass(Class<? extends OriginEntryFull> originEntryClass)
Sets the originEntryClass attribute value.
|
void |
setReconciliationDao(ReconciliationDao reconciliationDao)
Sets the reconciliationDao attribute value.
|
public ReconciliationServiceImpl()
public void reconcile(Iterator<OriginEntryFull> entries, ReconciliationBlock reconBlock, List<Message> errorMessages)
ReconciliationBlock
parameterreconcile
in interface ReconciliationService
entries
- origin entriesreconBlock
- reconciliation dataerrorMessages
- a non-null list onto which error messages will be appended. This list will be modified by reference.ReconciliationService.reconcile(java.util.Iterator,
org.kuali.ole.gl.batch.service.impl.ReconciliationBlock, java.util.List)
protected Message generateColumnSumErrorMessage(ColumnReconciliation column, org.kuali.rice.core.api.util.type.KualiDecimal actualValue)
column
- the column reconciliation data (recall that this "column" can be the sum of several columns)actualValue
- the value of the column(s)protected Message generateRowCountMismatchMessage(ReconciliationBlock block, int actualRowCount)
block
- The file reconciliation dataactualRowCount
- the number of rows encounteredprotected boolean performSanityChecks(List<ColumnReconciliation> columns, List<ReconciliationServiceImpl.JavaAttributeAugmentedColumnReconciliation> javaAttributeNames, org.kuali.rice.core.api.util.type.KualiDecimal[] columnSums, List<Message> errorMessages)
columns
- the columns generated by the ReconciliationParserService
javaAttributeNames
- the java attribute names corresponding to each field in columns. (see
resolveJavaAttributeNames(List)
)columnSums
- a list of KualiDecimals used to store column sums as reconciliation iterates through the origin entrieserrorMessages
- a list to which error messages will be appended.protected org.kuali.rice.core.api.util.type.KualiDecimal[] createColumnSumsArray(int size)
KualiDecimal
s of a given size, and initializes all elements to KualiDecimal.ZERO
size
- the size of the constructed arrayKualiDecimal.ZERO
protected List<ReconciliationServiceImpl.JavaAttributeAugmentedColumnReconciliation> resolveJavaAttributeNames(List<ColumnReconciliation> columns)
columns
- columns parsed by the ReconciliationParserService
ReconciliationServiceImpl.JavaAttributeAugmentedColumnReconciliation
(see class description) objects. The returned list will
have the same size as the parameter, and each element in one list corresponds to the element at the same position in
the other listprotected ReconciliationDao getReconciliationDao()
public void setReconciliationDao(ReconciliationDao reconciliationDao)
reconciliationDao
- The reconciliationDao to set.protected Class<? extends OriginEntryFull> getOriginEntryClass()
public void setOriginEntryClass(Class<? extends OriginEntryFull> originEntryClass)
originEntryClass
- The originEntryClass to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.