Class TableColumnValuesUniqueValidator

  • All Implemented Interfaces:
    ConfigurationValidator

    public class TableColumnValuesUniqueValidator
    extends Object
    implements ConfigurationValidator
    finds duplicate values in the specified table's column. The error message returned contains the list of duplicates.
    • Constructor Detail

      • TableColumnValuesUniqueValidator

        public TableColumnValuesUniqueValidator​(String tableName,
                                                String colName,
                                                String errMsg)
        Constructor
        Parameters:
        tableName - String name of the table to find duplicates in
        colName - String name of the table column to search under
        errMsg - String to use for validation error message
    • Method Detail

      • processValue

        public List<String> processValue​(Field field)
        Method that extracts the values from a given field. For example, it gives a chance to process list of values in the field and returns a list of individual values to be checked for duplicates.
        Parameters:
        field - a field from a table's row
        Returns:
        list of Strings from the given field
      • validate

        public void validate​(Configuration configuration)
                      throws ValidationException
        Description copied from interface: ConfigurationValidator
        Implementations of this method can perform any necessary validation on all the configuration values for an adapter. This is generally useful when there are dependencies between fields and tables in an adapter.
        Specified by:
        validate in interface ConfigurationValidator
        Parameters:
        configuration - a Configuration object populated by user entered values from the GUI.
        Throws:
        ValidationException - if the configuration is invalid.