Class Validation

    • Constructor Detail

      • Validation

        public Validation()
      • Validation

        public Validation​(String name)
      • Validation

        public Validation​(Node calcnode)
                   throws org.pentaho.di.core.exception.KettleXMLException
        Throws:
        org.pentaho.di.core.exception.KettleXMLException
      • Validation

        public Validation​(Repository rep,
                          org.pentaho.di.repository.ObjectId id_step,
                          int i)
                   throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
    • Method Detail

      • equals

        public boolean equals​(Validation validation)
      • getXML

        public String getXML()
      • saveRep

        public void saveRep​(Repository rep,
                            org.pentaho.metastore.api.IMetaStore metaStore,
                            org.pentaho.di.repository.ObjectId id_transformation,
                            org.pentaho.di.repository.ObjectId id_step,
                            int i)
                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getFieldName

        public String getFieldName()
        Returns:
        the field name to validate
      • setFieldName

        public void setFieldName​(String fieldName)
        Parameters:
        fieldName - the field name to validate
      • getMaximumLength

        public String getMaximumLength()
        Returns:
        the maximumLength
      • setMaximumLength

        public void setMaximumLength​(String maximumLength)
        Parameters:
        maximumLength - the maximumLength to set
      • getMinimumLength

        public String getMinimumLength()
        Returns:
        the minimumLength
      • setMinimumLength

        public void setMinimumLength​(String minimumLength)
        Parameters:
        minimumLength - the minimumLength to set
      • isNullAllowed

        public boolean isNullAllowed()
        Returns:
        the nullAllowed
      • setNullAllowed

        public void setNullAllowed​(boolean nullAllowed)
        Parameters:
        nullAllowed - the nullAllowed to set
      • getDataType

        public int getDataType()
        Returns:
        the dataType
      • setDataType

        public void setDataType​(int dataType)
        Parameters:
        dataType - the dataType to set
      • getConversionMask

        public String getConversionMask()
        Returns:
        the conversionMask
      • setConversionMask

        public void setConversionMask​(String conversionMask)
        Parameters:
        conversionMask - the conversionMask to set
      • getDecimalSymbol

        public String getDecimalSymbol()
        Returns:
        the decimalSymbol
      • setDecimalSymbol

        public void setDecimalSymbol​(String decimalSymbol)
        Parameters:
        decimalSymbol - the decimalSymbol to set
      • getGroupingSymbol

        public String getGroupingSymbol()
        Returns:
        the groupingSymbol
      • setGroupingSymbol

        public void setGroupingSymbol​(String groupingSymbol)
        Parameters:
        groupingSymbol - the groupingSymbol to set
      • getMinimumValue

        public String getMinimumValue()
        Returns:
        the minimumValue
      • setMinimumValue

        public void setMinimumValue​(String minimumValue)
        Parameters:
        minimumValue - the minimumValue to set
      • getMaximumValue

        public String getMaximumValue()
        Returns:
        the maximumValue
      • setMaximumValue

        public void setMaximumValue​(String maximumValue)
        Parameters:
        maximumValue - the maximumValue to set
      • getAllowedValues

        public String[] getAllowedValues()
        Returns:
        the allowedValues
      • setAllowedValues

        public void setAllowedValues​(String[] allowedValues)
        Parameters:
        allowedValues - the allowedValues to set
      • isDataTypeVerified

        public boolean isDataTypeVerified()
        Returns:
        the dataTypeVerified
      • setDataTypeVerified

        public void setDataTypeVerified​(boolean dataTypeVerified)
        Parameters:
        dataTypeVerified - the dataTypeVerified to set
      • getErrorCode

        public String getErrorCode()
        Returns:
        the errorCode
      • setErrorCode

        public void setErrorCode​(String errorCode)
        Parameters:
        errorCode - the errorCode to set
      • getErrorDescription

        public String getErrorDescription()
        Returns:
        the errorDescription
      • setErrorDescription

        public void setErrorDescription​(String errorDescription)
        Parameters:
        errorDescription - the errorDescription to set
      • isOnlyNumericAllowed

        public boolean isOnlyNumericAllowed()
        Returns:
        true if only numeric values are allowed: A numeric data type, a date or a String containing digits only
      • getStartString

        public String getStartString()
        Returns:
        the startString
      • setStartString

        public void setStartString​(String startString)
        Parameters:
        startString - the startString to set
      • getStartStringNotAllowed

        public String getStartStringNotAllowed()
        Returns:
        the startStringNotAllowed
      • setStartStringNotAllowed

        public void setStartStringNotAllowed​(String startStringNotAllowed)
        Parameters:
        startStringNotAllowed - the startStringNotAllowed to set
      • getEndString

        public String getEndString()
        Returns:
        the endString
      • setEndString

        public void setEndString​(String endString)
        Parameters:
        endString - the endString to set
      • getEndStringNotAllowed

        public String getEndStringNotAllowed()
        Returns:
        the endStringNotAllowed
      • setEndStringNotAllowed

        public void setEndStringNotAllowed​(String endStringNotAllowed)
        Parameters:
        endStringNotAllowed - the endStringNotAllowed to set
      • setOnlyNumericAllowed

        public void setOnlyNumericAllowed​(boolean onlyNumericAllowed)
        Parameters:
        onlyNumericAllowed - the onlyNumericAllowed to set
      • getRegularExpression

        public String getRegularExpression()
        Returns:
        the regularExpression
      • setRegularExpression

        public void setRegularExpression​(String regularExpression)
        Parameters:
        regularExpression - the regularExpression to set
      • getName

        public String getName()
        Returns:
        the name of this validation
      • setName

        public void setName​(String name)
        Parameters:
        name - the new name for this validation
      • getRegularExpressionNotAllowed

        public String getRegularExpressionNotAllowed()
        Returns:
        the regularExpressionNotAllowed
      • setRegularExpressionNotAllowed

        public void setRegularExpressionNotAllowed​(String regularExpressionNotAllowed)
        Parameters:
        regularExpressionNotAllowed - the regularExpressionNotAllowed to set
      • findValidation

        public static Validation findValidation​(List<Validation> validations,
                                                String name)
        Find a validation by name in a list of validations
        Parameters:
        validations - The list to search
        name - the name to search for
        Returns:
        the validation if one matches or null if none is found.
      • isOnlyNullAllowed

        public boolean isOnlyNullAllowed()
        Returns:
        the onlyNullAllowed
      • setOnlyNullAllowed

        public void setOnlyNullAllowed​(boolean onlyNullAllowed)
        Parameters:
        onlyNullAllowed - the onlyNullAllowed to set
      • isSourcingValues

        public boolean isSourcingValues()
        Returns:
        the sourcingValues
      • setSourcingValues

        public void setSourcingValues​(boolean sourcingValues)
        Parameters:
        sourcingValues - the sourcingValues to set
      • getSourcingField

        public String getSourcingField()
        Returns:
        the sourcingField
      • setSourcingField

        public void setSourcingField​(String sourcingField)
        Parameters:
        sourcingField - the sourcingField to set
      • getSourcingStepName

        public String getSourcingStepName()
        Returns:
        the sourcingStepName
      • setSourcingStepName

        public void setSourcingStepName​(String sourcingStepName)
        Parameters:
        sourcingStepName - the sourcingStepName to set
      • getSourcingStep

        public StepMeta getSourcingStep()
        Returns:
        the sourcingStep
      • setSourcingStep

        public void setSourcingStep​(StepMeta sourcingStep)
        Parameters:
        sourcingStep - the sourcingStep to set