Modifier and Type | Field | Description |
---|---|---|
static int |
ALL_READER_BYTES |
|
static int |
ARRAY |
|
static int |
BIGINT |
|
static int |
BINARY |
|
static int |
BLOB |
|
static int |
BLOB_LOCATOR |
|
static int |
BOOLEAN |
|
static int |
CHAR |
|
static int |
CHAR_FOR_BIT_DATA |
|
static int |
CLOB |
|
static int |
CLOB_LOCATOR |
|
static int |
DATALINK |
|
static int |
DATE |
|
static int |
DBCLOB |
|
static int |
DBCLOB_LOCATOR |
|
static int |
DECFLOAT |
|
static int |
DECIMAL |
|
static int |
DECIMAL_USING_DOUBLE |
|
static int |
DOUBLE |
|
static int |
FLOAT |
|
static int |
GRAPHIC |
|
static int |
INTEGER |
|
static int |
LONG_NVARCHAR |
|
static int |
LONG_VARCHAR |
|
static int |
LONG_VARCHAR_FOR_BIT_DATA |
|
static int |
LONG_VARGRAPHIC |
|
static short |
NATIVE_ARRAY |
|
static int |
NCHAR |
|
static int |
NCLOB |
|
static int |
NCLOB_LOCATOR |
|
static int |
NUMERIC |
|
static int |
NUMERIC_USING_DOUBLE |
|
static int |
NVARCHAR |
|
protected boolean |
outOfBounds_ |
|
static int |
REAL |
|
static int |
ROWID |
|
protected com.ibm.as400.access.SQLConversionSettings |
settings_ |
|
static int |
SMALLINT |
|
static int |
TIME |
|
static int |
TIMESTAMP |
|
protected int |
truncated_ |
|
static int |
UNDEFINED |
|
static int |
VARBINARY |
|
static int |
VARCHAR |
|
static int |
VARCHAR_FOR_BIT_DATA |
|
static int |
VARGRAPHIC |
|
static int |
XML_LOCATOR |
Constructor | Description |
---|---|
SQLDataBase(com.ibm.as400.access.SQLConversionSettings settings) |
Create a new SQLDataBase object with the specified settings
|
Modifier and Type | Method | Description |
---|---|---|
void |
clearOutOfBounds() |
|
void |
clearTruncated() |
|
abstract Object |
clone() |
Returns a clone of the SQLData object.
|
void |
convertFromRawBytes(byte[] rawBytes,
int offset,
ConvTable converter) |
Loads the contents of the data from raw bytes, as returned
in a reply from the system.
|
abstract void |
convertFromRawBytes(byte[] rawBytes,
int offset,
ConvTable converter,
boolean ignoreConversionErrors) |
|
abstract void |
convertToRawBytes(byte[] rawBytes,
int offset,
ConvTable ccsidConverter) |
Converts the contents of the data in raw bytes, as needed
in a request to the system.
|
abstract int |
getActualSize() |
Returns the actual size of this piece of data in bytes.
|
Array |
getArray() |
Converts (returns) the data to a java.sql.Array object.
|
InputStream |
getAsciiStream() |
Converts the data to a stream of ASCII characters.
|
Object |
getBatchableObject() |
|
BigDecimal |
getBigDecimal(int scale) |
Converts the data to a Java BigDecimal object.
|
abstract InputStream |
getBinaryStream() |
Converts the data to a stream of uninterpreted bytes.
|
abstract Blob |
getBlob() |
Converts the data to a java.sql.Blob object.
|
boolean |
getBoolean() |
Converts the data to a Java boolean.
|
byte |
getByte() |
Converts the data to a Java byte.
|
abstract byte[] |
getBytes() |
Converts the data to a Java byte array containing
uninterpreted bytes.
|
Reader |
getCharacterStream() |
Converts the data to a java.io.Reader object.
|
Clob |
getClob() |
Converts the data to a java.sql.Clob object.
|
abstract String |
getCreateParameters() |
Returns the parameters used in creating the
type.
|
Date |
getDate(Calendar calendar) |
Converts the data to a java.sql.Date object.
|
abstract int |
getDisplaySize() |
Returns the display size.
|
double |
getDouble() |
Converts the data to a Java double.
|
float |
getFloat() |
Converts the data to a Java float.
|
int |
getInt() |
Converts the data to a Java int.
|
abstract String |
getJavaClassName() |
Returns the Java class name for ParameterMetaData.getParameterClassName().
|
abstract String |
getLiteralPrefix() |
Returns the prefix used to quote a literal.
|
abstract String |
getLiteralSuffix() |
Returns the suffix used to quote a literal.
|
abstract String |
getLocalName() |
Returns the localized version of the name of the
data type.
|
long |
getLong() |
Converts the data to a Java long.
|
abstract int |
getMaximumPrecision() |
Returns the maximum precision of the type.
|
abstract int |
getMaximumScale() |
Returns the maximum scale of the type.
|
abstract int |
getMinimumScale() |
Returns the minimum scale of the type.
|
abstract int |
getNativeType() |
Returns the native IBM i identifier for the type.
|
Reader |
getNCharacterStream() |
Converts the data to a java.io.Reader object.
|
NClob |
getNClob() |
Converts the data to a java.sql.NClob object
|
String |
getNString() |
Converts the data to String object.
|
abstract Object |
getObject() |
Converts the data to a Java object.
|
abstract boolean |
getOutOfBounds() |
Returns true if the last conversion of this piece of
data was out of bounds of the range of the requested
datatype.
|
abstract int |
getPrecision() |
Returns the precision of the type.
|
abstract int |
getRadix() |
Returns the radix for the type.
|
abstract RowId |
getRowId() |
Converts the data to a java.sql.RowId object.
|
Object |
getSavedValue() |
|
abstract int |
getScale() |
Returns the scale of the type.
|
short |
getShort() |
Converts the data to a Java short.
|
abstract int |
getSQLType() |
Returns the SQL type constant for the implementing class.
|
abstract SQLXML |
getSQLXML() |
Converts the data to a java.sql.SQLXML object.
|
abstract String |
getString() |
Converts the data to a Java String object.
|
Time |
getTime(Calendar calendar) |
Converts the data to a java.sql.Time object.
|
Timestamp |
getTimestamp(Calendar calendar) |
Converts the data to a java.sql.Timestamp object.
|
abstract int |
getTruncated() |
Returns the number of bytes truncated by the last conversion
of this piece of data.
|
abstract int |
getType() |
Returns the type constant associated with the type.
|
abstract String |
getTypeName() |
Returns the name of the data type.
|
InputStream |
getUnicodeStream() |
Converts the data to a stream of Unicdoe characters.
|
static boolean |
isCharacterType(int sqlType) |
|
abstract boolean |
isSigned() |
Indicates whether the type is signed.
|
abstract boolean |
isText() |
Indicates whether the type is text.
|
void |
saveValue() |
Save the current value.
|
abstract void |
set(Object object,
Calendar calendar,
int scale) |
Sets the contents of the data based on a Java object.
|
void |
updateSettings(com.ibm.as400.access.SQLConversionSettings settings) |
|
void |
validateRawTruncatedData(byte[] rawBytes,
int offset,
ConvTable ccsidConverter) |
validates that raw truncated data is correct.
|
protected int truncated_
protected boolean outOfBounds_
protected com.ibm.as400.access.SQLConversionSettings settings_
public static final short NATIVE_ARRAY
public static final int UNDEFINED
public static final int BIGINT
public static final int BINARY
public static final int BLOB
public static final int BLOB_LOCATOR
public static final int CHAR
public static final int CHAR_FOR_BIT_DATA
public static final int CLOB
public static final int CLOB_LOCATOR
public static final int DATALINK
public static final int DATE
public static final int DBCLOB
public static final int DBCLOB_LOCATOR
public static final int DECIMAL
public static final int DECIMAL_USING_DOUBLE
public static final int DOUBLE
public static final int FLOAT
public static final int GRAPHIC
public static final int INTEGER
public static final int LONG_VARCHAR
public static final int LONG_VARCHAR_FOR_BIT_DATA
public static final int LONG_VARGRAPHIC
public static final int NUMERIC
public static final int NUMERIC_USING_DOUBLE
public static final int REAL
public static final int ROWID
public static final int SMALLINT
public static final int TIME
public static final int TIMESTAMP
public static final int VARBINARY
public static final int VARCHAR
public static final int VARCHAR_FOR_BIT_DATA
public static final int VARGRAPHIC
public static final int NCLOB
public static final int NCLOB_LOCATOR
public static final int NCHAR
public static final int NVARCHAR
public static final int LONG_NVARCHAR
public static final int DECFLOAT
public static final int ARRAY
public static final int XML_LOCATOR
public static final int BOOLEAN
public static final int ALL_READER_BYTES
public SQLDataBase(com.ibm.as400.access.SQLConversionSettings settings)
settings
- public abstract Object clone()
public void convertFromRawBytes(byte[] rawBytes, int offset, ConvTable converter) throws SQLException
rawBytes
- raw bytes from the system.offset
- offset.converter
- the converter.SQLException
- If the raw bytes are not in
the expected format.public abstract void convertFromRawBytes(byte[] rawBytes, int offset, ConvTable converter, boolean ignoreConversionErrors) throws SQLException
SQLException
public abstract void convertToRawBytes(byte[] rawBytes, int offset, ConvTable ccsidConverter) throws SQLException
rawBytes
- the raw bytes for the system.offset
- the offset into the byte array.ccsidConverter
- the converter.SQLException
public void validateRawTruncatedData(byte[] rawBytes, int offset, ConvTable ccsidConverter)
rawBytes
- the raw bytes for the system.offset
- the offset into the byte array.ccsidConverter
- the converter.public abstract void set(Object object, Calendar calendar, int scale) throws SQLException
object
- a Java object.calendar
- The calendar.scale
- The scale.SQLException
- If the Java object is not an
appropriate type.public abstract int getSQLType()
public abstract String getCreateParameters()
public abstract int getDisplaySize()
public abstract String getJavaClassName()
public abstract String getLiteralPrefix()
public abstract String getLiteralSuffix()
public abstract String getLocalName()
public abstract int getMaximumPrecision()
public abstract int getMaximumScale()
public abstract int getMinimumScale()
public abstract int getNativeType()
public abstract int getPrecision()
public abstract int getRadix()
public abstract int getScale()
public abstract int getType()
public abstract String getTypeName()
public abstract boolean isSigned()
public abstract boolean isText()
public abstract int getActualSize()
public abstract int getTruncated()
public void clearTruncated()
public abstract boolean getOutOfBounds()
public void clearOutOfBounds()
public InputStream getAsciiStream() throws SQLException
SQLException
- If the conversion is not
required or not possible.public BigDecimal getBigDecimal(int scale) throws SQLException
scale
- scale, or -1 to use full scale.SQLException
- If the conversion is not
required or not possible.public abstract InputStream getBinaryStream() throws SQLException
SQLException
- If the conversion is not
required or not possible.public abstract Blob getBlob() throws SQLException
SQLException
- If the conversion is not
required or not possible.public boolean getBoolean() throws SQLException
SQLException
- If the conversion is not
required or not possible.public byte getByte() throws SQLException
SQLException
- If the conversion is not
required or not possible.public abstract byte[] getBytes() throws SQLException
SQLException
- If the conversion is not
required or not possible.public Reader getCharacterStream() throws SQLException
SQLException
- If the conversion is not
required or not possible.public Clob getClob() throws SQLException
SQLException
- If the conversion is not
required or not possible.public Date getDate(Calendar calendar) throws SQLException
calendar
- The calendar.SQLException
- If the conversion is not
required or not possible.public double getDouble() throws SQLException
SQLException
- If the conversion is not
required or not possible.public float getFloat() throws SQLException
SQLException
- If the conversion is not
required or not possible.public int getInt() throws SQLException
SQLException
- If the conversion is not
required or not possible.public long getLong() throws SQLException
SQLException
- If the conversion is not
required or not possible.public abstract Object getObject() throws SQLException
SQLException
- If the conversion is not
required or not possible.public Object getBatchableObject() throws SQLException
SQLException
public short getShort() throws SQLException
SQLException
- If the conversion is not
required or not possible.public abstract String getString() throws SQLException
SQLException
public Time getTime(Calendar calendar) throws SQLException
calendar
- The calendar.SQLException
- If the conversion is not
required or not possible.public Timestamp getTimestamp(Calendar calendar) throws SQLException
calendar
- The calendar.SQLException
- If the conversion is not
required or not possible.public InputStream getUnicodeStream() throws SQLException
SQLException
- If the conversion is not
required or not possible.public Reader getNCharacterStream() throws SQLException
SQLException
- If the conversion is not
required or not possible.public NClob getNClob() throws SQLException
SQLException
- If the conversion is not
required or not possible.public String getNString() throws SQLException
SQLException
- If the conversion is not
required or not possible.public abstract SQLXML getSQLXML() throws SQLException
SQLException
- If the conversion is not
required or not possible.public abstract RowId getRowId() throws SQLException
SQLException
- If the conversion is not
required or not possible.public Array getArray() throws SQLException
SQLException
- If the conversion is not
required or not possible.public void updateSettings(com.ibm.as400.access.SQLConversionSettings settings)
public static boolean isCharacterType(int sqlType)
public Object getSavedValue()
public abstract void saveValue() throws SQLException
SQLException
Copyright © 2024. All rights reserved.