public class TextRowProtocol extends RowProtocol
BIT_LAST_FIELD_NOT_NULL, BIT_LAST_FIELD_NULL, BIT_LAST_ZERO_DATE, buf, index, isIntegerRegex, lastValueNull, length, maxFieldSize, NULL_LENGTH, options, pos, TEXT_LOCAL_DATE_TIME, TEXT_OFFSET_DATE_TIME, TEXT_ZONED_DATE_TIME, TINYINT1_IS_BIT, YEAR_IS_DATE_TYPE
Constructor and Description |
---|
TextRowProtocol(int maxFieldSize,
Options options)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getInternalBigDecimal(ColumnInformation columnInfo)
Get BigDecimal from raw text format.
|
java.math.BigInteger |
getInternalBigInteger(ColumnInformation columnInfo)
Get BigInteger format from raw text format.
|
boolean |
getInternalBoolean(ColumnInformation columnInfo)
Get boolean from raw text format.
|
byte |
getInternalByte(ColumnInformation columnInfo)
Get byte from raw text format.
|
java.sql.Date |
getInternalDate(ColumnInformation columnInfo,
java.util.Calendar cal,
java.util.TimeZone timeZone)
Get date from raw text format.
|
double |
getInternalDouble(ColumnInformation columnInfo)
Get double from raw text format.
|
float |
getInternalFloat(ColumnInformation columnInfo)
Get float from raw text format.
|
int |
getInternalInt(ColumnInformation columnInfo)
Get int from raw text format.
|
java.time.LocalDate |
getInternalLocalDate(ColumnInformation columnInfo,
java.util.TimeZone timeZone)
Get LocalDate format from raw text format.
|
java.time.LocalTime |
getInternalLocalTime(ColumnInformation columnInfo,
java.util.TimeZone timeZone)
Get LocalTime format from raw text format.
|
long |
getInternalLong(ColumnInformation columnInfo)
Get long from raw text format.
|
java.lang.Object |
getInternalObject(ColumnInformation columnInfo,
java.util.TimeZone timeZone)
Get Object from raw text format.
|
java.time.OffsetTime |
getInternalOffsetTime(ColumnInformation columnInfo,
java.util.TimeZone timeZone)
Get OffsetTime format from raw text format.
|
short |
getInternalShort(ColumnInformation columnInfo)
Get short from raw text format.
|
java.lang.String |
getInternalString(ColumnInformation columnInfo,
java.util.Calendar cal,
java.util.TimeZone timeZone)
Get String from raw text format.
|
java.sql.Time |
getInternalTime(ColumnInformation columnInfo,
java.util.Calendar cal,
java.util.TimeZone timeZone)
Get time from raw text format.
|
java.sql.Timestamp |
getInternalTimestamp(ColumnInformation columnInfo,
java.util.Calendar userCalendar,
java.util.TimeZone timeZone)
Get timestamp from raw text format.
|
java.lang.String |
getInternalTimeString(ColumnInformation columnInfo)
Get Time in string format from raw text format.
|
java.time.ZonedDateTime |
getInternalZonedDateTime(ColumnInformation columnInfo,
java.lang.Class clazz,
java.util.TimeZone timeZone)
Get ZonedDateTime format from raw text format.
|
boolean |
isBinaryEncoded()
Indicate if data is binary encoded.
|
void |
setPosition(int newIndex)
Set length and pos indicator to asked index.
|
extractNanos, getInternalMediumInt, getInternalSmallInt, getInternalTinyInt, getLengthMaxFieldSize, getMaxFieldSize, lastValueWasNull, parseBit, rangeCheck, rangeCheck, resetRow, wasNull, zeroFillingIfNeeded
public TextRowProtocol(int maxFieldSize, Options options)
maxFieldSize
- max field sizeoptions
- connection optionspublic void setPosition(int newIndex)
setPosition
in class RowProtocol
newIndex
- index (0 is first).public java.lang.String getInternalString(ColumnInformation columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalString
in class RowProtocol
columnInfo
- column informationcal
- calendartimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic int getInternalInt(ColumnInformation columnInfo) throws java.sql.SQLException
getInternalInt
in class RowProtocol
columnInfo
- column informationjava.sql.SQLException
- if column type doesn't permit conversion or not in Integer rangepublic long getInternalLong(ColumnInformation columnInfo) throws java.sql.SQLException
getInternalLong
in class RowProtocol
columnInfo
- column informationjava.sql.SQLException
- if column type doesn't permit conversion or not in Long range (unsigned)public float getInternalFloat(ColumnInformation columnInfo) throws java.sql.SQLException
getInternalFloat
in class RowProtocol
columnInfo
- column informationjava.sql.SQLException
- if column type doesn't permit conversion or not in Float rangepublic double getInternalDouble(ColumnInformation columnInfo) throws java.sql.SQLException
getInternalDouble
in class RowProtocol
columnInfo
- column informationjava.sql.SQLException
- if column type doesn't permit conversion or not in Double range
(unsigned)public java.math.BigDecimal getInternalBigDecimal(ColumnInformation columnInfo)
getInternalBigDecimal
in class RowProtocol
columnInfo
- column informationpublic java.sql.Date getInternalDate(ColumnInformation columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalDate
in class RowProtocol
columnInfo
- column informationcal
- calendartimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic java.sql.Time getInternalTime(ColumnInformation columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalTime
in class RowProtocol
columnInfo
- column informationcal
- calendartimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic java.sql.Timestamp getInternalTimestamp(ColumnInformation columnInfo, java.util.Calendar userCalendar, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalTimestamp
in class RowProtocol
columnInfo
- column informationuserCalendar
- calendartimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic java.lang.Object getInternalObject(ColumnInformation columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalObject
in class RowProtocol
columnInfo
- column informationtimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic boolean getInternalBoolean(ColumnInformation columnInfo)
getInternalBoolean
in class RowProtocol
columnInfo
- column informationpublic byte getInternalByte(ColumnInformation columnInfo) throws java.sql.SQLException
getInternalByte
in class RowProtocol
columnInfo
- column informationjava.sql.SQLException
- if column type doesn't permit conversionpublic short getInternalShort(ColumnInformation columnInfo) throws java.sql.SQLException
getInternalShort
in class RowProtocol
columnInfo
- column informationjava.sql.SQLException
- if column type doesn't permit conversion or value is not in Short rangepublic java.lang.String getInternalTimeString(ColumnInformation columnInfo)
getInternalTimeString
in class RowProtocol
columnInfo
- column informationpublic java.math.BigInteger getInternalBigInteger(ColumnInformation columnInfo)
getInternalBigInteger
in class RowProtocol
columnInfo
- column informationpublic java.time.ZonedDateTime getInternalZonedDateTime(ColumnInformation columnInfo, java.lang.Class clazz, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalZonedDateTime
in class RowProtocol
columnInfo
- column informationclazz
- class for loggingtimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic java.time.OffsetTime getInternalOffsetTime(ColumnInformation columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalOffsetTime
in class RowProtocol
columnInfo
- column informationtimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic java.time.LocalTime getInternalLocalTime(ColumnInformation columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalLocalTime
in class RowProtocol
columnInfo
- column informationtimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic java.time.LocalDate getInternalLocalDate(ColumnInformation columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
getInternalLocalDate
in class RowProtocol
columnInfo
- column informationtimeZone
- time zonejava.sql.SQLException
- if column type doesn't permit conversionpublic boolean isBinaryEncoded()
isBinaryEncoded
in class RowProtocol