Class FlexibleAggregatorAttributeCombinations

java.lang.Object
com.nt.udc.flexibleAggregator.FlexibleAggregatorAttributeCombinations

public class FlexibleAggregatorAttributeCombinations extends Object
  • Constructor Details

    • FlexibleAggregatorAttributeCombinations

      public FlexibleAggregatorAttributeCombinations(LoggerIfc theLogger)
      Simple constructor.
  • Method Details

    • sumAttributes

      public boolean sumAttributes(NAR source, NAR dest, List attrStringList, boolean checkOverflow)
      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

      public boolean sumAttribute(DCFieldContainer source, DCFieldContainer dest, FieldKey id)
      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

      public void keepMaxAttributes(NAR source, NAR dest, List attrList)
      This will go through all the attributes and keep the larger of the two. The following types are supported: - byte - short - int - long
    • keepMaxAttribute

      public 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.
    • keepMinAttributes

      public void keepMinAttributes(NAR source, NAR dest, List attrList)
      This will go through all the attributes and keep the smaller of the two. The following types are supported: - byte - short - int - long
    • mapAttributes

      public 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. The source and dest have separate attribute IDs.
    • keepMinAttribute

      public 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.
    • appendLists

      public 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.
    • appendList

      public void appendList(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId)
      This will append the new list onto the old list.
    • appendListsWithoutRepeat

      public 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.
    • appendListWithoutRepeat

      public void appendListWithoutRepeat(DCFieldContainer source, DCFieldContainer dest, FieldKey attributeId)
      This will append the new list onto the old list.
    • compareMapEquivalence

      public boolean compareMapEquivalence(Map map1, Map map2)
      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

      public boolean sumValueAttribute(long sourceValue, DCFieldContainer dest, FieldKey id)
      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

      public void 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.
    • replaceAttributesWithDelete

      public void replaceAttributesWithDelete(NAR source, NAR dest, List attributeIds)
      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

      public Calendar getTimeFromBCD(byte[] bcdBytes)
    • removeAttributes

      public void removeAttributes(NAR record, List attrList)
      This will remove the specified attributes from the NAR