public class ValueMetaInternetAddress extends ValueMetaDate
bigNumberFormatting, caseInsensitive, collator, collatorDisabled, collatorLocale, collatorStrength, comments, comparator, COMPATIBLE_DATE_FORMAT_PATTERN, compatibleDateFormat, conversionMask, conversionMetadata, currencySymbol, dateFormat, dateFormatChanged, dateFormatLenient, dateFormatLocale, dateFormatTimeZone, decimalFormat, decimalFormatChanged, decimalSymbol, DEFAULT_BIG_NUMBER_FORMAT_MASK, DEFAULT_BIGNUMBER_PARSE_MASK, DEFAULT_DATE_FORMAT_MASK, DEFAULT_DATE_PARSE_MASK, DEFAULT_INTEGER_FORMAT_MASK, DEFAULT_INTEGER_PARSE_MASK, DEFAULT_NUMBER_FORMAT_MASK, DEFAULT_NUMBER_PARSE_MASK, DEFAULT_TIMESTAMP_FORMAT_MASK, DEFAULT_TIMESTAMP_PARSE_MASK, emptyStringAndNullAreDifferent, groupingSymbol, identicalFormat, ignoreTimezone, ignoreWhitespace, index, largeTextField, length, lenientStringToNumber, name, numberOfBinaryStringConversions, origin, originalAutoIncrement, originalColumnType, originalColumnTypeName, originalNullable, originalPrecision, originalScale, originalSigned, outputPaddingEnabled, PKG, precision, SINGLE_BYTE_ENCODINGS, sortedDescending, storageMetadata, storageType, stringEncoding, trimType, trimTypeCode, trimTypeDesc, type, XML_DATA_TAG, XML_META_TAG
DEFAULT_INTEGER_LENGTH, SORT_TYPE_ASCENDING, SORT_TYPE_DESCENDING, SORT_TYPE_NOT_SORTED, sortTypeCodes, STORAGE_TYPE_BINARY_STRING, STORAGE_TYPE_INDEXED, STORAGE_TYPE_NORMAL, storageTypeCodes, TRIM_TYPE_BOTH, TRIM_TYPE_LEFT, TRIM_TYPE_NONE, TRIM_TYPE_RIGHT, TYPE_BIGNUMBER, TYPE_BINARY, TYPE_BOOLEAN, TYPE_DATE, TYPE_INET, TYPE_INTEGER, TYPE_NONE, TYPE_NUMBER, TYPE_SERIALIZABLE, TYPE_STRING, TYPE_TIMESTAMP, typeCodes
Constructor and Description |
---|
ValueMetaInternetAddress() |
ValueMetaInternetAddress(String name) |
Modifier and Type | Method and Description |
---|---|
Object |
cloneValueData(Object object)
Clones the data.
|
int |
compare(Object data1,
Object data2)
Compare 2 values of the same data type
|
protected InetAddress |
convertBigNumberToInternetAddress(BigDecimal bd) |
Object |
convertData(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.
|
protected InetAddress |
convertIntegerToInternetAddress(Long l) |
protected String |
convertInternetAddressToString(InetAddress inetAddress) |
protected InetAddress |
convertNumberToInternetAddress(Double d) |
protected InetAddress |
convertStringToInternetAddress(String string) |
BigDecimal |
getBigNumber(Object object)
Convert the supplied data to a BigNumber
|
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 |
getDatabaseColumnTypeDefinition(DatabaseInterface databaseInterface,
String tk,
String pk,
boolean use_autoinc,
boolean add_fieldname,
boolean add_cr)
Ask for suggestions as to how this plugin data type should be represented in the specified database interface
|
Date |
getDate(Object object)
Convert the supplied data to a Date
|
Long |
getInteger(Object object)
Convert the supplied data to an Integer
|
InetAddress |
getInternetAddress(Object object) |
ValueMetaInterface |
getMetadataPreview(DatabaseMeta databaseMeta,
ResultSet rs)
This is a similar method to getValueFromSQLType, but it uses a
ResultSet from a call to DatabaseMetaData#getColumns(String, String, String, String)
The ResultSet must be positioned correctly on the row to read.
|
Object |
getNativeDataType(Object object)
This method gives you the native Java data type corresponding to the value meta-data.
|
Class<?> |
getNativeDataTypeClass()
Return the Java class that represents the "native" storage type of this ValueMeta
|
Double |
getNumber(Object object)
Convert the supplied data to a Number
|
String |
getString(Object object)
Convert the supplied data to a String
|
Object |
getValueFromResultSet(DatabaseInterface databaseInterface,
ResultSet resultSet,
int index)
Get a value from a result set column based on the current value metadata
|
ValueMetaInterface |
getValueFromSQLType(DatabaseMeta databaseMeta,
String name,
ResultSetMetaData rm,
int index,
boolean ignoreLength,
boolean lazyConversion)
Investigate JDBC result set metadata at the specified index.
|
void |
setPreparedStatementValue(DatabaseMeta databaseMeta,
PreparedStatement preparedStatement,
int index,
Object data)
Set a value on a JDBC prepared statement on the specified position
|
getFormatMask
clone, compare, compareStorageAndActualFormat, convertBigNumberToBoolean, convertBigNumberToDate, convertBigNumberToString, convertBinaryStringToNativeType, convertBinaryStringToString, convertBooleanToBigNumber, convertBooleanToInteger, convertBooleanToNumber, convertBooleanToString, convertDataCompatible, convertDataUsingConversionMetaData, convertDateToBigNumber, convertDateToCompatibleString, convertDateToInteger, convertDateToNumber, convertDateToString, convertIntegerToBoolean, convertIntegerToCompatibleString, convertIntegerToDate, convertIntegerToString, convertNormalStorageTypeToBinaryString, convertNumberToBoolean, convertNumberToCompatibleString, convertNumberToDate, convertNumberToString, convertStringToBigNumber, convertStringToBinaryString, convertStringToBoolean, convertStringToDate, convertStringToInteger, convertStringToNumber, convertToBinaryStringStorageType, convertToNormalStorageType, createOriginalValue, determineSingleByteEncoding, drawValue, getAllTypes, getBinary, getCollatorLocale, getCollatorStrength, getComments, getCompatibleString, getConversionMask, getConversionMetadata, getCurrencySymbol, getDataXML, getDateFormat, getDateFormatLocale, getDateFormatTimeZone, getDecimalFormat, getDecimalFormat, getDecimalSymbol, getGroupingSymbol, getIndex, getLength, getMetaXML, getName, getNumberOfBinaryStringConversions, getOrigin, getOriginalColumnMetadata, getOriginalColumnType, getOriginalColumnTypeName, getOriginalNullable, getOriginalPrecision, getOriginalScale, getOriginalSigned, getPrecision, getQuotesBeforeSymbol, getStorageMetadata, getStorageType, getStorageType, getStorageTypeCode, getStorageTypeDesc, getStringEncoding, getTrimType, getTrimTypeByCode, getTrimTypeByDesc, getTrimTypeCode, getTrimTypeCodes, getTrimTypeDesc, getTrimTypeDescriptions, getType, getType, getTypeDesc, getTypeDesc, getTypes, getValue, getValueData, hashCode, isBigNumber, isBigNumberFormatting, isBinary, isBoolean, isCaseInsensitive, isCollatorDisabled, isDate, isDateFormatLenient, isIgnoreWhitespace, isInteger, isLargeTextField, isLenientStringToNumber, isNull, isNumber, isNumeric, isNumeric, isOriginalAutoIncrement, isOriginalNullable, isOriginalSigned, isOutputPaddingEnabled, isSerializableType, isSingleByteEncoding, isSortedAscending, isSortedDescending, isStorageBinaryString, isStorageIndexed, isStorageNormal, isString, readBigNumber, readBinary, readBinaryString, readBoolean, readData, readDate, readInteger, readMetaData, readNumber, readSmallInteger, readString, requiresRealClone, setBigNumberFormatting, setCaseInsensitive, setCollatorDisabled, setCollatorLocale, setCollatorStrength, setComments, setConversionMask, setConversionMetadata, setCurrencySymbol, setDateFormatLenient, setDateFormatLocale, setDateFormatTimeZone, setDecimalSymbol, setDefaultConversionMask, setGroupingSymbol, setIgnoreWhitespace, setIndex, setLargeTextField, setLength, setLength, setLenientStringToNumber, setName, setNumberOfBinaryStringConversions, setOrigin, setOriginalAutoIncrement, setOriginalColumnType, setOriginalColumnTypeName, setOriginalNullable, setOriginalPrecision, setOriginalScale, setOriginalSigned, setOutputPaddingEnabled, setPrecision, setSortedDescending, setStorageMetadata, setStorageType, setStringEncoding, setTrimType, setType, toString, toStringMeta, trim, writeBigNumber, writeBinary, writeBinaryString, writeBoolean, writeData, writeDate, writeInteger, writeInteger, writeMeta, writeNumber, writeString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, compare, convertBinaryStringToNativeType, convertDataCompatible, convertDataUsingConversionMetaData, convertNormalStorageTypeToBinaryString, convertToBinaryStringStorageType, convertToNormalStorageType, createOriginalValue, drawValue, getBinary, getCollatorLocale, getCollatorStrength, getComments, getCompatibleString, getConversionMask, getConversionMetadata, getCurrencySymbol, getDataXML, getDateFormat, getDateFormatLocale, getDateFormatTimeZone, getDecimalFormat, getDecimalFormat, getDecimalSymbol, getGroupingSymbol, getIndex, getLength, getMetaXML, getName, getNumberOfBinaryStringConversions, getOrigin, getOriginalColumnType, getOriginalColumnTypeName, getOriginalNullable, getOriginalPrecision, getOriginalScale, getOriginalSigned, getPrecision, getStorageMetadata, getStorageType, getStringEncoding, getTrimType, getType, getTypeCode, getTypeDesc, getTypeDescription, getValue, getValueData, hashCode, isBigNumber, isBinary, isBoolean, isCaseInsensitive, isCollatorDisabled, isDate, isDateFormatLenient, isIgnoreWhitespace, isInteger, isLargeTextField, isLenientStringToNumber, isNull, isNumber, isNumeric, isOriginalAutoIncrement, isOriginalNullable, isOriginalSigned, isOutputPaddingEnabled, isSerializableType, isSingleByteEncoding, isSortedDescending, isStorageBinaryString, isStorageIndexed, isStorageNormal, isString, readData, readMetaData, requiresRealClone, setCaseInsensitive, setCollatorDisabled, setCollatorLocale, setCollatorStrength, setComments, setConversionMask, setConversionMetadata, setCurrencySymbol, setDateFormatLenient, setDateFormatLocale, setDateFormatTimeZone, setDecimalSymbol, setGroupingSymbol, setIgnoreWhitespace, setIndex, setLargeTextField, setLength, setLength, setLenientStringToNumber, setName, setNumberOfBinaryStringConversions, setOrigin, setOriginalAutoIncrement, setOriginalColumnType, setOriginalColumnTypeName, setOriginalNullable, setOriginalPrecision, setOriginalScale, setOriginalSigned, setOutputPaddingEnabled, setPrecision, setSortedDescending, setStorageMetadata, setStorageType, setStringEncoding, setTrimType, setType, toStringMeta, writeData, writeMeta
public ValueMetaInternetAddress()
public ValueMetaInternetAddress(String name)
public int compare(Object data1, Object data2) throws KettleValueException
ValueMetaBase
compare
in interface ValueMetaInterface
compare
in class ValueMetaBase
data1
- the first valuedata2
- the second valueKettleValueException
- In case we get conversion errorspublic InetAddress getInternetAddress(Object object) throws KettleValueException
KettleValueException
public Date getDate(Object object) throws KettleValueException
ValueMetaInterface
getDate
in interface ValueMetaInterface
getDate
in class ValueMetaDate
KettleValueException
public Long getInteger(Object object) throws KettleValueException
ValueMetaInterface
getInteger
in interface ValueMetaInterface
getInteger
in class ValueMetaBase
KettleValueException
public Double getNumber(Object object) throws KettleValueException
ValueMetaInterface
getNumber
in interface ValueMetaInterface
getNumber
in class ValueMetaBase
KettleValueException
public BigDecimal getBigNumber(Object object) throws KettleValueException
ValueMetaInterface
getBigNumber
in interface ValueMetaInterface
getBigNumber
in class ValueMetaBase
KettleValueException
public Boolean getBoolean(Object object) throws KettleValueException
ValueMetaInterface
getBoolean
in interface ValueMetaInterface
getBoolean
in class ValueMetaBase
KettleValueException
public String getString(Object object) throws KettleValueException
ValueMetaInterface
getString
in interface ValueMetaInterface
getString
in class ValueMetaBase
KettleValueException
public byte[] getBinaryString(Object object) throws KettleValueException
ValueMetaInterface
getBinaryString
in interface ValueMetaInterface
getBinaryString
in class ValueMetaBase
KettleValueException
protected InetAddress convertBigNumberToInternetAddress(BigDecimal bd) throws KettleValueException
KettleValueException
protected InetAddress convertNumberToInternetAddress(Double d) throws KettleValueException
KettleValueException
protected InetAddress convertIntegerToInternetAddress(Long l) throws KettleValueException
KettleValueException
protected InetAddress convertStringToInternetAddress(String string) throws KettleValueException
KettleValueException
protected String convertInternetAddressToString(InetAddress inetAddress) throws KettleValueException
KettleValueException
public Object convertDataFromString(String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull, int trim_type) throws KettleValueException
ValueMetaBase
convertDataFromString
in interface ValueMetaInterface
convertDataFromString
in class ValueMetaBase
pol
- the string to be convertedconvertMeta
- the metadata of the object (only string type) to be convertednullIf
- set the object to null if pos equals nullif (IgnoreCase)ifNull
- set the object to ifNull when pol is empty or nulltrim_type
- the trim type to be used (ValueMetaInterface.TRIM_TYPE_XXX)KettleValueException
- in case there is a data conversion errorpublic Object convertData(ValueMetaInterface meta2, Object data2) throws KettleValueException
convertData
in interface ValueMetaInterface
convertData
in class ValueMetaBase
meta2
- the metadata of the object to be converteddata2
- the data of the object to be convertedKettleValueException
- in case there is a data conversion errorpublic Object cloneValueData(Object object) throws KettleValueException
ValueMetaBase
cloneValueData
in interface ValueMetaInterface
cloneValueData
in class ValueMetaBase
object
- the objectKettleValueException
- the kettle value exceptionpublic ValueMetaInterface getMetadataPreview(DatabaseMeta databaseMeta, ResultSet rs) throws KettleDatabaseException
ValueMetaInterface
Note that the ValueMeta returned by this RowMeta may not contain actual values. This is a lightweight call using only JDBC metadata and does not make use of SQL statements.
getMetadataPreview
in interface ValueMetaInterface
getMetadataPreview
in class ValueMetaBase
databaseMeta
- the database metadata to reference capabilities and so on.rs
- A ResultSet from getColumns, positioned correctly on a column to read.KettleDatabaseException
public ValueMetaInterface getValueFromSQLType(DatabaseMeta databaseMeta, String name, ResultSetMetaData rm, int index, boolean ignoreLength, boolean lazyConversion) throws KettleDatabaseException
ValueMetaInterface
getValueFromSQLType
in interface ValueMetaInterface
getValueFromSQLType
in class ValueMetaBase
databaseMeta
- the database metadata to reference capabilities and so on.name
- The name of the new valuerm
- The result metadata to investigateindex
- The index to look at (1-based)ignoreLength
- Don't look at the lengthlazyConversion
- use lazy conversionKettleDatabaseException
- In case something went wrong.public Object getValueFromResultSet(DatabaseInterface databaseInterface, ResultSet resultSet, int index) throws KettleDatabaseException
ValueMetaBase
getValueFromResultSet
in interface ValueMetaInterface
getValueFromResultSet
in class ValueMetaBase
databaseInterface
- the database metadata to useresultSet
- The JDBC result set to read fromindex
- The column index (1-based)KettleDatabaseException
- in case something goes wrong.public void setPreparedStatementValue(DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data) throws KettleDatabaseException
ValueMetaInterface
setPreparedStatementValue
in interface ValueMetaInterface
setPreparedStatementValue
in class ValueMetaBase
databaseMeta
- the database metadata to referencepreparedStatement
- The prepared statementindex
- the column index (1-based)data
- the value to setKettleDatabaseException
- in case something goes wrongpublic String getDatabaseColumnTypeDefinition(DatabaseInterface databaseInterface, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr)
ValueMetaInterface
getDatabaseColumnTypeDefinition
in interface ValueMetaInterface
getDatabaseColumnTypeDefinition
in class ValueMetaBase
databaseInterface
- The database type/dialect to get the column type definition fortk
- Is this a technical key field?pk
- Is this a primary key field?use_autoinc
- Use auto-increment?add_fieldname
- add the fieldname to the column type definition?add_cr
- add a cariage return to the string?public Object getNativeDataType(Object object) throws KettleValueException
ValueMetaInterface
getNativeDataType
in interface ValueMetaInterface
getNativeDataType
in class ValueMetaDate
object
- The input dataKettleValueException
- in case there is an unexpected data conversion error.public Class<?> getNativeDataTypeClass() throws KettleValueException
ValueMetaInterface
getNativeDataTypeClass
in interface ValueMetaInterface
getNativeDataTypeClass
in class ValueMetaDate
KettleValueException
Copyright © 2020 Hitachi Vantara. All rights reserved.