Class ImportDetailsUtils

java.lang.Object
com.illumon.iris.validation.ImportDetailsUtils

public class ImportDetailsUtils
extends Object
Functionality for analyzing import details.
  • Method Details

    • sumLong

      public static long sumLong​(String property, Properties... importDetails)
      Sum all of the values for a given property. The property is assumed to be a long type.
      Parameters:
      property - import details key for the property of interest
      importDetails - import details
      Returns:
      long sum of the property over all import details
    • sumOptionalLong

      @Nullable public static Long sumOptionalLong​(String property, Properties... importDetails)
      Sum all of the values for a given property. The property is assumed to be a long type. Return null if no properties are found with the specified name.
      Parameters:
      property - import details key for the property of interest
      importDetails - import details
      Returns:
      long sum of the property over all import details, or null if no properties are found with the specified name
    • sumDouble

      public static double sumDouble​(String property, Properties... importDetails)
      Sum all of the values for a given property. The property is assumed to be a floating point type.
      Parameters:
      property - import details key for the property of interest
      importDetails - import details
      Returns:
      floating point sum of the property over all import details
    • getVals

      public static String[] getVals​(String property, Properties... importDetails)
      Gets all the values for a given property. Missing values are indicated by null.
      Parameters:
      property - import details key for the property of interest
      importDetails - import details
      Returns:
      all the values for a given property. Missing values are indicated by null.
    • uniqueVals

      public static Set<String> uniqueVals​(String property, String splitRegex, Properties... importDetails)
      Gets the unique values for a given property.
      Parameters:
      property - import details key for the property of interest
      splitRegex - regular expression to split the property values; null if the property should not be split
      importDetails - import details
      Returns:
      set of unique values for the property