|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The type of a field (column) that can be stored in a Table
.
Responsible for testing
that a value is assignable to fields of this
type, for converting
Objects
to this type, and for
reading
values from and writing
values to a stream.
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 |
getColumnDisplaySize()
Value returned by ResultSetMetaData#getColumnDisplaySize for this data
type. |
int |
getJdbcType()
Returns the JDBC type code most closely matching this type. |
String |
getLiteralPrefix()
Prefix used to quote a literal to delimit value for this type when in SQL syntax or result display |
String |
getLiteralSuffix()
Suffix used to quote a literal to delimit value for this type when in SQL syntax or result display |
int |
getNullableCode()
Code indicating that type does not accept, does accept, or does not disclose acceptance of null values |
int |
getPrecision()
Value returned by ResultSetMetaData#getPrecision for this data type. |
String |
getPreferredValueClassName()
Returns the "normal" type returned by convert(java.lang.Object) . |
int |
getScale()
Value returned by ResultSetMetaData#getScale for this data type. |
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 |
boolean |
isCurrency()
|
boolean |
isUnsigned()
For numeric types, indicates whether type stores only non-negative (>= 0) values |
Object |
read(DataInput in)
Instantiate an object of my type from the given DataInput . |
Object |
successor(Object value)
Returns the successor for the given value. |
boolean |
supportsSuccessor()
Returns true if the successor(java.lang.Object) method is supported, false
otherwise. |
BigDecimal |
toBigDecimal(Object value)
Convert the given non- null value to a
BigDecimal , or throw a AxionException . |
BigInteger |
toBigInteger(Object value)
Convert the given non- null value to a
BigInteger , or throw a AxionException . |
Blob |
toBlob(Object value)
Convert the given non- null value to a Blob , or
throw a AxionException . |
boolean |
toBoolean(Object value)
Convert the given non- null value to a boolean ,
or throw a SQLException . |
byte |
toByte(Object value)
Convert the given non- null value to a byte ,
or throw a SQLException . |
byte[] |
toByteArray(Object value)
Convert the given non- null value to a byte[] ,
or throw a AxionException . |
Clob |
toClob(Object value)
Convert the given non- null value to a Clob , or
throw a AxionException . |
Date |
toDate(Object value)
Convert the given non- null value to a Date ,
or throw a SQLException . |
double |
toDouble(Object value)
Convert the given non- null value to a double ,
or throw a AxionException . |
float |
toFloat(Object value)
Convert the given non- null value to a float ,
or throw a AxionException . |
int |
toInt(Object value)
Convert the given non- null value to a int ,
or throw a AxionException . |
long |
toLong(Object value)
Convert the given non- null value to a long ,
or throw a AxionException . |
short |
toShort(Object value)
Convert the given non- null value to a short ,
or throw a AxionException . |
String |
toString(Object value)
Convert the given non- null value to a String , or
throw a AxionException . |
Time |
toTime(Object value)
Convert the given non- null value to a Time , or
throw a AxionException . |
Timestamp |
toTimestamp(Object value)
Convert the given non- null value to a Timestamp ,
or throw a AxionException . |
URL |
toURL(Object value)
Convert the given non- null value to a URL , or
throw a AxionException . |
void |
write(Object value,
DataOutput out)
Write an object of my type to the given DataOutput . |
Methods inherited from interface java.util.Comparator |
compare, equals |
Method Detail |
public boolean accepts(Object value)
true
if a field of my type can be assigned the given non-
null
value , false
otherwise.
value
- non- null
valuepublic Object convert(Object value)
acceptable
value to one of the appropriate type.
public int getColumnDisplaySize()
ResultSetMetaData#getColumnDisplaySize
for this data
type.
ResultSetMetaData.getColumnDisplaySize(int)
public int getJdbcType()
type code
most closely matching this type.
public String getLiteralPrefix()
DatabaseMetaData.getTypeInfo()
public String getLiteralSuffix()
DatabaseMetaData.getTypeInfo()
public int getNullableCode()
null
values
DatabaseMetaData.getTypeInfo()
public int getPrecision()
ResultSetMetaData#getPrecision
for this data type.
ResultSetMetaData.getPrecision(int)
public String getPreferredValueClassName()
convert(java.lang.Object)
. Returns
java.lang.Object if unknown.
ResultSetMetaData.getColumnClassName(int)
public int getScale()
ResultSetMetaData#getScale
for this data type.
ResultSetMetaData.getScale(int)
public short getSearchableCode()
WHERE ... LIKE
support is available across
a column of this type
DatabaseMetaData.getTypeInfo()
public boolean isCaseSensitive()
DatabaseMetaData.getTypeInfo()
,
ResultSetMetaData.isCaseSensitive(int)
public boolean isCurrency()
ResultSetMetaData.isCurrency(int)
public boolean isUnsigned()
DatabaseMetaData.getTypeInfo()
public Object read(DataInput in) throws IOException
DataInput
. The next
sequence of bytes to be read from the DataInput
will have been
written by write(java.lang.Object, java.io.DataOutput)
.
IOException
public Object successor(Object value) throws UnsupportedOperationException
UnsupportedOperationException
public boolean supportsSuccessor()
true
if the successor(java.lang.Object)
method is supported, false
otherwise.
public BigDecimal toBigDecimal(Object value) throws AxionException
null
value to a
BigDecimal
, or throw a AxionException
.
AxionException
ResultSet.getBigDecimal(int)
public BigInteger toBigInteger(Object value) throws AxionException
null
value to a
BigInteger
, or throw a AxionException
.
AxionException
java.sql.ResultSet#getBigInteger
public Blob toBlob(Object value) throws AxionException
null
value to a Blob
, or
throw a AxionException
.
AxionException
ResultSet.getBlob(int)
public boolean toBoolean(Object value) throws AxionException
null
value to a boolean
,
or throw a SQLException
.
AxionException
ResultSet.getBoolean(int)
public byte toByte(Object value) throws AxionException
null
value to a byte
,
or throw a SQLException
.
AxionException
ResultSet.getByte(int)
public byte[] toByteArray(Object value) throws AxionException
null
value to a byte[]
,
or throw a AxionException
.
AxionException
ResultSet.getBytes(int)
public Clob toClob(Object value) throws AxionException
null
value to a Clob
, or
throw a AxionException
.
AxionException
ResultSet.getClob(int)
public Date toDate(Object value) throws AxionException
null
value to a Date
,
or throw a SQLException
.
AxionException
ResultSet.getDate(int)
public double toDouble(Object value) throws AxionException
null
value to a double
,
or throw a AxionException
.
AxionException
ResultSet.getDouble(int)
public float toFloat(Object value) throws AxionException
null
value to a float
,
or throw a AxionException
.
AxionException
ResultSet.getFloat(int)
public int toInt(Object value) throws AxionException
null
value to a int
,
or throw a AxionException
.
AxionException
ResultSet.getInt(int)
public long toLong(Object value) throws AxionException
null
value to a long
,
or throw a AxionException
.
AxionException
ResultSet.getLong(int)
public short toShort(Object value) throws AxionException
null
value to a short
,
or throw a AxionException
.
AxionException
ResultSet.getShort(int)
public String toString(Object value) throws AxionException
null
value to a String
, or
throw a AxionException
.
AxionException
ResultSet.getString(int)
public Time toTime(Object value) throws AxionException
null
value to a Time
, or
throw a AxionException
.
AxionException
ResultSet.getTime(int)
public Timestamp toTimestamp(Object value) throws AxionException
null
value to a Timestamp
,
or throw a AxionException
.
AxionException
ResultSet.getTimestamp(int)
public URL toURL(Object value) throws AxionException
null
value to a URL
, or
throw a AxionException
.
AxionException
ResultSet.getURL(int)
public void write(Object value, DataOutput out) throws IOException
DataOutput
.
value
- the value to write, which must be acceptable
to this
DataType
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |