org.pentaho.di.core.row
Interface ValueMetaInterface

All Superinterfaces:
Cloneable
All Known Implementing Classes:
ValueMeta

public interface ValueMetaInterface
extends Cloneable


Field Summary
static int DEFAULT_INTEGER_LENGTH
          Default integer length for hardcoded metadata integers
static int SORT_TYPE_ASCENDING
          Indicating that the rows are not sorted ascending on this key
static int SORT_TYPE_DESCENDING
          Indicating that the rows are sorted descending on this key
static int SORT_TYPE_NOT_SORTED
          Indicating that the rows are not sorted on this key
static String[] sortTypeCodes
           
static int STORAGE_TYPE_BINARY_STRING
          The storage type is binary: read from text but not yet converted to the requested target data type, for lazy conversions.
static int STORAGE_TYPE_INDEXED
          The storage type is indexed.
static int STORAGE_TYPE_NORMAL
          The storage type is the same as the indicated value type
static String[] storageTypeCodes
           
static int TRIM_TYPE_BOTH
          Indicating that the string content should be LEFT AND RIGHT trimmed if conversion is to occur to another data type
static int TRIM_TYPE_LEFT
          Indicating that the string content should be LEFT trimmed if conversion is to occur to another data type
static int TRIM_TYPE_NONE
          Indicating that the string content should NOT be trimmed if conversion is to occur to another data type
static int TRIM_TYPE_RIGHT
          Indicating that the string content should be RIGHT trimmed if conversion is to occur to another data type
static int TYPE_BIGNUMBER
          Value type indicating that the value contains a floating point precision number with arbitrary precision.
static int TYPE_BINARY
          Value type indicating that the value contains binary data: BLOB, CLOB, ...
static int TYPE_BOOLEAN
          Value type indicating that the value contains a boolean.
static int TYPE_DATE
          Value type indicating that the value contains a Date.
static int TYPE_INTEGER
          Value type indicating that the value contains a long integer.
static int TYPE_NONE
          Value type indicating that the value has no type set
static int TYPE_NUMBER
          Value type indicating that the value contains a floating point double precision number.
static int TYPE_SERIALIZABLE
          Value type indicating that the value contains an Object.
static int TYPE_STRING
          Value type indicating that the value contains a text String.
static String[] typeCodes
           
 
Method Summary
 ValueMetaInterface clone()
           
 Object cloneValueData(Object object)
           
 int compare(Object data1, Object data2)
          Compare 2 values of the same data type
 int compare(Object data1, ValueMetaInterface meta2, Object data2)
          Compare 2 values of the same data type
 Object convertBinaryStringToNativeType(byte[] binary)
          Convert the given binary data to the actual data type.
- byte[] --> Long (Integer)
- byte[] --> Double (Number)
- byte[] --> BigDecimal (BigNumber)
- byte[] --> Date (Date)
- byte[] --> Boolean (Boolean)
- byte[] --> byte[] (Binary)

 Object convertData(ValueMetaInterface meta2, Object data2)
          Convert the specified data to the data type specified in this object.
 Object convertDataCompatible(ValueMetaInterface meta2, Object data2)
          Convert the specified data to the data type specified in this object.
 Object convertDataFromString(String pol, ValueMetaInterface convertMeta, String nullif, String ifNull, int trim_type)
          Convert the specified string to the data type specified in this object.
 Object convertDataUsingConversionMetaData(Object data)
          Convert an object to the data type specified in the conversion metadata
 Object convertNormalStorageTypeToBinaryString(Object object)
          Convert a normal storage type to a binary string object.
 Object convertToBinaryStringStorageType(Object object)
          Converts the specified data object to the binary string storage type.
 Object convertToNormalStorageType(Object object)
          Converts the specified data object to the normal storage type.
 Value createOriginalValue(Object data)
          Create an old-style value for backward compatibility reasons
 BigDecimal getBigNumber(Object object)
          Convert the supplied data to a BigNumber
 byte[] getBinary(Object object)
          Convert the supplied data to binary data
 byte[] getBinaryString(Object object)
          convert the supplied data to a binary string representation (for writing text)
 Boolean getBoolean(Object object)
          Convert the supplied data to a Boolean
 String getComments()
           
 String getCompatibleString(Object object)
          Convert the supplied data to a String compatible with version 2.5.
 String getConversionMask()
           
 ValueMetaInterface getConversionMetadata()
          This conversion metadata can be attached to a String object to see where it came from and with which mask it was generated, the encoding, the local languages used, padding, etc.
 String getCurrencySymbol()
           
 String getDataXML(Object value)
           
 Date getDate(Object object)
          Convert the supplied data to a Date
 SimpleDateFormat getDateFormat()
           
 Locale getDateFormatLocale()
           
 DecimalFormat getDecimalFormat()
           
 DecimalFormat getDecimalFormat(boolean useBigDecimal)
           
 String getDecimalSymbol()
           
 String getGroupingSymbol()
           
 Object[] getIndex()
           
 Long getInteger(Object object)
          Convert the supplied data to an Integer
 int getLength()
           
 String getMetaXML()
           
 String getName()
           
 Double getNumber(Object object)
          Convert the supplied data to a Number
 long getNumberOfBinaryStringConversions()
           
 String getOrigin()
           
 int getOriginalColumnType()
          store original JDBC RecordSetMetaData for later use
 String getOriginalColumnTypeName()
           
 int getOriginalPrecision()
           
 int getOriginalScale()
           
 int getPrecision()
           
 ValueMetaInterface getStorageMetadata()
           
 int getStorageType()
           
 String getString(Object object)
          Convert the supplied data to a String
 String getStringEncoding()
           
 int getTrimType()
           
 int getType()
           
 String getTypeDesc()
          Return the type of a value in a textual form: "String", "Number", "Integer", "Boolean", "Date", ...
 Object getValue(Node node)
          Convert a data XML node to an Object that corresponds to the metadata.
 Object getValueData(Value value)
          Extracts the primitive data from an old style Value object
 int hashCode(Object object)
          Calculate the hashcode of the specified data object
 boolean isBigNumber()
          Checks whether or not the value is a Big Number
 boolean isBinary()
          Checks whether or not this value is of type Binary
 boolean isBoolean()
          Checks whether or not this value is a boolean
 boolean isCaseInsensitive()
           
 boolean isDate()
          Checks whether or not this value is a Date
 boolean isDateFormatLenient()
           
 boolean isInteger()
          Checks whether or not this value is an Integer
 boolean isLargeTextField()
           
 boolean isNull(Object data)
          Determine if an object is null.
 boolean isNumber()
          Checks whether or not the value is a Number
 boolean isNumeric()
          Checks whether or not this Value is Numeric A Value is numeric if it is either of type Number or Integer
 boolean isOriginalAutoIncrement()
           
 int isOriginalNullable()
           
 boolean isOriginalSigned()
           
 boolean isOutputPaddingEnabled()
           
 boolean isSerializableType()
          Checks whether or not this value is of type Serializable
 boolean isSingleByteEncoding()
           
 boolean isSortedDescending()
           
 boolean isStorageBinaryString()
           
 boolean isStorageIndexed()
           
 boolean isStorageNormal()
           
 boolean isString()
          Checks wheter or not the value is a String.
 Object readData(DataInputStream inputStream)
          De-serialize data from an inputstream.
 boolean requiresRealClone()
           
 void setCaseInsensitive(boolean caseInsensitive)
           
 void setComments(String comments)
           
 void setConversionMask(String conversionMask)
           
 void setConversionMetadata(ValueMetaInterface conversionMetadata)
          Attach conversion metadata to a String object to see where it came from and with which mask it was generated, the encoding, the local languages used, padding, etc.
 void setCurrencySymbol(String currencySymbol)
           
 void setDateFormatLenient(boolean dateFormatLenient)
           
 void setDateFormatLocale(Locale dateFormatLocale)
           
 void setDecimalSymbol(String decimalSymbol)
           
 void setGroupingSymbol(String groupingSymbol)
           
 void setIndex(Object[] index)
           
 void setLargeTextField(boolean largeTextField)
           
 void setLength(int length)
           
 void setLength(int length, int precision)
           
 void setName(String name)
           
 void setNumberOfBinaryStringConversions(long numberOfBinaryStringConversions)
           
 void setOrigin(String origin)
           
 void setOriginalAutoIncrement(boolean originalAutoIncrement)
           
 void setOriginalColumnType(int originalColumnType)
           
 void setOriginalColumnTypeName(String originalColumnTypeName)
           
 void setOriginalNullable(int originalNullable)
           
 void setOriginalPrecision(int originalPrecision)
           
 void setOriginalScale(int originalScale)
           
 void setOriginalSigned(boolean originalSigned)
           
 void setOutputPaddingEnabled(boolean outputPaddingEnabled)
           
 void setPrecision(int precision)
           
 void setSortedDescending(boolean sortedDescending)
           
 void setStorageMetadata(ValueMetaInterface storageMetadata)
           
 void setStorageType(int storageType)
           
 void setStringEncoding(String stringEncoding)
           
 void setTrimType(int trimType)
           
 void setType(int type)
           
 String toStringMeta()
          a String text representation of this Value, optionally padded to the specified length
 void writeData(DataOutputStream outputStream, Object object)
          Serialize the content of the specified data object to the outputStream.
 void writeMeta(DataOutputStream outputStream)
          Write the content of this class (metadata) to the specified output stream.
 

Field Detail

TYPE_NONE

static final int TYPE_NONE
Value type indicating that the value has no type set

See Also:
Constant Field Values

TYPE_NUMBER

static final int TYPE_NUMBER
Value type indicating that the value contains a floating point double precision number.

See Also:
Constant Field Values

TYPE_STRING

static final int TYPE_STRING
Value type indicating that the value contains a text String.

See Also:
Constant Field Values

TYPE_DATE

static final int TYPE_DATE
Value type indicating that the value contains a Date.

See Also:
Constant Field Values

TYPE_BOOLEAN

static final int TYPE_BOOLEAN
Value type indicating that the value contains a boolean.

See Also:
Constant Field Values

TYPE_INTEGER

static final int TYPE_INTEGER
Value type indicating that the value contains a long integer.

See Also:
Constant Field Values

TYPE_BIGNUMBER

static final int TYPE_BIGNUMBER
Value type indicating that the value contains a floating point precision number with arbitrary precision.

See Also:
Constant Field Values

TYPE_SERIALIZABLE

static final int TYPE_SERIALIZABLE
Value type indicating that the value contains an Object.

See Also:
Constant Field Values

TYPE_BINARY

static final int TYPE_BINARY
Value type indicating that the value contains binary data: BLOB, CLOB, ...

See Also:
Constant Field Values

typeCodes

static final String[] typeCodes

STORAGE_TYPE_NORMAL

static final int STORAGE_TYPE_NORMAL
The storage type is the same as the indicated value type

See Also:
Constant Field Values

STORAGE_TYPE_BINARY_STRING

static final int STORAGE_TYPE_BINARY_STRING
The storage type is binary: read from text but not yet converted to the requested target data type, for lazy conversions.

See Also:
Constant Field Values

STORAGE_TYPE_INDEXED

static final int STORAGE_TYPE_INDEXED
The storage type is indexed. This means that the value is a simple integer index referencing the values in getIndex()

See Also:
Constant Field Values

storageTypeCodes

static final String[] storageTypeCodes

SORT_TYPE_NOT_SORTED

static final int SORT_TYPE_NOT_SORTED
Indicating that the rows are not sorted on this key

See Also:
Constant Field Values

SORT_TYPE_ASCENDING

static final int SORT_TYPE_ASCENDING
Indicating that the rows are not sorted ascending on this key

See Also:
Constant Field Values

SORT_TYPE_DESCENDING

static final int SORT_TYPE_DESCENDING
Indicating that the rows are sorted descending on this key

See Also:
Constant Field Values

sortTypeCodes

static final String[] sortTypeCodes

TRIM_TYPE_NONE

static final int TRIM_TYPE_NONE
Indicating that the string content should NOT be trimmed if conversion is to occur to another data type

See Also:
Constant Field Values

TRIM_TYPE_LEFT

static final int TRIM_TYPE_LEFT
Indicating that the string content should be LEFT trimmed if conversion is to occur to another data type

See Also:
Constant Field Values

TRIM_TYPE_RIGHT

static final int TRIM_TYPE_RIGHT
Indicating that the string content should be RIGHT trimmed if conversion is to occur to another data type

See Also:
Constant Field Values

TRIM_TYPE_BOTH

static final int TRIM_TYPE_BOTH
Indicating that the string content should be LEFT AND RIGHT trimmed if conversion is to occur to another data type

See Also:
Constant Field Values

DEFAULT_INTEGER_LENGTH

static final int DEFAULT_INTEGER_LENGTH
Default integer length for hardcoded metadata integers

See Also:
Constant Field Values
Method Detail

getName

String getName()

setName

void setName(String name)

getLength

int getLength()

setLength

void setLength(int length)

getPrecision

int getPrecision()

setPrecision

void setPrecision(int precision)

setLength

void setLength(int length,
               int precision)

getOrigin

String getOrigin()

setOrigin

void setOrigin(String origin)

getComments

String getComments()

setComments

void setComments(String comments)

getType

int getType()

setType

void setType(int type)

getStorageType

int getStorageType()

setStorageType

void setStorageType(int storageType)

getTrimType

int getTrimType()

setTrimType

void setTrimType(int trimType)

getIndex

Object[] getIndex()

setIndex

void setIndex(Object[] index)

isStorageNormal

boolean isStorageNormal()

isStorageIndexed

boolean isStorageIndexed()

isStorageBinaryString

boolean isStorageBinaryString()

getConversionMask

String getConversionMask()

setConversionMask

void setConversionMask(String conversionMask)

getDecimalSymbol

String getDecimalSymbol()

setDecimalSymbol

void setDecimalSymbol(String decimalSymbol)

getGroupingSymbol

String getGroupingSymbol()

setGroupingSymbol

void setGroupingSymbol(String groupingSymbol)

getCurrencySymbol

String getCurrencySymbol()

setCurrencySymbol

void setCurrencySymbol(String currencySymbol)

getDateFormat

SimpleDateFormat getDateFormat()

getDecimalFormat

DecimalFormat getDecimalFormat()

getDecimalFormat

DecimalFormat getDecimalFormat(boolean useBigDecimal)

getStringEncoding

String getStringEncoding()

setStringEncoding

void setStringEncoding(String stringEncoding)

isSingleByteEncoding

boolean isSingleByteEncoding()
Returns:
true if the String encoding used (storage) is single byte encoded.

isNull

boolean isNull(Object data)
               throws KettleValueException
Determine if an object is null. This is the case if data==null or if it's an empty string.

Parameters:
data - the object to test
Returns:
true if the object is considered null.
Throws:
KettleValueException - in case there is a conversion error (only thrown in case of lazy conversion)

isCaseInsensitive

boolean isCaseInsensitive()
Returns:
the caseInsensitive

setCaseInsensitive

void setCaseInsensitive(boolean caseInsensitive)
Parameters:
caseInsensitive - the caseInsensitive to set

isSortedDescending

boolean isSortedDescending()
Returns:
the sortedDescending

setSortedDescending

void setSortedDescending(boolean sortedDescending)
Parameters:
sortedDescending - the sortedDescending to set

isOutputPaddingEnabled

boolean isOutputPaddingEnabled()
Returns:
true if output padding is enabled (padding to specified length)

setOutputPaddingEnabled

void setOutputPaddingEnabled(boolean outputPaddingEnabled)
Parameters:
outputPaddingEnabled - Set to true if output padding is to be enabled (padding to specified length)

isLargeTextField

boolean isLargeTextField()
Returns:
true if this is a large text field (CLOB, TEXT) with arbitrary length.

setLargeTextField

void setLargeTextField(boolean largeTextField)
Parameters:
largeTextField - Set to true if this is to be a large text field (CLOB, TEXT) with arbitrary length.

isDateFormatLenient

boolean isDateFormatLenient()
Returns:
true if the the date formatting (parsing) is to be lenient

setDateFormatLenient

void setDateFormatLenient(boolean dateFormatLenient)
Parameters:
dateFormatLenient - true if the the date formatting (parsing) is to be set to lenient

getDateFormatLocale

Locale getDateFormatLocale()
Returns:
the date format locale

setDateFormatLocale

void setDateFormatLocale(Locale dateFormatLocale)
Parameters:
dateFormatLocale - the date format locale to set

getOriginalColumnType

int getOriginalColumnType()
store original JDBC RecordSetMetaData for later use

See Also:
ResultSetMetaData

setOriginalColumnType

void setOriginalColumnType(int originalColumnType)

getOriginalColumnTypeName

String getOriginalColumnTypeName()

setOriginalColumnTypeName

void setOriginalColumnTypeName(String originalColumnTypeName)

getOriginalPrecision

int getOriginalPrecision()

setOriginalPrecision

void setOriginalPrecision(int originalPrecision)

getOriginalScale

int getOriginalScale()

setOriginalScale

void setOriginalScale(int originalScale)

isOriginalAutoIncrement

boolean isOriginalAutoIncrement()

setOriginalAutoIncrement

void setOriginalAutoIncrement(boolean originalAutoIncrement)

isOriginalNullable

int isOriginalNullable()

setOriginalNullable

void setOriginalNullable(int originalNullable)

isOriginalSigned

boolean isOriginalSigned()

setOriginalSigned

void setOriginalSigned(boolean originalSigned)

cloneValueData

Object cloneValueData(Object object)
                      throws KettleValueException
Throws:
KettleValueException

getCompatibleString

String getCompatibleString(Object object)
                           throws KettleValueException
Convert the supplied data to a String compatible with version 2.5.

Throws:
KettleValueException

getString

String getString(Object object)
                 throws KettleValueException
Convert the supplied data to a String

Throws:
KettleValueException

getBinaryString

byte[] getBinaryString(Object object)
                       throws KettleValueException
convert the supplied data to a binary string representation (for writing text)

Throws:
KettleValueException

getNumber

Double getNumber(Object object)
                 throws KettleValueException
Convert the supplied data to a Number

Throws:
KettleValueException

getBigNumber

BigDecimal getBigNumber(Object object)
                        throws KettleValueException
Convert the supplied data to a BigNumber

Throws:
KettleValueException

getInteger

Long getInteger(Object object)
                throws KettleValueException
Convert the supplied data to an Integer

Throws:
KettleValueException

getDate

Date getDate(Object object)
             throws KettleValueException
Convert the supplied data to a Date

Throws:
KettleValueException

getBoolean

Boolean getBoolean(Object object)
                   throws KettleValueException
Convert the supplied data to a Boolean

Throws:
KettleValueException

getBinary

byte[] getBinary(Object object)
                 throws KettleValueException
Convert the supplied data to binary data

Throws:
KettleValueException

clone

ValueMetaInterface clone()
Returns:
a copy of this value meta object

isString

boolean isString()
Checks wheter or not the value is a String.

Returns:
true if the value is a String.

isDate

boolean isDate()
Checks whether or not this value is a Date

Returns:
true if the value is a Date

isBigNumber

boolean isBigNumber()
Checks whether or not the value is a Big Number

Returns:
true is this value is a big number

isNumber

boolean isNumber()
Checks whether or not the value is a Number

Returns:
true is this value is a number

isBoolean

boolean isBoolean()
Checks whether or not this value is a boolean

Returns:
true if this value has type boolean.

isSerializableType

boolean isSerializableType()
Checks whether or not this value is of type Serializable

Returns:
true if this value has type Serializable

isBinary

boolean isBinary()
Checks whether or not this value is of type Binary

Returns:
true if this value has type Binary

isInteger

boolean isInteger()
Checks whether or not this value is an Integer

Returns:
true if this value is an integer

isNumeric

boolean isNumeric()
Checks whether or not this Value is Numeric A Value is numeric if it is either of type Number or Integer

Returns:
true if the value is either of type Number or Integer

getTypeDesc

String getTypeDesc()
Return the type of a value in a textual form: "String", "Number", "Integer", "Boolean", "Date", ...

Returns:
A String describing the type of value.

toStringMeta

String toStringMeta()
a String text representation of this Value, optionally padded to the specified length

Returns:
a String text representation of this Value, optionally padded to the specified length

writeMeta

void writeMeta(DataOutputStream outputStream)
               throws KettleFileException
Write the content of this class (metadata) to the specified output stream.

Parameters:
outputStream - the outputstream to write to
Throws:
KettleFileException - in case a I/O error occurs

writeData

void writeData(DataOutputStream outputStream,
               Object object)
               throws KettleFileException
Serialize the content of the specified data object to the outputStream. No metadata is written.

Parameters:
outputStream - the outputstream to write to
object - the data object to serialize
Throws:
KettleFileException - in case a I/O error occurs

readData

Object readData(DataInputStream inputStream)
                throws KettleFileException,
                       KettleEOFException,
                       SocketTimeoutException
De-serialize data from an inputstream. No metadata is read or changed.

Parameters:
inputStream - the input stream to read from
Returns:
a new data object
Throws:
KettleFileException - in case a I/O error occurs
KettleEOFException - When we have read all the data there is to read
SocketTimeoutException - In case there is a timeout (when set on a socket) during reading

compare

int compare(Object data1,
            Object data2)
            throws KettleValueException
Compare 2 values of the same data type

Parameters:
data1 - the first value
data2 - the second value
Returns:
0 if the values are equal, -1 if data1 is smaller than data2 and +1 if it's larger.
Throws:
KettleValueException - In case we get conversion errors

compare

int compare(Object data1,
            ValueMetaInterface meta2,
            Object data2)
            throws KettleValueException
Compare 2 values of the same data type

Parameters:
data1 - the first value
meta2 - the second value's metadata
data2 - the second value
Returns:
0 if the values are equal, -1 if data1 is smaller than data2 and +1 if it's larger.
Throws:
KettleValueException - In case we get conversion errors

convertData

Object convertData(ValueMetaInterface meta2,
                   Object data2)
                   throws KettleValueException
Convert the specified data to the data type specified in this object.

Parameters:
meta2 - the metadata of the object to be converted
data2 - the data of the object to be converted
Returns:
the object in the data type of this value metadata object
Throws:
KettleValueException - in case there is a data conversion error

convertDataCompatible

Object convertDataCompatible(ValueMetaInterface meta2,
                             Object data2)
                             throws KettleValueException
Convert the specified data to the data type specified in this object. For String conversion, be compatible with version 2.5.2.

Parameters:
meta2 - the metadata of the object to be converted
data2 - the data of the object to be converted
Returns:
the object in the data type of this value metadata object
Throws:
KettleValueException - in case there is a data conversion error

convertDataUsingConversionMetaData

Object convertDataUsingConversionMetaData(Object data)
                                          throws KettleValueException
Convert an object to the data type specified in the conversion metadata

Parameters:
data - The data
Returns:
The data converted to the conversion data type
Throws:
KettleValueException - in case there is a conversion error.

convertDataFromString

Object convertDataFromString(String pol,
                             ValueMetaInterface convertMeta,
                             String nullif,
                             String ifNull,
                             int trim_type)
                             throws KettleValueException
Convert the specified string to the data type specified in this object.

Parameters:
pol - the string to be converted
convertMeta - the metadata of the object (only string type) to be converted
nullif - set the object to null if pos equals nullif (IgnoreCase)
ifNull - set the object to ifNull when pol is empty or null
trim_type - the trim type to be used (ValueMetaInterface.TRIM_TYPE_XXX)
Returns:
the object in the data type of this value metadata object
Throws:
KettleValueException - in case there is a data conversion error

convertToNormalStorageType

Object convertToNormalStorageType(Object object)
                                  throws KettleValueException
Converts the specified data object to the normal storage type.

Parameters:
object - the data object to convert
Returns:
the data in a normal storage type
Throws:
KettleValueException - In case there is a data conversion error.

convertBinaryStringToNativeType

Object convertBinaryStringToNativeType(byte[] binary)
                                       throws KettleValueException
Convert the given binary data to the actual data type.
- byte[] --> Long (Integer)
- byte[] --> Double (Number)
- byte[] --> BigDecimal (BigNumber)
- byte[] --> Date (Date)
- byte[] --> Boolean (Boolean)
- byte[] --> byte[] (Binary)

Parameters:
binary - the binary data read from file or database
Returns:
the native data type after conversion
Throws:
KettleValueException - in case there is a data conversion error

convertNormalStorageTypeToBinaryString

Object convertNormalStorageTypeToBinaryString(Object object)
                                              throws KettleValueException
Convert a normal storage type to a binary string object. (for comparison reasons)

Parameters:
object - The object expressed in a normal storage type
Returns:
a binary string
Throws:
KettleValueException - in case there is a data conversion error

convertToBinaryStringStorageType

Object convertToBinaryStringStorageType(Object object)
                                        throws KettleValueException
Converts the specified data object to the binary string storage type.

Parameters:
object - the data object to convert
Returns:
the data in a binary string storage type
Throws:
KettleValueException - In case there is a data conversion error.

hashCode

int hashCode(Object object)
             throws KettleValueException
Calculate the hashcode of the specified data object

Parameters:
object - the data value to calculate a hashcode for
Returns:
the calculated hashcode
Throws:
KettleValueException - in case there is a data conversion error

createOriginalValue

Value createOriginalValue(Object data)
                          throws KettleValueException
Create an old-style value for backward compatibility reasons

Parameters:
data - the data to store in the value
Returns:
a newly created Value object
Throws:
KettleValueException - in case there is a data conversion problem

getValueData

Object getValueData(Value value)
                    throws KettleValueException
Extracts the primitive data from an old style Value object

Parameters:
value - the old style Value object
Returns:
the value's data, NOT the meta data.
Throws:
KettleValueException - case there is a data conversion problem

getStorageMetadata

ValueMetaInterface getStorageMetadata()
Returns:
the storage Meta data that is needed for internal conversion from BinaryString or String to the specified type. This storage Meta data object survives cloning and should travel through the transformation unchanged as long as the data type remains the same.

setStorageMetadata

void setStorageMetadata(ValueMetaInterface storageMetadata)
Parameters:
storageMetadata - the storage Meta data that is needed for internal conversion from BinaryString or String to the specified type. This storage Meta data object survives cloning and should travel through the transformation unchanged as long as the data type remains the same.

getConversionMetadata

ValueMetaInterface getConversionMetadata()
This conversion metadata can be attached to a String object to see where it came from and with which mask it was generated, the encoding, the local languages used, padding, etc.

Returns:
The conversion metadata

setConversionMetadata

void setConversionMetadata(ValueMetaInterface conversionMetadata)
Attach conversion metadata to a String object to see where it came from and with which mask it was generated, the encoding, the local languages used, padding, etc.

Parameters:
conversionMetadata - the conversionMetadata to set

getMetaXML

String getMetaXML()
                  throws IOException
Returns:
an XML representation of the row metadata
Throws:
IOException - Thrown in case there is an (Base64/GZip) decoding problem

getDataXML

String getDataXML(Object value)
                  throws IOException
Parameters:
value - The data to serialize as XML
Returns:
an xML representation of the row data
Throws:
IOException - Thrown in case there is an (Base64/GZip) decoding problem

getValue

Object getValue(Node node)
                throws KettleException
Convert a data XML node to an Object that corresponds to the metadata. This is basically String to Object conversion that is being done.

Parameters:
node - the node to retrieve the data value from
Returns:
the converted data value
Throws:
KettleException - thrown in case there is a problem with the XML to object conversion

getNumberOfBinaryStringConversions

long getNumberOfBinaryStringConversions()
Returns:
the number of binary string to native data type conversions done with this object conversions

setNumberOfBinaryStringConversions

void setNumberOfBinaryStringConversions(long numberOfBinaryStringConversions)
Parameters:
numberOfBinaryStringConversions - the number of binary string to native data type done with this object conversions to set

requiresRealClone

boolean requiresRealClone()
Returns:
true if the data type requires a real copy. Usually a binary or Serializable object