org.pentaho.di.trans.steps.calculator
Class CalculatorMetaFunction

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

public class CalculatorMetaFunction
extends Object
implements Cloneable


Field Summary
static int CALC_ABS
           
static int CALC_ADD
           
static int CALC_ADD_DAYS
           
static int CALC_ADD_HOURS
           
static int CALC_ADD_MINUTES
           
static int CALC_ADD_MONTHS
           
static int CALC_ADD_TIME_TO_DATE
           
static int CALC_ADD3
           
static int CALC_ADLER32
           
static int CALC_BYTE_TO_HEX_ENCODE
           
static int CALC_CEIL
           
static int CALC_CHAR_TO_HEX_ENCODE
           
static int CALC_CHECK_XML_FILE_WELL_FORMED
           
static int CALC_CHECK_XML_WELL_FORMED
           
static int CALC_COMBINATION_1
           
static int CALC_COMBINATION_2
           
static int CALC_CONSTANT
           
static int CALC_COPY_OF_FIELD
           
static int CALC_CRC32
           
static int CALC_DAMERAU_LEVENSHTEIN
           
static int CALC_DATE_DIFF
           
static int CALC_DATE_WORKING_DIFF
           
static int CALC_DAY_OF_MONTH
           
static int CALC_DAY_OF_WEEK
           
static int CALC_DAY_OF_YEAR
           
static String[] calc_desc
           
static int CALC_DIVIDE
           
static int CALC_DOUBLE_METAPHONE
           
static int CALC_ESCAPE_HTML
           
static int CALC_ESCAPE_SQL
           
static int CALC_FLOOR
           
static int CALC_GET_FILE_ENCODING
           
static int CALC_GET_ONLY_DIGITS
           
static int CALC_HEX_TO_BYTE_DECODE
           
static int CALC_HEX_TO_CHAR_DECODE
           
static int CALC_INITCAP
           
static int CALC_JARO
           
static int CALC_JARO_WINKLER
           
static int CALC_LEVENSHTEIN_DISTANCE
           
static int CALC_LOAD_FILE_CONTENT_BINARY
           
static int CALC_LOWER_CASE
           
static int CALC_MASK_XML
           
static int CALC_MD5
           
static int CALC_METAPHONE
           
static int CALC_MONTH_OF_DATE
           
static int CALC_MULTIPLY
           
static int CALC_NEEDLEMAN_WUNSH
           
static int CALC_NONE
           
static int CALC_NVL
           
static int CALC_PERCENT_1
           
static int CALC_PERCENT_2
           
static int CALC_PERCENT_3
           
static int CALC_QUARTER_OF_DATE
           
static int CALC_REFINED_SOUNDEX
           
static int CALC_REMOVE_CR
           
static int CALC_REMOVE_CRLF
           
static int CALC_REMOVE_DIGITS
           
static int CALC_REMOVE_LF
           
static int CALC_REMOVE_TAB
           
static int CALC_REMOVE_TIME_FROM_DATE
           
static int CALC_ROUND_1
           
static int CALC_ROUND_2
           
static int CALC_SHA1
           
static int CALC_SOUNDEX
           
static int CALC_SQUARE
           
static int CALC_SQUARE_ROOT
           
static int CALC_STRING_LEN
           
static int CALC_SUBSTITUTE_VARIABLE
           
static int CALC_SUBTRACT
           
static int CALC_UNESCAPE_HTML
           
static int CALC_UNESCAPE_XML
           
static int CALC_UPPER_CASE
           
static int CALC_USE_CDATA
           
static int CALC_WEEK_OF_YEAR
           
static int CALC_WEEK_OF_YEAR_ISO8601
           
static int CALC_YEAR_OF_DATE
           
static int CALC_YEAR_OF_DATE_ISO8601
           
static String[] calcLongDesc
           
static String XML_TAG
           
 
Constructor Summary
CalculatorMetaFunction(Node calcnode)
           
CalculatorMetaFunction(Repository rep, ObjectId id_step, int nr)
           
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)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object obj)
           
static String getCalcFunctionDesc(int type)
           
static String getCalcFunctionLongDesc(int type)
           
static int getCalcFunctionType(String desc)
           
 int getCalcType()
           
 String getCalcTypeDesc()
           
 String getCalcTypeLongDesc()
           
 String getConversionMask()
           
 String getCurrencySymbol()
           
 String getDecimalSymbol()
           
 String getFieldA()
           
 String getFieldB()
           
 String getFieldC()
           
 String getFieldName()
           
 String getGroupingSymbol()
           
 int getValueLength()
           
 int getValuePrecision()
           
 int getValueType()
           
 String getXML()
           
 boolean isRemovedFromResult()
           
 void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step, int nr)
           
 void setCalcType(int calcType)
           
 void setConversionMask(String conversionMask)
           
 void setCurrencySymbol(String currencySymbol)
           
 void setDecimalSymbol(String decimalSymbol)
           
 void setFieldA(String fieldA)
           
 void setFieldB(String fieldB)
           
 void setFieldC(String fieldC)
           
 void setFieldName(String fieldName)
           
 void setGroupingSymbol(String groupingSymbol)
           
 void setRemovedFromResult(boolean removedFromResult)
           
 void setValueLength(int valueLength)
           
 void setValuePrecision(int valuePrecision)
           
 void setValueType(int valueType)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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_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_desc

public static final String[] calc_desc

calcLongDesc

public static final String[] calcLongDesc
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 -
calcType -
fieldA -
fieldB -
fieldC -
valueType -
valueLength -
valuePrecision -
conversionMask -
decimalSymbol -
groupingSymbol -
currencySymbol -

CalculatorMetaFunction

public CalculatorMetaFunction(Node calcnode)

CalculatorMetaFunction

public CalculatorMetaFunction(Repository rep,
                              ObjectId id_step,
                              int nr)
                       throws KettleException
Throws:
KettleException
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clone

public Object clone()
Overrides:
clone in class Object

getXML

public String getXML()

saveRep

public void saveRep(Repository rep,
                    ObjectId id_transformation,
                    ObjectId id_step,
                    int nr)
             throws KettleException
Throws:
KettleException

getCalcFunctionType

public static final int getCalcFunctionType(String desc)

getCalcFunctionDesc

public static final String getCalcFunctionDesc(int type)

getCalcFunctionLongDesc

public static final String getCalcFunctionLongDesc(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