This class helps implement AccountingLine overrides. It is not persisted itself, but it simplifies working with the persisted
codes. Instances break the code into components. Static methods help with the AccountingLine.
mask(AccountingLineOverride mask) Returns the AccountingLineOverride that has the components of this AccountingLineOverride minus any components not in the
given mask.
populateFromInput(AccountingLine line) On the given AccountingLine, converts override input checkboxes from a Struts Form into a persistable override code.
The names of the AccountingLine properties that the processForOutput() and determineNeededOverrides() methods use. Callers of
those methods may need to refresh these fields from OJB.
Gets the code of this override.
the code of this override.
hasComponent
public boolean hasComponent(Integer component)(Code)
Checks whether this override contains the given component.
Parameters: component - whether this override contains the given component.
isValidCode
public static boolean isValidCode(String code)(Code)
Returns whether the given String is a valid override code.
Parameters: code - whether the given String is a valid override code.
isValidComponentSet
public static boolean isValidComponentSet(Integer[] components)(Code)
Returns whether the given Integers are a valid set of components. Some combinations of components are invalid and have no
code defined.
Parameters: components - whether the given Integers are a valid set of components.
Returns whether this override, when masked by the given override, is valid. Some combinations of components have no override
code defined.
Parameters: mask - whether this override, when masked by the given override, is valid.
Returns the AccountingLineOverride that has the components of this AccountingLineOverride minus any components not in the
given mask. This is like &(a bit-wise and), if the components were bits.
Parameters: mask - the AccountingLineOverride that has the components of this AccountingLineOverride minus any components not in thegiven mask. throws: IllegalArgumentException - if there is no such valid combination of components
needsExpiredAccountOverride
public static boolean needsExpiredAccountOverride(Account account)(Code)
Returns whether the given account needs an expired account override.
Parameters: account - whether the given account needs an expired account override.
needsNonFringAccountOverride
public static boolean needsNonFringAccountOverride(Account account)(Code)
Returns whether the given account needs an expired account override.
Parameters: account - whether the given account needs an expired account override.
needsObjectBudgetOverride
public static boolean needsObjectBudgetOverride(Account account, ObjectCode objectCode)(Code)
Returns whether the given object code needs an object budget override
Parameters: account - whether the given object code needs an object budget override
Prepares the given AccountingLine in a Struts Action for display by a JSP. This means converting the override code to
checkboxes for display and input, as well as analysing the accounting line and determining which override checkboxes are
needed.
Parameters: line -
Factory method from code.
Parameters: code - the override code the AccountingLineOverride instance corresponding to the given code. throws: IllegalArgumentException - if the given code is not valid
Factory method from components.
Parameters: components - the override components, treated as a set the AccountingLineOverride instance corresponding to the given component set. throws: IllegalArgumentException - if the given set of components is not valid