|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.types.BaseDataType
org.axiondb.types.LOBType
public class LOBType
A DataType
representing a Large Object (LOB), for
example a Clob
or Blob
.
Constructor Summary | |
---|---|
LOBType()
|
Method Summary | |
---|---|
boolean |
accepts(Object value)
Return true if a field of my type can be assigned the given non-
null value , false otherwise. |
Object |
convert(Object value)
Converts an acceptable value to one of the appropriate type. |
int |
getJdbcType()
Returns the JDBC type code most closely matching this type. |
File |
getLobDir()
|
protected RandomAccessFile |
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()
|
Object |
read(DataInput in)
Instantiate an object of my type from the given DataInput . |
void |
setLobDir(File lobDir)
|
Blob |
toBlob(Object value)
Convert the given non- null value to a Blob , or
throw a AxionException . |
Clob |
toClob(Object value)
Convert the given non- null value to a Clob , or
throw a AxionException . |
String |
toString()
|
String |
toString(Object value)
Convert the given non- null value to a String , or
throw a AxionException . |
void |
write(Object value,
DataOutput out)
Write an object of my type to the given DataOutput . |
protected LobLocator |
writeByteArrayBlob(ByteArrayBlob value)
|
protected LobLocator |
writeStringClob(StringClob value)
|
Methods inherited from class org.axiondb.types.BaseDataType |
---|
compare, getColumnDisplaySize, getComparator, getLiteralPrefix, getLiteralSuffix, getNullableCode, getPrecision, getPreferredValueClassName, getScale, isCurrency, isUnsigned, successor, supportsSuccessor, toBigDecimal, toBigInteger, toBoolean, toByte, toByteArray, toDate, toDouble, toFloat, toInt, toLong, toNumber, toShort, toTime, toTimestamp, toURL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public LOBType()
Method Detail |
---|
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(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 Object convert(Object value) throws IllegalArgumentException
DataType
acceptable
value to one of the appropriate type.
convert
in interface DataType
convert
in class BaseDataType
IllegalArgumentException
public Blob toBlob(Object value) throws AxionException
DataType
null
value to a Blob
, or
throw a AxionException
.
toBlob
in interface DataType
toBlob
in class BaseDataType
AxionException
ResultSet.getBlob(int)
public Clob toClob(Object value) throws AxionException
DataType
null
value to a Clob
, or
throw a AxionException
.
toClob
in interface DataType
toClob
in class BaseDataType
AxionException
ResultSet.getClob(int)
public String toString(Object value) throws AxionException
DataType
null
value to a String
, or
throw a AxionException
.
toString
in interface DataType
toString
in class BaseDataType
AxionException
ResultSet.getString(int)
public String toString()
toString
in class Object
public DataType makeNewInstance()
makeNewInstance
in interface DataTypeFactory
makeNewInstance
in class BaseDataType
public Object read(DataInput in) throws 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
IOException
public void write(Object value, DataOutput out) throws IOException
DataType
DataOutput
.
write
in interface DataType
write
in class BaseDataType
value
- the value to write, which must be acceptable
to this
DataType
IOException
public File getLobDir()
public void setLobDir(File lobDir)
public short getSearchableCode()
DataType
WHERE ... LIKE
support is available across
a column of this type
getSearchableCode
in interface DataType
getSearchableCode
in class BaseDataType
DatabaseMetaData.getTypeInfo()
protected RandomAccessFile getLobFile()
protected LobLocator writeStringClob(StringClob value) throws IOException
IOException
protected LobLocator writeByteArrayBlob(ByteArrayBlob value) throws IOException
IOException
protected BlobSource makeBlobSource(LobLocator loc) throws AxionException
AxionException
protected ClobSource makeClobSource(LobLocator loc) throws AxionException
AxionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |