| java.lang.Object org.kuali.module.gl.util.CorrectionDocumentUtils
CorrectionDocumentUtils | public class CorrectionDocumentUtils (Code) | | This class provides utility methods for the correction document
|
Method Summary | |
public static OriginEntryFull | applyCriteriaToEntry(OriginEntryFull entry, boolean matchCriteriaOnly, List<CorrectionChangeGroup> changeCriteriaGroups) Applies a list of change criteria groups to an origin entry. | public static String | convertToString(Object fieldActualValue, String fieldType) Converts the value into a string, with the appropriate formatting
Parameters: fieldActualValue - actual field value Parameters: fieldType - field type (i.e. | public static void | copyStatisticsToDocument(OriginEntryStatistics statistics, CorrectionDocument document) | public static boolean | doesEntryMatchAnyCriteriaGroups(OriginEntryFull entry, Collection<CorrectionChangeGroup> groups) | public static boolean | doesLaborEntryMatchAnyCriteriaGroups(OriginEntryFull entry, Collection<CorrectionChangeGroup> groups) | public static boolean | entryMatchesCriteria(CorrectionCriteria cc, OriginEntryFull oe) Returns whether an origin entry matches the passed in criteria. | public static int | getRecordCountFunctionalityLimit() | public static int | getRecordsPerPage() | public static OriginEntryStatistics | getStatistics(Collection<OriginEntryFull> entries) Computes the statistics (credit amount, debit amount, row count) of a collection of origin entries. | public static boolean | isBudget(OriginEntryFull oe) | public static boolean | isCredit(OriginEntryFull oe) | public static boolean | isDebit(OriginEntryFull oe) | public static boolean | isRestrictedFunctionalityMode(int inputGroupSize, int recordCountFunctionalityLimit) | public static boolean | laborEntryMatchesCriteria(CorrectionCriteria cc, OriginEntryFull oe) Returns whether an origin entry matches the passed in criteria. | public static void | setAllEntryIdsToNull(Collection<OriginEntryFull> originEntries) Sets all origin entries' entry IDs to null within the collection. | public static void | setSequentialEntryIds(Collection<OriginEntryFull> originEntries) | public static void | updateStatisticsWithEntry(OriginEntryFull entry, OriginEntryStatistics statistics) | public static boolean | validCorrectionChangeForAdding(CorrectionChange correctionChange) | public 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
Parameters: correctionCriteria - validated correction criteria true if correction change is valid for saving (i.e. | public static boolean | validCorrectionCriteriaForAdding(CorrectionCriteria correctionCriteria) | public static boolean | validCorrectionCriteriaForSaving(CorrectionCriteria correctionCriteria) |
DEFAULT_RECORDS_PER_PAGE | final public static int DEFAULT_RECORDS_PER_PAGE(Code) | | |
DEFAULT_RECORD_COUNT_FUNCTIONALITY_LIMIT | final public static int DEFAULT_RECORD_COUNT_FUNCTIONALITY_LIMIT(Code) | | |
RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_NONE | final public static int RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_NONE(Code) | | The GLCP document will always be on restricted functionality mode, regardless of input group size
|
RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_UNLIMITED | final public static int RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_UNLIMITED(Code) | | The GLCP document will never be on restricted functionality mode, regardless of input group size
|
applyCriteriaToEntry | public static OriginEntryFull applyCriteriaToEntry(OriginEntryFull entry, boolean matchCriteriaOnly, List<CorrectionChangeGroup> changeCriteriaGroups)(Code) | | Applies a list of change criteria groups to an origin entry. Note that the returned value, if not null, is a reference to the
same instance as the origin entry passed in (i.e. intentional side effect)
Parameters: entry - origin entry Parameters: matchCriteriaOnly - if true and no criteria match, then this method will return null Parameters: changeCriteriaGroups - list of change criteria groups to apply the passed in entry instance, or null (see above) |
convertToString | public static String convertToString(Object fieldActualValue, String fieldType)(Code) | | Converts the value into a string, with the appropriate formatting
Parameters: fieldActualValue - actual field value Parameters: fieldType - field type (i.e. "String", "Integer", "Date") String object value as a string |
copyStatisticsToDocument | public static void copyStatisticsToDocument(OriginEntryStatistics statistics, CorrectionDocument document)(Code) | | Sets document with the statistics data
Parameters: statistics - origin entry statistics that are being used to set document Parameters: document - document with statistic information being set |
doesEntryMatchAnyCriteriaGroups | public static boolean doesEntryMatchAnyCriteriaGroups(OriginEntryFull entry, Collection<CorrectionChangeGroup> groups)(Code) | | Returns whether the entry matches any of the criteria groups
Parameters: entry - origin entry Parameters: groups - collection of correction change group true if origin entry matches any of the criteria groups |
doesLaborEntryMatchAnyCriteriaGroups | public static boolean doesLaborEntryMatchAnyCriteriaGroups(OriginEntryFull entry, Collection<CorrectionChangeGroup> groups)(Code) | | Returns whether the labor entry matches any of the criteria groups
Parameters: entry - labor origin entry Parameters: groups - collection of correction change group true if labor origin entry matches any of the criteria groups |
entryMatchesCriteria | public static boolean entryMatchesCriteria(CorrectionCriteria cc, OriginEntryFull oe)(Code) | | Returns whether an origin entry matches the passed in criteria. If both the criteria and actual value are both String types
and are empty, null, or whitespace only, then they will match.
Parameters: cc - correction criteria to test against origin entry Parameters: oe - origin entry to test true if origin entry matches the passed in criteria |
getRecordCountFunctionalityLimit | public static int getRecordCountFunctionalityLimit()(Code) | | This method returns the limit for record count functionality
limit for record count functionality |
getRecordsPerPage | public static int getRecordsPerPage()(Code) | | This method returns the number of records per page
number of records per page |
isBudget | public static boolean isBudget(OriginEntryFull oe)(Code) | | Returns whether the origin entry represents a budget
Parameters: oe - origin entry true if origin entry represents a budget |
isCredit | public static boolean isCredit(OriginEntryFull oe)(Code) | | Returns whether the origin entry represents a credit
Parameters: oe - origin entry true if origin entry represents a credit |
isDebit | public static boolean isDebit(OriginEntryFull oe)(Code) | | Returns whether the origin entry represents a debit
Parameters: oe - origin entry true if origin entry represents a debit |
isRestrictedFunctionalityMode | public static boolean isRestrictedFunctionalityMode(int inputGroupSize, int recordCountFunctionalityLimit)(Code) | | This method returns true if input group size is greater than or equal to record count functionality limit
Parameters: inputGroupSize - size of input groups Parameters: recordCountFunctionalityLimit - limit for record count functionality true if input group size is greater than or equal to record count functionality limit |
laborEntryMatchesCriteria | public static boolean laborEntryMatchesCriteria(CorrectionCriteria cc, OriginEntryFull oe)(Code) | | Returns whether an origin entry matches the passed in criteria. If both the criteria and actual value are both String types
and are empty, null, or whitespace only, then they will match.
Parameters: cc - correction criteria to test against origin entry Parameters: oe - origin entry to test true if origin entry matches the passed in criteria |
setAllEntryIdsToNull | public static void setAllEntryIdsToNull(Collection<OriginEntryFull> originEntries)(Code) | | Sets all origin entries' entry IDs to null within the collection.
Parameters: originEntries - collection of origin entries |
setSequentialEntryIds | public static void setSequentialEntryIds(Collection<OriginEntryFull> originEntries)(Code) | | Sets all origin entries' entry IDs to be sequential starting from 0 in the collection
Parameters: originEntries - collection of origin entries |
updateStatisticsWithEntry | public static void updateStatisticsWithEntry(OriginEntryFull entry, OriginEntryStatistics statistics)(Code) | | Given an instance of statistics, it adds information from the passed in entry to the statistics
Parameters: entry - origin entry Parameters: statistics - adds statistics from the passed in origin entry to the passed in statistics |
validCorrectionChangeForAdding | public static boolean validCorrectionChangeForAdding(CorrectionChange correctionChange)(Code) | | 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
Parameters: correctionChange - validated correction change true is correction change is valid for adding |
validCorrectionChangeForSaving | public static boolean validCorrectionChangeForSaving(CorrectionChange correctionChange)(Code) | | 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
Parameters: correctionCriteria - validated correction criteria true if correction change is valid for saving (i.e. correction change is null or correction field name and field value are blank) |
validCorrectionCriteriaForAdding | public static boolean validCorrectionCriteriaForAdding(CorrectionCriteria correctionCriteria)(Code) | | 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
Parameters: correctionCriteria - validated correction criteria true if correction criteria is valid for adding |
validCorrectionCriteriaForSaving | public static boolean validCorrectionCriteriaForSaving(CorrectionCriteria correctionCriteria)(Code) | | 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
Parameters: correctionCriteria - validated correction criteria true if correction criteria is valid for saving |
|
|