public class LOBType extends BaseDataType
DataType.BinaryRepresentation, DataType.ExactNumeric, DataType.NonFixedPrecision
Constructor and Description |
---|
LOBType() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(java.lang.Object value)
Return
true if a field of my type can be assigned the given non-
null value , false otherwise. |
java.lang.Object |
convert(java.lang.Object value)
Converts an
acceptable value to one of the appropriate type. |
int |
getColumnDisplaySize()
Value returned by
ResultSetMetaData#getColumnDisplaySize for this data
type. |
int |
getJdbcType()
Returns the JDBC
type code most closely matching this type. |
java.io.File |
getLobDir() |
protected BufferedDataInputStream |
getLobFile() |
short |
getSearchableCode()
Code indicating how much
WHERE ... |
boolean |
isCaseSensitive()
For character and string-related types, indicates whether type acknowledges case
when storing and retrieving values
|
protected BlobSource |
makeBlobSource(LobLocator loc) |
protected ClobSource |
makeClobSource(LobLocator loc) |
DataType |
makeNewInstance()
Creates a new instance of this DataType implementation.
|
java.lang.Object |
read(java.io.DataInput in)
Instantiate an object of my type from the given
DataInput . |
void |
setLobDir(java.io.File lobDir) |
java.sql.Blob |
toBlob(java.lang.Object value)
|
java.sql.Clob |
toClob(java.lang.Object value)
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.Object value)
|
void |
write(java.lang.Object value,
java.io.DataOutput out)
Write an object of my type to the given
DataOutput . |
protected LobLocator |
writeByteArrayBlob(ByteArrayBlob value) |
protected LobLocator |
writeStringClob(StringClob value) |
compare, getComparator, getLiteralPrefix, getLiteralSuffix, getNullableCode, getPrecision, getPrecisionRadix, getPreferredValueClassName, getScale, isCurrency, isUnsigned, successor, supportsSuccessor, toBigDecimal, toBigInteger, toBoolean, toByte, toByteArray, toDate, toDouble, toFloat, toInt, toLong, toNumber, toShort, toTime, toTimestamp, toURL
public int getJdbcType()
DataType
type code
most closely matching this type.getJdbcType
in interface DataType
getJdbcType
in class BaseDataType
public boolean isCaseSensitive()
DataType
isCaseSensitive
in interface DataType
isCaseSensitive
in class BaseDataType
DatabaseMetaData.getTypeInfo()
,
ResultSetMetaData.isCaseSensitive(int)
public boolean accepts(java.lang.Object value)
DataType
true
if a field of my type can be assigned the given non-
null
value , false
otherwise.accepts
in interface DataType
accepts
in class BaseDataType
value
- non- null
valuepublic int getColumnDisplaySize()
DataType
ResultSetMetaData#getColumnDisplaySize
for this data
type.getColumnDisplaySize
in interface DataType
getColumnDisplaySize
in class BaseDataType
ResultSetMetaData.getColumnDisplaySize(int)
public java.lang.Object convert(java.lang.Object value) throws java.lang.IllegalArgumentException
DataType
acceptable
value to one of the appropriate type.convert
in interface DataType
convert
in class BaseDataType
java.lang.IllegalArgumentException
public java.sql.Blob toBlob(java.lang.Object value) throws AxionException
DataType
toBlob
in interface DataType
toBlob
in class BaseDataType
AxionException
ResultSet.getBlob(int)
public java.sql.Clob toClob(java.lang.Object value) throws AxionException
DataType
toClob
in interface DataType
toClob
in class BaseDataType
AxionException
ResultSet.getClob(int)
public java.lang.String toString(java.lang.Object value) throws AxionException
DataType
toString
in interface DataType
toString
in class BaseDataType
AxionException
ResultSet.getString(int)
public java.lang.String toString()
toString
in class java.lang.Object
public DataType makeNewInstance()
DataType
makeNewInstance
in interface DataType
makeNewInstance
in interface DataTypeFactory
makeNewInstance
in class BaseDataType
public java.lang.Object read(java.io.DataInput in) throws java.io.IOException
DataType
DataInput
. The next
sequence of bytes to be read from the DataInput
will have been
written by DataType.write(java.lang.Object, java.io.DataOutput)
.read
in interface DataType
read
in class BaseDataType
java.io.IOException
public void write(java.lang.Object value, java.io.DataOutput out) throws java.io.IOException
DataType
DataOutput
.write
in interface DataType
write
in class BaseDataType
value
- the value to write, which must be acceptable
to this
DataType
java.io.IOException
public java.io.File getLobDir()
public void setLobDir(java.io.File lobDir) throws AxionException
AxionException
public short getSearchableCode()
DataType
WHERE ... LIKE
support is available across
a column of this typegetSearchableCode
in interface DataType
getSearchableCode
in class BaseDataType
DatabaseMetaData.getTypeInfo()
protected BufferedDataInputStream getLobFile()
protected LobLocator writeStringClob(StringClob value) throws java.io.IOException
java.io.IOException
protected LobLocator writeByteArrayBlob(ByteArrayBlob value) throws java.io.IOException
java.io.IOException
protected BlobSource makeBlobSource(LobLocator loc) throws AxionException
AxionException
protected ClobSource makeClobSource(LobLocator loc) throws AxionException
AxionException