Class TransformErrorMeta
- java.lang.Object
-
- org.apache.hop.core.changed.ChangedFlag
-
- org.apache.hop.pipeline.transform.TransformErrorMeta
-
public class TransformErrorMeta extends ChangedFlag implements Cloneable
This class contains the metadata to handle proper error handling on a transform level.
-
-
Field Summary
Fields Modifier and Type Field Description static StringXML_ERROR_TAGstatic StringXML_SOURCE_TRANSFORM_TAGstatic StringXML_TARGET_TRANSFORM_TAG
-
Constructor Summary
Constructors Constructor Description TransformErrorMeta(TransformMeta sourceTransform)Create a new transform error handling metadata objectTransformErrorMeta(TransformMeta sourceTransform, TransformMeta targetTransform)Create a new transform error handling metadata objectTransformErrorMeta(TransformMeta sourceTransform, TransformMeta targetTransform, String nrErrorsValuename, String errorDescriptionsValuename, String errorFieldsValuename, String errorCodesValuename)Create a new transform error handling metadata objectTransformErrorMeta(Node node, List<TransformMeta> transforms)
-
Method Summary
-
Methods inherited from class org.apache.hop.core.changed.ChangedFlag
addObserver, clearChanged, deleteObserver, hasChanged, notifyObservers, setChanged, setChanged
-
-
-
-
Field Detail
-
XML_ERROR_TAG
public static final String XML_ERROR_TAG
- See Also:
- Constant Field Values
-
XML_SOURCE_TRANSFORM_TAG
public static final String XML_SOURCE_TRANSFORM_TAG
- See Also:
- Constant Field Values
-
XML_TARGET_TRANSFORM_TAG
public static final String XML_TARGET_TRANSFORM_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransformErrorMeta
public TransformErrorMeta(TransformMeta sourceTransform)
Create a new transform error handling metadata object- Parameters:
sourceTransform- The source transform that can send the error rows
-
TransformErrorMeta
public TransformErrorMeta(TransformMeta sourceTransform, TransformMeta targetTransform)
Create a new transform error handling metadata object- Parameters:
sourceTransform- The source transform that can send the error rowstargetTransform- The target transform to send the error rows to
-
TransformErrorMeta
public TransformErrorMeta(TransformMeta sourceTransform, TransformMeta targetTransform, String nrErrorsValuename, String errorDescriptionsValuename, String errorFieldsValuename, String errorCodesValuename)
Create a new transform error handling metadata object- Parameters:
sourceTransform- The source transform that can send the error rowstargetTransform- The target transform to send the error rows tonrErrorsValuename- the name of the field value to contain the number of errors (null or empty means it's not needed)errorDescriptionsValuename- the name of the field value to contain the error description(s) (null or empty means it's not needed)errorFieldsValuename- the name of the field value to contain the fields for which the error(s) occured (null or empty means it's not needed)errorCodesValuename- the name of the field value to contain the error code(s) (null or empty means it's not needed)
-
TransformErrorMeta
public TransformErrorMeta(Node node, List<TransformMeta> transforms)
-
-
Method Detail
-
clone
public TransformErrorMeta clone()
-
getXml
public String getXml()
-
getErrorCodesValuename
public String getErrorCodesValuename()
- Returns:
- the error codes valuename
-
setErrorCodesValuename
public void setErrorCodesValuename(String errorCodesValuename)
- Parameters:
errorCodesValuename- the error codes valuename to set
-
getErrorDescriptionsValuename
public String getErrorDescriptionsValuename()
- Returns:
- the error descriptions valuename
-
setErrorDescriptionsValuename
public void setErrorDescriptionsValuename(String errorDescriptionsValuename)
- Parameters:
errorDescriptionsValuename- the error descriptions valuename to set
-
getErrorFieldsValuename
public String getErrorFieldsValuename()
- Returns:
- the error fields valuename
-
setErrorFieldsValuename
public void setErrorFieldsValuename(String errorFieldsValuename)
- Parameters:
errorFieldsValuename- the error fields valuename to set
-
getNrErrorsValuename
public String getNrErrorsValuename()
- Returns:
- the nr errors valuename
-
setNrErrorsValuename
public void setNrErrorsValuename(String nrErrorsValuename)
- Parameters:
nrErrorsValuename- the nr errors valuename to set
-
getTargetTransform
public TransformMeta getTargetTransform()
- Returns:
- the target transform
-
setTargetTransform
public void setTargetTransform(TransformMeta targetTransform)
- Parameters:
targetTransform- the target transform to set
-
getSourceTransform
public TransformMeta getSourceTransform()
- Returns:
- The source transform can send the error rows
-
setSourceTransform
public void setSourceTransform(TransformMeta sourceTransform)
- Parameters:
sourceTransform- The source transform can send the error rows
-
isEnabled
public boolean isEnabled()
- Returns:
- the enabled flag: Is the error handling enabled?
-
setEnabled
public void setEnabled(boolean enabled)
- Parameters:
enabled- the enabled flag to set: Is the error handling enabled?
-
getErrorRowMeta
public IRowMeta getErrorRowMeta(IVariables variables)
-
addErrorRowData
public void addErrorRowData(IVariables variables, Object[] row, int startIndex, long nrErrors, String errorDescriptions, String fieldNames, String errorCodes)
-
getMaxErrors
public String getMaxErrors()
- Returns:
- the maxErrors
-
setMaxErrors
public void setMaxErrors(String maxErrors)
- Parameters:
maxErrors- the maxErrors to set
-
getMaxPercentErrors
public String getMaxPercentErrors()
- Returns:
- the maxPercentErrors
-
setMaxPercentErrors
public void setMaxPercentErrors(String maxPercentErrors)
- Parameters:
maxPercentErrors- the maxPercentErrors to set
-
getMinPercentRows
public String getMinPercentRows()
- Returns:
- the minRowsForPercent
-
setMinPercentRows
public void setMinPercentRows(String minRowsForPercent)
- Parameters:
minRowsForPercent- the minRowsForPercent to set
-
-