Author: shawkins
Date: 2011-10-19 11:42:21 -0400 (Wed, 19 Oct 2011)
New Revision: 3570
Modified:
trunk/client/src/main/java/org/teiid/client/BatchSerializer.java
Log:
TEIID-1750 pushing type codes down to datatypemanager
Modified: trunk/client/src/main/java/org/teiid/client/BatchSerializer.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/BatchSerializer.java 2011-10-19 14:17:27
UTC (rev 3569)
+++ trunk/client/src/main/java/org/teiid/client/BatchSerializer.java 2011-10-19 15:42:21
UTC (rev 3570)
@@ -93,13 +93,13 @@
throws IOException {
int code = DataTypeManager.getTypeCode(obj.getClass());
out.writeByte((byte)code);
- if (code == DataTypeManager.BOOLEAN) {
+ if (code == DataTypeManager.DefaultTypeCodes.BOOLEAN) {
if (Boolean.TRUE.equals(obj)) {
out.write((byte)1);
} else {
out.write((byte)0);
}
- } else if (code != DataTypeManager.OBJECT) {
+ } else if (code != DataTypeManager.DefaultTypeCodes.OBJECT) {
ColumnSerializer s =
getSerializer(DataTypeManager.getDataTypeName(obj.getClass()), (byte)1);
s.writeObject(out, obj);
} else {
@@ -111,13 +111,13 @@
protected Object readObject(ObjectInput in) throws IOException,
ClassNotFoundException {
int code = in.readByte();
- if (code == DataTypeManager.BOOLEAN) {
+ if (code == DataTypeManager.DefaultTypeCodes.BOOLEAN) {
if (in.readByte() == (byte)0) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
- if (code != DataTypeManager.OBJECT) {
+ if (code != DataTypeManager.DefaultTypeCodes.OBJECT) {
ColumnSerializer s =
getSerializer(DataTypeManager.getDataTypeName(DataTypeManager.getClass(code)), (byte)1);
return s.readObject(in);
}
Show replies by date