org.pentaho.di.trans.steps.validator
Class Validation

java.lang.Object
  extended by org.pentaho.di.trans.steps.validator.Validation
All Implemented Interfaces:
Cloneable

public class Validation
extends Object
implements Cloneable


Field Summary
static String XML_TAG
           
static String XML_TAG_ALLOWED
           
 
Constructor Summary
Validation()
           
Validation(Node calcnode)
           
Validation(Repository rep, ObjectId id_step, int i)
           
Validation(String name)
           
 
Method Summary
 Validation clone()
           
 boolean equals(Validation validation)
           
static Validation findValidation(List<Validation> validations, String name)
          Find a validation by name in a list of validations
 String[] getAllowedValues()
           
 String getConversionMask()
           
 int getDataType()
           
 String getDecimalSymbol()
           
 String getEndString()
           
 String getEndStringNotAllowed()
           
 String getErrorCode()
           
 String getErrorDescription()
           
 String getFieldName()
           
 String getGroupingSymbol()
           
 String getMaximumLength()
           
 String getMaximumValue()
           
 String getMinimumLength()
           
 String getMinimumValue()
           
 String getName()
           
 String getRegularExpression()
           
 String getRegularExpressionNotAllowed()
           
 String getSourcingField()
           
 StepMeta getSourcingStep()
           
 String getSourcingStepName()
           
 String getStartString()
           
 String getStartStringNotAllowed()
           
 String getXML()
           
 boolean isDataTypeVerified()
           
 boolean isNullAllowed()
           
 boolean isOnlyNullAllowed()
           
 boolean isOnlyNumericAllowed()
           
 boolean isSourcingValues()
           
 void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step, int i)
           
 void setAllowedValues(String[] allowedValues)
           
 void setConversionMask(String conversionMask)
           
 void setDataType(int dataType)
           
 void setDataTypeVerified(boolean dataTypeVerified)
           
 void setDecimalSymbol(String decimalSymbol)
           
 void setEndString(String endString)
           
 void setEndStringNotAllowed(String endStringNotAllowed)
           
 void setErrorCode(String errorCode)
           
 void setErrorDescription(String errorDescription)
           
 void setFieldName(String fieldName)
           
 void setGroupingSymbol(String groupingSymbol)
           
 void setMaximumLength(String maximumLength)
           
 void setMaximumValue(String maximumValue)
           
 void setMinimumLength(String minimumLength)
           
 void setMinimumValue(String minimumValue)
           
 void setName(String name)
           
 void setNullAllowed(boolean nullAllowed)
           
 void setOnlyNullAllowed(boolean onlyNullAllowed)
           
 void setOnlyNumericAllowed(boolean onlyNumericAllowed)
           
 void setRegularExpression(String regularExpression)
           
 void setRegularExpressionNotAllowed(String regularExpressionNotAllowed)
           
 void setSourcingField(String sourcingField)
           
 void setSourcingStep(StepMeta sourcingStep)
           
 void setSourcingStepName(String sourcingStepName)
           
 void setSourcingValues(boolean sourcingValues)
           
 void setStartString(String startString)
           
 void setStartStringNotAllowed(String startStringNotAllowed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_TAG

public static final String XML_TAG
See Also:
Constant Field Values

XML_TAG_ALLOWED

public static final String XML_TAG_ALLOWED
See Also:
Constant Field Values
Constructor Detail

Validation

public Validation()

Validation

public Validation(String name)

Validation

public Validation(Node calcnode)
           throws KettleXMLException
Throws:
KettleXMLException

Validation

public Validation(Repository rep,
                  ObjectId id_step,
                  int i)
           throws KettleException
Throws:
KettleException
Method Detail

clone

public Validation clone()
Overrides:
clone in class Object

equals

public boolean equals(Validation validation)

getXML

public String getXML()

saveRep

public void saveRep(Repository rep,
                    ObjectId id_transformation,
                    ObjectId id_step,
                    int i)
             throws KettleException
Throws:
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