|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.gl.document.CorrectionDocumentUtils
public class CorrectionDocumentUtils
This class provides utility methods for the correction document
Field Summary | |
---|---|
static int |
DEFAULT_RECORD_COUNT_FUNCTIONALITY_LIMIT
|
static int |
DEFAULT_RECORDS_PER_PAGE
|
static int |
RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_NONE
The GLCP document will always be on restricted functionality mode, regardless of input group size |
static int |
RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_UNLIMITED
The GLCP document will never be on restricted functionality mode, regardless of input group size |
Constructor Summary | |
---|---|
CorrectionDocumentUtils()
|
Method Summary | |
---|---|
static OriginEntryFull |
applyCriteriaToEntry(OriginEntryFull entry,
boolean matchCriteriaOnly,
List<CorrectionChangeGroup> changeCriteriaGroups)
Applies a list of change criteria groups to an origin entry. |
static boolean |
compareStringData(CorrectionCriteria cc,
String fieldTestValue,
String fieldActualValueString)
Compares string data |
static boolean |
compareTo(int compareTo,
String operatorCode)
Returns true is compared indicator matches |
static String |
convertToString(Object fieldActualValue,
String fieldType)
Converts the value into a string, with the appropriate formatting |
static void |
copyStatisticsToDocument(OriginEntryStatistics statistics,
GeneralLedgerCorrectionProcessDocument document)
Sets document with the statistics data |
static boolean |
doesEntryMatchAnyCriteriaGroups(OriginEntryFull entry,
Collection<CorrectionChangeGroup> groups)
Returns whether the entry matches any of the criteria groups |
static boolean |
entryMatchesCriteria(CorrectionCriteria cc,
OriginEntryFull oe)
Returns whether an origin entry matches the passed in criteria. |
static int |
getRecordCountFunctionalityLimit()
This method returns the limit for record count functionality |
static int |
getRecordsPerPage()
This method returns the number of records per page |
static OriginEntryStatistics |
getStatistics(Collection<OriginEntryFull> entries)
Computes the statistics (credit amount, debit amount, row count) of a collection of origin entries. |
static boolean |
isBudget(OriginEntryFull oe)
Returns whether the origin entry represents a budget |
static boolean |
isCredit(OriginEntryFull oe)
Returns whether the origin entry represents a credit |
static boolean |
isDebit(OriginEntryFull oe)
Returns whether the origin entry represents a debit |
static boolean |
isRestrictedFunctionalityMode(int inputGroupSize,
int recordCountFunctionalityLimit)
This method returns true if input group size is greater than or equal to record count functionality limit |
static void |
setAllEntryIdsToNull(Collection<OriginEntryFull> originEntries)
Sets all origin entries' entry IDs to null within the collection. |
static void |
setSequentialEntryIds(Collection<OriginEntryFull> originEntries)
Sets all origin entries' entry IDs to be sequential starting from 0 in the collection |
static void |
updateStatisticsWithEntry(OriginEntryFull entry,
OriginEntryStatistics statistics)
Given an instance of statistics, it adds information from the passed in entry to the statistics |
static boolean |
validCorrectionChangeForAdding(CorrectionChange correctionChange)
When a correction change is about to be added to a group, this will check if it is valid, meaning that the field name is not blank |
static boolean |
validCorrectionChangeForSaving(CorrectionChange correctionChange)
When a document is about to be saved, this will check if it is valid, meaning that the field name and value are both blank |
static boolean |
validCorrectionCriteriaForAdding(CorrectionCriteria correctionCriteria)
When a correction criterion is about to be added to a group, this will check if it is valid, meaning that the field name is not blank |
static boolean |
validCorrectionCriteriaForSaving(CorrectionCriteria correctionCriteria)
When a document is about to be saved, this will check if it is valid, meaning that the field name and value are both blank |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_RECORD_COUNT_FUNCTIONALITY_LIMIT
public static final int RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_NONE
public static final int RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_UNLIMITED
public static final int DEFAULT_RECORDS_PER_PAGE
Constructor Detail |
---|
public CorrectionDocumentUtils()
Method Detail |
---|
public static int getRecordCountFunctionalityLimit()
public static int getRecordsPerPage()
public static boolean isRestrictedFunctionalityMode(int inputGroupSize, int recordCountFunctionalityLimit)
inputGroupSize
- size of input groupsrecordCountFunctionalityLimit
- limit for record count functionality
public static boolean validCorrectionCriteriaForAdding(CorrectionCriteria correctionCriteria)
correctionCriteria
- validated correction criteria
public static boolean validCorrectionCriteriaForSaving(CorrectionCriteria correctionCriteria)
correctionCriteria
- validated correction criteria
public static boolean validCorrectionChangeForAdding(CorrectionChange correctionChange)
correctionChange
- validated correction change
public static boolean validCorrectionChangeForSaving(CorrectionChange correctionChange)
correctionCriteria
- validated correction criteria
public static void setAllEntryIdsToNull(Collection<OriginEntryFull> originEntries)
originEntries
- collection of origin entriespublic static void setSequentialEntryIds(Collection<OriginEntryFull> originEntries)
originEntries
- collection of origin entriespublic static boolean entryMatchesCriteria(CorrectionCriteria cc, OriginEntryFull oe)
cc
- correction criteria to test against origin entryoe
- origin entry to test
public static boolean compareStringData(CorrectionCriteria cc, String fieldTestValue, String fieldActualValueString)
cc
- criteriafieldTestValue
- test valuefieldActualValueString
- actual value
public static boolean compareTo(int compareTo, String operatorCode)
compareTo
- operatorCode
-
public static String convertToString(Object fieldActualValue, String fieldType)
fieldActualValue
- actual field valuefieldType
- field type (i.e. "String", "Integer", "Date")
public static OriginEntryFull applyCriteriaToEntry(OriginEntryFull entry, boolean matchCriteriaOnly, List<CorrectionChangeGroup> changeCriteriaGroups)
entry
- origin entrymatchCriteriaOnly
- if true and no criteria match, then this method will return nullchangeCriteriaGroups
- list of change criteria groups to apply
public static boolean doesEntryMatchAnyCriteriaGroups(OriginEntryFull entry, Collection<CorrectionChangeGroup> groups)
entry
- origin entrygroups
- collection of correction change group
public static OriginEntryStatistics getStatistics(Collection<OriginEntryFull> entries)
entries
- list of orgin entry entries
OriginEntryStatistics
statistics (credit amount, debit amount, row count) of a collection of origin entries.public static boolean isDebit(OriginEntryFull oe)
oe
- origin entry
public static boolean isBudget(OriginEntryFull oe)
oe
- origin entry
public static boolean isCredit(OriginEntryFull oe)
oe
- origin entry
public static void updateStatisticsWithEntry(OriginEntryFull entry, OriginEntryStatistics statistics)
entry
- origin entrystatistics
- adds statistics from the passed in origin entry to the passed in statisticspublic static void copyStatisticsToDocument(OriginEntryStatistics statistics, GeneralLedgerCorrectionProcessDocument document)
statistics
- origin entry statistics that are being used to set documentdocument
- document with statistic information being set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |