org.objectweb.cjdbc.driver.protocol
Class SQLDataSerialization
java.lang.Object
org.objectweb.cjdbc.driver.protocol.SQLDataSerialization
- public final class SQLDataSerialization
- extends java.lang.Object
This class defines Serializers for SQL Data: per type serialization +
deserialization methods and information wrapped in one object. Serializers
are implemented as singletons for efficiency.
- Version:
- 1.0
- Author:
- Marc Herbert
Method Summary |
static SQLDataSerialization.Serializer |
getSerializer(java.lang.Object sqlObjOrTypeTag)
Returns the de/serializer appropriate for the given TypeTag, or for the
type of the given SQL object if argument is not a TypeTag (TypeTag already
knows how to serialize itself). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVA_STRING
private static final SQLDataSerialization.Serializer JAVA_STRING
- CLOB support should be easy to base on BLOB implementation once we
figure out the encoding issues.
MATH_BIGDECIMAL
private static final SQLDataSerialization.Serializer MATH_BIGDECIMAL
JAVA_BOOLEAN
private static final SQLDataSerialization.Serializer JAVA_BOOLEAN
JAVA_INTEGER
private static final SQLDataSerialization.Serializer JAVA_INTEGER
JAVA_LONG
private static final SQLDataSerialization.Serializer JAVA_LONG
JAVA_FLOAT
private static final SQLDataSerialization.Serializer JAVA_FLOAT
JAVA_DOUBLE
private static final SQLDataSerialization.Serializer JAVA_DOUBLE
JAVA_BYTES
private static final SQLDataSerialization.Serializer JAVA_BYTES
SQL_DATE
private static final SQLDataSerialization.Serializer SQL_DATE
SQL_TIME
private static final SQLDataSerialization.Serializer SQL_TIME
SQL_TIMESTAMP
private static final SQLDataSerialization.Serializer SQL_TIMESTAMP
SQL_BLOB
private static final SQLDataSerialization.Serializer SQL_BLOB
STREAM_BUF_SIZE
private static final int STREAM_BUF_SIZE
- See Also:
- Constant Field Values
SQLDataSerialization
public SQLDataSerialization()
getSerializer
public static SQLDataSerialization.Serializer getSerializer(java.lang.Object sqlObjOrTypeTag)
throws NotImplementedException,
java.lang.IllegalArgumentException
- Returns the de/serializer appropriate for the given TypeTag, or for the
type of the given SQL object if argument is not a TypeTag (TypeTag already
knows how to serialize itself).
- Parameters:
sqlObjOrTypeTag
- a typetag or a sample SQL object of the type of
interest
- Returns:
- appropriate serialization + deserialization methods
- Throws:
NotImplementedException
- if we don't know how to serialize objects
such as the given one (including "null").
java.lang.IllegalArgumentException
- if we gave a wrong TypeTag
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.