Class CalculatorMetaFunction
- java.lang.Object
-
- org.pentaho.di.trans.steps.calculator.CalculatorMetaFunction
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CalculatorMetaFunction()
CalculatorMetaFunction(String fieldName, int calcType, String fieldA, String fieldB, String fieldC, int valueType, int valueLength, int valuePrecision, boolean removedFromResult, String conversionMask, String decimalSymbol, String groupingSymbol, String currencySymbol)
CalculatorMetaFunction(Repository rep, org.pentaho.di.repository.ObjectId id_step, int nr)
CalculatorMetaFunction(Node calcnode)
-
Method Summary
-
-
-
Field Detail
-
XML_TAG
public static final String XML_TAG
- See Also:
- Constant Field Values
-
CALC_NONE
public static final int CALC_NONE
- See Also:
- Constant Field Values
-
CALC_CONSTANT
public static final int CALC_CONSTANT
- See Also:
- Constant Field Values
-
CALC_COPY_OF_FIELD
public static final int CALC_COPY_OF_FIELD
- See Also:
- Constant Field Values
-
CALC_ADD
public static final int CALC_ADD
- See Also:
- Constant Field Values
-
CALC_SUBTRACT
public static final int CALC_SUBTRACT
- See Also:
- Constant Field Values
-
CALC_MULTIPLY
public static final int CALC_MULTIPLY
- See Also:
- Constant Field Values
-
CALC_DIVIDE
public static final int CALC_DIVIDE
- See Also:
- Constant Field Values
-
CALC_SQUARE
public static final int CALC_SQUARE
- See Also:
- Constant Field Values
-
CALC_SQUARE_ROOT
public static final int CALC_SQUARE_ROOT
- See Also:
- Constant Field Values
-
CALC_PERCENT_1
public static final int CALC_PERCENT_1
- See Also:
- Constant Field Values
-
CALC_PERCENT_2
public static final int CALC_PERCENT_2
- See Also:
- Constant Field Values
-
CALC_PERCENT_3
public static final int CALC_PERCENT_3
- See Also:
- Constant Field Values
-
CALC_COMBINATION_1
public static final int CALC_COMBINATION_1
- See Also:
- Constant Field Values
-
CALC_COMBINATION_2
public static final int CALC_COMBINATION_2
- See Also:
- Constant Field Values
-
CALC_ROUND_1
public static final int CALC_ROUND_1
- See Also:
- Constant Field Values
-
CALC_ROUND_2
public static final int CALC_ROUND_2
- See Also:
- Constant Field Values
-
CALC_ROUND_STD_1
public static final int CALC_ROUND_STD_1
- See Also:
- Constant Field Values
-
CALC_ROUND_STD_2
public static final int CALC_ROUND_STD_2
- See Also:
- Constant Field Values
-
CALC_CEIL
public static final int CALC_CEIL
- See Also:
- Constant Field Values
-
CALC_FLOOR
public static final int CALC_FLOOR
- See Also:
- Constant Field Values
-
CALC_NVL
public static final int CALC_NVL
- See Also:
- Constant Field Values
-
CALC_ADD_DAYS
public static final int CALC_ADD_DAYS
- See Also:
- Constant Field Values
-
CALC_YEAR_OF_DATE
public static final int CALC_YEAR_OF_DATE
- See Also:
- Constant Field Values
-
CALC_MONTH_OF_DATE
public static final int CALC_MONTH_OF_DATE
- See Also:
- Constant Field Values
-
CALC_DAY_OF_YEAR
public static final int CALC_DAY_OF_YEAR
- See Also:
- Constant Field Values
-
CALC_DAY_OF_MONTH
public static final int CALC_DAY_OF_MONTH
- See Also:
- Constant Field Values
-
CALC_DAY_OF_WEEK
public static final int CALC_DAY_OF_WEEK
- See Also:
- Constant Field Values
-
CALC_WEEK_OF_YEAR
public static final int CALC_WEEK_OF_YEAR
- See Also:
- Constant Field Values
-
CALC_WEEK_OF_YEAR_ISO8601
public static final int CALC_WEEK_OF_YEAR_ISO8601
- See Also:
- Constant Field Values
-
CALC_YEAR_OF_DATE_ISO8601
public static final int CALC_YEAR_OF_DATE_ISO8601
- See Also:
- Constant Field Values
-
CALC_BYTE_TO_HEX_ENCODE
public static final int CALC_BYTE_TO_HEX_ENCODE
- See Also:
- Constant Field Values
-
CALC_HEX_TO_BYTE_DECODE
public static final int CALC_HEX_TO_BYTE_DECODE
- See Also:
- Constant Field Values
-
CALC_CHAR_TO_HEX_ENCODE
public static final int CALC_CHAR_TO_HEX_ENCODE
- See Also:
- Constant Field Values
-
CALC_HEX_TO_CHAR_DECODE
public static final int CALC_HEX_TO_CHAR_DECODE
- See Also:
- Constant Field Values
-
CALC_CRC32
public static final int CALC_CRC32
- See Also:
- Constant Field Values
-
CALC_ADLER32
public static final int CALC_ADLER32
- See Also:
- Constant Field Values
-
CALC_MD5
public static final int CALC_MD5
- See Also:
- Constant Field Values
-
CALC_SHA1
public static final int CALC_SHA1
- See Also:
- Constant Field Values
-
CALC_LEVENSHTEIN_DISTANCE
public static final int CALC_LEVENSHTEIN_DISTANCE
- See Also:
- Constant Field Values
-
CALC_METAPHONE
public static final int CALC_METAPHONE
- See Also:
- Constant Field Values
-
CALC_DOUBLE_METAPHONE
public static final int CALC_DOUBLE_METAPHONE
- See Also:
- Constant Field Values
-
CALC_ABS
public static final int CALC_ABS
- See Also:
- Constant Field Values
-
CALC_REMOVE_TIME_FROM_DATE
public static final int CALC_REMOVE_TIME_FROM_DATE
- See Also:
- Constant Field Values
-
CALC_DATE_DIFF
public static final int CALC_DATE_DIFF
- See Also:
- Constant Field Values
-
CALC_ADD3
public static final int CALC_ADD3
- See Also:
- Constant Field Values
-
CALC_INITCAP
public static final int CALC_INITCAP
- See Also:
- Constant Field Values
-
CALC_UPPER_CASE
public static final int CALC_UPPER_CASE
- See Also:
- Constant Field Values
-
CALC_LOWER_CASE
public static final int CALC_LOWER_CASE
- See Also:
- Constant Field Values
-
CALC_MASK_XML
public static final int CALC_MASK_XML
- See Also:
- Constant Field Values
-
CALC_USE_CDATA
public static final int CALC_USE_CDATA
- See Also:
- Constant Field Values
-
CALC_REMOVE_CR
public static final int CALC_REMOVE_CR
- See Also:
- Constant Field Values
-
CALC_REMOVE_LF
public static final int CALC_REMOVE_LF
- See Also:
- Constant Field Values
-
CALC_REMOVE_CRLF
public static final int CALC_REMOVE_CRLF
- See Also:
- Constant Field Values
-
CALC_REMOVE_TAB
public static final int CALC_REMOVE_TAB
- See Also:
- Constant Field Values
-
CALC_GET_ONLY_DIGITS
public static final int CALC_GET_ONLY_DIGITS
- See Also:
- Constant Field Values
-
CALC_REMOVE_DIGITS
public static final int CALC_REMOVE_DIGITS
- See Also:
- Constant Field Values
-
CALC_STRING_LEN
public static final int CALC_STRING_LEN
- See Also:
- Constant Field Values
-
CALC_LOAD_FILE_CONTENT_BINARY
public static final int CALC_LOAD_FILE_CONTENT_BINARY
- See Also:
- Constant Field Values
-
CALC_ADD_TIME_TO_DATE
public static final int CALC_ADD_TIME_TO_DATE
- See Also:
- Constant Field Values
-
CALC_QUARTER_OF_DATE
public static final int CALC_QUARTER_OF_DATE
- See Also:
- Constant Field Values
-
CALC_SUBSTITUTE_VARIABLE
public static final int CALC_SUBSTITUTE_VARIABLE
- See Also:
- Constant Field Values
-
CALC_UNESCAPE_XML
public static final int CALC_UNESCAPE_XML
- See Also:
- Constant Field Values
-
CALC_ESCAPE_HTML
public static final int CALC_ESCAPE_HTML
- See Also:
- Constant Field Values
-
CALC_UNESCAPE_HTML
public static final int CALC_UNESCAPE_HTML
- See Also:
- Constant Field Values
-
CALC_ESCAPE_SQL
public static final int CALC_ESCAPE_SQL
- See Also:
- Constant Field Values
-
CALC_DATE_WORKING_DIFF
public static final int CALC_DATE_WORKING_DIFF
- See Also:
- Constant Field Values
-
CALC_ADD_MONTHS
public static final int CALC_ADD_MONTHS
- See Also:
- Constant Field Values
-
CALC_CHECK_XML_FILE_WELL_FORMED
public static final int CALC_CHECK_XML_FILE_WELL_FORMED
- See Also:
- Constant Field Values
-
CALC_CHECK_XML_WELL_FORMED
public static final int CALC_CHECK_XML_WELL_FORMED
- See Also:
- Constant Field Values
-
CALC_GET_FILE_ENCODING
public static final int CALC_GET_FILE_ENCODING
- See Also:
- Constant Field Values
-
CALC_DAMERAU_LEVENSHTEIN
public static final int CALC_DAMERAU_LEVENSHTEIN
- See Also:
- Constant Field Values
-
CALC_NEEDLEMAN_WUNSH
public static final int CALC_NEEDLEMAN_WUNSH
- See Also:
- Constant Field Values
-
CALC_JARO
public static final int CALC_JARO
- See Also:
- Constant Field Values
-
CALC_JARO_WINKLER
public static final int CALC_JARO_WINKLER
- See Also:
- Constant Field Values
-
CALC_SOUNDEX
public static final int CALC_SOUNDEX
- See Also:
- Constant Field Values
-
CALC_REFINED_SOUNDEX
public static final int CALC_REFINED_SOUNDEX
- See Also:
- Constant Field Values
-
CALC_ADD_HOURS
public static final int CALC_ADD_HOURS
- See Also:
- Constant Field Values
-
CALC_ADD_MINUTES
public static final int CALC_ADD_MINUTES
- See Also:
- Constant Field Values
-
CALC_DATE_DIFF_MSEC
public static final int CALC_DATE_DIFF_MSEC
- See Also:
- Constant Field Values
-
CALC_DATE_DIFF_SEC
public static final int CALC_DATE_DIFF_SEC
- See Also:
- Constant Field Values
-
CALC_DATE_DIFF_MN
public static final int CALC_DATE_DIFF_MN
- See Also:
- Constant Field Values
-
CALC_DATE_DIFF_HR
public static final int CALC_DATE_DIFF_HR
- See Also:
- Constant Field Values
-
CALC_HOUR_OF_DAY
public static final int CALC_HOUR_OF_DAY
- See Also:
- Constant Field Values
-
CALC_MINUTE_OF_HOUR
public static final int CALC_MINUTE_OF_HOUR
- See Also:
- Constant Field Values
-
CALC_SECOND_OF_MINUTE
public static final int CALC_SECOND_OF_MINUTE
- See Also:
- Constant Field Values
-
CALC_ROUND_CUSTOM_1
public static final int CALC_ROUND_CUSTOM_1
- See Also:
- Constant Field Values
-
CALC_ROUND_CUSTOM_2
public static final int CALC_ROUND_CUSTOM_2
- See Also:
- Constant Field Values
-
CALC_ADD_SECONDS
public static final int CALC_ADD_SECONDS
- See Also:
- Constant Field Values
-
CALC_REMAINDER
public static final int CALC_REMAINDER
- See Also:
- Constant Field Values
-
calc_desc
public static final String[] calc_desc
-
calcLongDesc
public static final String[] calcLongDesc
-
calcDefaultResultType
public static final int[] calcDefaultResultType
-
-
Constructor Detail
-
CalculatorMetaFunction
public CalculatorMetaFunction(String fieldName, int calcType, String fieldA, String fieldB, String fieldC, int valueType, int valueLength, int valuePrecision, boolean removedFromResult, String conversionMask, String decimalSymbol, String groupingSymbol, String currencySymbol)
- Parameters:
fieldName
- out field namecalcType
- calculation type, see CALC_* set of constants definedfieldA
- name of field "A"fieldB
- name of field "B"fieldC
- name of field "C"valueType
- out value typevalueLength
- out value lengthvaluePrecision
- out value precisionconversionMask
- out value conversion maskdecimalSymbol
- out value decimal symbolgroupingSymbol
- out value grouping symbolcurrencySymbol
- out value currency symbol
-
CalculatorMetaFunction
public CalculatorMetaFunction()
-
CalculatorMetaFunction
public CalculatorMetaFunction(Node calcnode)
-
CalculatorMetaFunction
public CalculatorMetaFunction(Repository rep, org.pentaho.di.repository.ObjectId id_step, int nr) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
-
Method Detail
-
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 nr) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
getCalcFunctionType
public static int getCalcFunctionType(String desc)
-
getCalcFunctionDesc
public static String getCalcFunctionDesc(int type)
-
getCalcFunctionLongDesc
public static String getCalcFunctionLongDesc(int type)
-
getCalcFunctionDefaultResultType
public static int getCalcFunctionDefaultResultType(int type)
-
getCalcType
public int getCalcType()
- Returns:
- Returns the calcType.
-
setCalcType
public void setCalcType(int calcType)
- Parameters:
calcType
- The calcType to set.
-
getCalcTypeDesc
public String getCalcTypeDesc()
-
getCalcTypeLongDesc
public String getCalcTypeLongDesc()
-
getFieldA
public String getFieldA()
- Returns:
- Returns the fieldA.
-
setFieldA
public void setFieldA(String fieldA)
- Parameters:
fieldA
- The fieldA to set.
-
getFieldB
public String getFieldB()
- Returns:
- Returns the fieldB.
-
setFieldB
public void setFieldB(String fieldB)
- Parameters:
fieldB
- The fieldB to set.
-
getFieldC
public String getFieldC()
- Returns:
- Returns the fieldC.
-
setFieldC
public void setFieldC(String fieldC)
- Parameters:
fieldC
- The fieldC to set.
-
getFieldName
public String getFieldName()
- Returns:
- Returns the fieldName.
-
setFieldName
public void setFieldName(String fieldName)
- Parameters:
fieldName
- The fieldName to set.
-
getValueLength
public int getValueLength()
- Returns:
- Returns the valueLength.
-
setValueLength
public void setValueLength(int valueLength)
- Parameters:
valueLength
- The valueLength to set.
-
getValuePrecision
public int getValuePrecision()
- Returns:
- Returns the valuePrecision.
-
setValuePrecision
public void setValuePrecision(int valuePrecision)
- Parameters:
valuePrecision
- The valuePrecision to set.
-
getValueType
public int getValueType()
- Returns:
- Returns the valueType.
-
setValueType
public void setValueType(int valueType)
- Parameters:
valueType
- The valueType to set.
-
isRemovedFromResult
public boolean isRemovedFromResult()
- Returns:
- Returns the removedFromResult.
-
setRemovedFromResult
public void setRemovedFromResult(boolean removedFromResult)
- Parameters:
removedFromResult
- The removedFromResult 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
-
getCurrencySymbol
public String getCurrencySymbol()
- Returns:
- the currencySymbol
-
setCurrencySymbol
public void setCurrencySymbol(String currencySymbol)
- Parameters:
currencySymbol
- the currencySymbol to set
-
-