Package com.nt.udc.flexibleAggregator
Class FlexibleAggregatorAttributeCombinations
java.lang.Object
com.nt.udc.flexibleAggregator.FlexibleAggregatorAttributeCombinations
-
Constructor Summary
ConstructorsConstructorDescriptionFlexibleAggregatorAttributeCombinations
(LoggerIfc theLogger) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendList
(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId) This will append the new list onto the old list.void
appendLists
(NAR source, NAR dest, List attributeIds) This will append the elements from the new list onto the old list for each of the attributes specified.void
appendListsWithoutRepeat
(NAR source, NAR dest, List attributeIds) This will append the elements from the new list onto the old list for each of the attributes specified.void
appendListWithoutRepeat
(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId) This will append the new list onto the old list.boolean
compareMapEquivalence
(Map map1, Map map2) This will compare to ensure each map contains the same elements in the same order.int
getDayOfYear
(byte[] byteDate) Will calculate the day of the year for the input byte array.int
getPreviousDayOfYear
(byte[] byteDate) Will calculate the day of the year, and return the day before.getTimeFromBCD
(byte[] bcdBytes) void
keepMaxAttribute
(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId) This will put the attribute from the source into the dest only if the source is greater, or the dest doesn't exist.void
keepMaxAttributes
(NAR source, NAR dest, List attrList) This will go through all the attributes and keep the larger of the two.void
keepMinAttribute
(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId) This will put the attribute from the source into the dest only if the source is smaller, or the dest doesn't exist.void
keepMinAttributes
(NAR source, NAR dest, List attrList) This will go through all the attributes and keep the smaller of the two.void
mapAttributes
(NAR source, NAR dest, List sourceAttributeIds, List destAttributeIds) This will replace the specified attributes in the dest with those from the source, unless the source doesn't exist.void
removeAttributes
(NAR record, List attrList) This will remove the specified attributes from the NARvoid
replaceAttributes
(NAR source, NAR dest, List attributeIds) This will replace the specified attributes in the dest with those from the source, unless the source doesn't exist.void
replaceAttributesWithDelete
(NAR source, NAR dest, List attributeIds) This will replace the specified attributes in the dest with those from the source.void
stringConcat
(DCFieldContainer source, DCFieldContainer dest, String separator, FieldKey attributeId) This will append the strings for the specified attribute.void
stringConcat
(DCFieldContainer source, DCFieldContainer dest, String separator, List attributeIds) This will concatenate the strings for the specified attributes.boolean
sumAttribute
(DCFieldContainer source, DCFieldContainer dest, FieldKey id) Performs summation of the indicated attribute.boolean
sumAttributes
(NAR source, NAR dest, List attrStringList, boolean checkOverflow) Performs summation of all the indicated attributes.boolean
sumValueAttribute
(long sourceValue, DCFieldContainer dest, FieldKey id) Performs summation of the indicated attribute and the value.boolean
sumValueAttributes
(long sourceValue, NAR dest, List attrStringList, boolean checkOverflow) Performs a sum of the specified attributes and the value passed in.
-
Constructor Details
-
FlexibleAggregatorAttributeCombinations
Simple constructor.
-
-
Method Details
-
sumAttributes
Performs summation of all the indicated attributes. This will support the following types: - byte - short - int - long If checkOverflow is set, the sum will only occur if none of the operations results in an overflow. In this case, a false is returned and the dest will be unchanged. -
sumAttribute
Performs summation of the indicated attribute. Will return true if there was no overflow, false if there was an overflow. If the attribute did not exist in either the source or dest, a true is still returned and no summation is performed. In the case of an overflow, the summation will not be performed. The following types are supported: - byte - short - int - long -
keepMaxAttributes
This will go through all the attributes and keep the larger of the two. The following types are supported: - byte - short - int - long -
keepMaxAttribute
This will put the attribute from the source into the dest only if the source is greater, or the dest doesn't exist. -
keepMinAttributes
This will go through all the attributes and keep the smaller of the two. The following types are supported: - byte - short - int - long -
mapAttributes
This will replace the specified attributes in the dest with those from the source, unless the source doesn't exist. The source and dest have separate attribute IDs. -
keepMinAttribute
This will put the attribute from the source into the dest only if the source is smaller, or the dest doesn't exist. -
appendLists
This will append the elements from the new list onto the old list for each of the attributes specified. -
appendList
This will append the new list onto the old list. -
appendListsWithoutRepeat
This will append the elements from the new list onto the old list for each of the attributes specified. -
appendListWithoutRepeat
public void appendListWithoutRepeat(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId) This will append the new list onto the old list. -
compareMapEquivalence
This will compare to ensure each map contains the same elements in the same order. If so, it will return true. -
sumValueAttributes
public boolean sumValueAttributes(long sourceValue, NAR dest, List attrStringList, boolean checkOverflow) Performs a sum of the specified attributes and the value passed in. This will support the following types: - byte - short - int - long If checkOverflow is set, the sum will only occur if none of the operations results in an overflow. In this case, a false is returned and the dest will be unchanged. -
sumValueAttribute
Performs summation of the indicated attribute and the value. Will return true if there was no overflow, false if there was an overflow. If the attribute did not exist a true is still returned and the value of the constant passed in is set in the destination. The following types are supported: - byte - short - int - long -
stringConcat
public void stringConcat(DCFieldContainer source, DCFieldContainer dest, String separator, List attributeIds) This will concatenate the strings for the specified attributes. -
stringConcat
public void stringConcat(DCFieldContainer source, DCFieldContainer dest, String separator, FieldKey attributeId) This will append the strings for the specified attribute. -
replaceAttributes
This will replace the specified attributes in the dest with those from the source, unless the source doesn't exist. -
replaceAttributesWithDelete
This will replace the specified attributes in the dest with those from the source. If the source attribute doesn't exist, remove this attribute from the dest also. -
getDayOfYear
public int getDayOfYear(byte[] byteDate) Will calculate the day of the year for the input byte array. -
getPreviousDayOfYear
public int getPreviousDayOfYear(byte[] byteDate) Will calculate the day of the year, and return the day before. -
getTimeFromBCD
-
removeAttributes
This will remove the specified attributes from the NAR
-