Class CalculatorMetaFunction
java.lang.Object
org.pentaho.di.trans.steps.calculator.CalculatorMetaFunction
- All Implemented Interfaces:
Cloneable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int[]
static final String[]
static final String
-
Constructor Summary
ConstructorDescriptionCalculatorMetaFunction
(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
Modifier and TypeMethodDescriptionclone()
boolean
static int
getCalcFunctionDefaultResultType
(int type) static String
getCalcFunctionDesc
(int type) static String
getCalcFunctionLongDesc
(int type) static int
getCalcFunctionType
(String desc) int
int
int
int
getXML()
int
hashCode()
boolean
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) void
setCalcType
(int calcType) void
setConversionMask
(String conversionMask) void
setCurrencySymbol
(String currencySymbol) void
setDecimalSymbol
(String decimalSymbol) void
void
void
void
setFieldName
(String fieldName) void
setGroupingSymbol
(String groupingSymbol) void
setRemovedFromResult
(boolean removedFromResult) void
setValueLength
(int valueLength) void
setValuePrecision
(int valuePrecision) void
setValueType
(int valueType)
-
Field Details
-
XML_TAG
- See Also:
-
CALC_NONE
public static final int CALC_NONE- See Also:
-
CALC_CONSTANT
public static final int CALC_CONSTANT- See Also:
-
CALC_COPY_OF_FIELD
public static final int CALC_COPY_OF_FIELD- See Also:
-
CALC_ADD
public static final int CALC_ADD- See Also:
-
CALC_SUBTRACT
public static final int CALC_SUBTRACT- See Also:
-
CALC_MULTIPLY
public static final int CALC_MULTIPLY- See Also:
-
CALC_DIVIDE
public static final int CALC_DIVIDE- See Also:
-
CALC_SQUARE
public static final int CALC_SQUARE- See Also:
-
CALC_SQUARE_ROOT
public static final int CALC_SQUARE_ROOT- See Also:
-
CALC_PERCENT_1
public static final int CALC_PERCENT_1- See Also:
-
CALC_PERCENT_2
public static final int CALC_PERCENT_2- See Also:
-
CALC_PERCENT_3
public static final int CALC_PERCENT_3- See Also:
-
CALC_COMBINATION_1
public static final int CALC_COMBINATION_1- See Also:
-
CALC_COMBINATION_2
public static final int CALC_COMBINATION_2- See Also:
-
CALC_ROUND_1
public static final int CALC_ROUND_1- See Also:
-
CALC_ROUND_2
public static final int CALC_ROUND_2- See Also:
-
CALC_ROUND_STD_1
public static final int CALC_ROUND_STD_1- See Also:
-
CALC_ROUND_STD_2
public static final int CALC_ROUND_STD_2- See Also:
-
CALC_CEIL
public static final int CALC_CEIL- See Also:
-
CALC_FLOOR
public static final int CALC_FLOOR- See Also:
-
CALC_NVL
public static final int CALC_NVL- See Also:
-
CALC_ADD_DAYS
public static final int CALC_ADD_DAYS- See Also:
-
CALC_YEAR_OF_DATE
public static final int CALC_YEAR_OF_DATE- See Also:
-
CALC_MONTH_OF_DATE
public static final int CALC_MONTH_OF_DATE- See Also:
-
CALC_DAY_OF_YEAR
public static final int CALC_DAY_OF_YEAR- See Also:
-
CALC_DAY_OF_MONTH
public static final int CALC_DAY_OF_MONTH- See Also:
-
CALC_DAY_OF_WEEK
public static final int CALC_DAY_OF_WEEK- See Also:
-
CALC_WEEK_OF_YEAR
public static final int CALC_WEEK_OF_YEAR- See Also:
-
CALC_WEEK_OF_YEAR_ISO8601
public static final int CALC_WEEK_OF_YEAR_ISO8601- See Also:
-
CALC_YEAR_OF_DATE_ISO8601
public static final int CALC_YEAR_OF_DATE_ISO8601- See Also:
-
CALC_BYTE_TO_HEX_ENCODE
public static final int CALC_BYTE_TO_HEX_ENCODE- See Also:
-
CALC_HEX_TO_BYTE_DECODE
public static final int CALC_HEX_TO_BYTE_DECODE- See Also:
-
CALC_CHAR_TO_HEX_ENCODE
public static final int CALC_CHAR_TO_HEX_ENCODE- See Also:
-
CALC_HEX_TO_CHAR_DECODE
public static final int CALC_HEX_TO_CHAR_DECODE- See Also:
-
CALC_CRC32
public static final int CALC_CRC32- See Also:
-
CALC_ADLER32
public static final int CALC_ADLER32- See Also:
-
CALC_MD5
public static final int CALC_MD5- See Also:
-
CALC_SHA1
public static final int CALC_SHA1- See Also:
-
CALC_LEVENSHTEIN_DISTANCE
public static final int CALC_LEVENSHTEIN_DISTANCE- See Also:
-
CALC_METAPHONE
public static final int CALC_METAPHONE- See Also:
-
CALC_DOUBLE_METAPHONE
public static final int CALC_DOUBLE_METAPHONE- See Also:
-
CALC_ABS
public static final int CALC_ABS- See Also:
-
CALC_REMOVE_TIME_FROM_DATE
public static final int CALC_REMOVE_TIME_FROM_DATE- See Also:
-
CALC_DATE_DIFF
public static final int CALC_DATE_DIFF- See Also:
-
CALC_ADD3
public static final int CALC_ADD3- See Also:
-
CALC_INITCAP
public static final int CALC_INITCAP- See Also:
-
CALC_UPPER_CASE
public static final int CALC_UPPER_CASE- See Also:
-
CALC_LOWER_CASE
public static final int CALC_LOWER_CASE- See Also:
-
CALC_MASK_XML
public static final int CALC_MASK_XML- See Also:
-
CALC_USE_CDATA
public static final int CALC_USE_CDATA- See Also:
-
CALC_REMOVE_CR
public static final int CALC_REMOVE_CR- See Also:
-
CALC_REMOVE_LF
public static final int CALC_REMOVE_LF- See Also:
-
CALC_REMOVE_CRLF
public static final int CALC_REMOVE_CRLF- See Also:
-
CALC_REMOVE_TAB
public static final int CALC_REMOVE_TAB- See Also:
-
CALC_GET_ONLY_DIGITS
public static final int CALC_GET_ONLY_DIGITS- See Also:
-
CALC_REMOVE_DIGITS
public static final int CALC_REMOVE_DIGITS- See Also:
-
CALC_STRING_LEN
public static final int CALC_STRING_LEN- See Also:
-
CALC_LOAD_FILE_CONTENT_BINARY
public static final int CALC_LOAD_FILE_CONTENT_BINARY- See Also:
-
CALC_ADD_TIME_TO_DATE
public static final int CALC_ADD_TIME_TO_DATE- See Also:
-
CALC_QUARTER_OF_DATE
public static final int CALC_QUARTER_OF_DATE- See Also:
-
CALC_SUBSTITUTE_VARIABLE
public static final int CALC_SUBSTITUTE_VARIABLE- See Also:
-
CALC_UNESCAPE_XML
public static final int CALC_UNESCAPE_XML- See Also:
-
CALC_ESCAPE_HTML
public static final int CALC_ESCAPE_HTML- See Also:
-
CALC_UNESCAPE_HTML
public static final int CALC_UNESCAPE_HTML- See Also:
-
CALC_ESCAPE_SQL
public static final int CALC_ESCAPE_SQL- See Also:
-
CALC_DATE_WORKING_DIFF
public static final int CALC_DATE_WORKING_DIFF- See Also:
-
CALC_ADD_MONTHS
public static final int CALC_ADD_MONTHS- See Also:
-
CALC_CHECK_XML_FILE_WELL_FORMED
public static final int CALC_CHECK_XML_FILE_WELL_FORMED- See Also:
-
CALC_CHECK_XML_WELL_FORMED
public static final int CALC_CHECK_XML_WELL_FORMED- See Also:
-
CALC_GET_FILE_ENCODING
public static final int CALC_GET_FILE_ENCODING- See Also:
-
CALC_DAMERAU_LEVENSHTEIN
public static final int CALC_DAMERAU_LEVENSHTEIN- See Also:
-
CALC_NEEDLEMAN_WUNSH
public static final int CALC_NEEDLEMAN_WUNSH- See Also:
-
CALC_JARO
public static final int CALC_JARO- See Also:
-
CALC_JARO_WINKLER
public static final int CALC_JARO_WINKLER- See Also:
-
CALC_SOUNDEX
public static final int CALC_SOUNDEX- See Also:
-
CALC_REFINED_SOUNDEX
public static final int CALC_REFINED_SOUNDEX- See Also:
-
CALC_ADD_HOURS
public static final int CALC_ADD_HOURS- See Also:
-
CALC_ADD_MINUTES
public static final int CALC_ADD_MINUTES- See Also:
-
CALC_DATE_DIFF_MSEC
public static final int CALC_DATE_DIFF_MSEC- See Also:
-
CALC_DATE_DIFF_SEC
public static final int CALC_DATE_DIFF_SEC- See Also:
-
CALC_DATE_DIFF_MN
public static final int CALC_DATE_DIFF_MN- See Also:
-
CALC_DATE_DIFF_HR
public static final int CALC_DATE_DIFF_HR- See Also:
-
CALC_HOUR_OF_DAY
public static final int CALC_HOUR_OF_DAY- See Also:
-
CALC_MINUTE_OF_HOUR
public static final int CALC_MINUTE_OF_HOUR- See Also:
-
CALC_SECOND_OF_MINUTE
public static final int CALC_SECOND_OF_MINUTE- See Also:
-
CALC_ROUND_CUSTOM_1
public static final int CALC_ROUND_CUSTOM_1- See Also:
-
CALC_ROUND_CUSTOM_2
public static final int CALC_ROUND_CUSTOM_2- See Also:
-
CALC_ADD_SECONDS
public static final int CALC_ADD_SECONDS- See Also:
-
CALC_REMAINDER
public static final int CALC_REMAINDER- See Also:
-
calc_desc
-
calcLongDesc
-
calcDefaultResultType
public static final int[] calcDefaultResultType
-
-
Constructor Details
-
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
-
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 Details
-
equals
-
hashCode
public int hashCode() -
clone
-
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
-
getCalcFunctionDesc
-
getCalcFunctionLongDesc
-
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
-
getCalcTypeLongDesc
-
getFieldA
- Returns:
- Returns the fieldA.
-
setFieldA
- Parameters:
fieldA
- The fieldA to set.
-
getFieldB
- Returns:
- Returns the fieldB.
-
setFieldB
- Parameters:
fieldB
- The fieldB to set.
-
getFieldC
- Returns:
- Returns the fieldC.
-
setFieldC
- Parameters:
fieldC
- The fieldC to set.
-
getFieldName
- Returns:
- Returns the fieldName.
-
setFieldName
- 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
- Returns:
- the conversionMask
-
setConversionMask
- Parameters:
conversionMask
- the conversionMask to set
-
getDecimalSymbol
- Returns:
- the decimalSymbol
-
setDecimalSymbol
- Parameters:
decimalSymbol
- the decimalSymbol to set
-
getGroupingSymbol
- Returns:
- the groupingSymbol
-
setGroupingSymbol
- Parameters:
groupingSymbol
- the groupingSymbol to set
-
getCurrencySymbol
- Returns:
- the currencySymbol
-
setCurrencySymbol
- Parameters:
currencySymbol
- the currencySymbol to set
-