db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r774617 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/types/ impl/sql/catalog/ impl/sql/compile/
Date Thu, 14 May 2009 02:36:03 GMT
Author: bpendleton
Date: Thu May 14 02:36:02 2009
New Revision: 774617

URL: http://svn.apache.org/viewvc?rev=774617&view=rev
Log:
DERBY-4062: Remove single-argument getDataValue overrides from DataValueFactory

This change simplifies the DataValueFactory interface by removing the
single-argument overrides of the getDataValue() method. This change extends
the work that was done by Dan in 2007 in revision 540791. The large number
of single-argument overrides was complicated and clients could accidentally
call the wrong override, particularly since there was an override which
took an argument of type Object. As suggested by Knut, the new implementation
replaces calls to the single-argument getDataValue method with direct calls
to the constructor of the desired data type. The new code is simpler and
easier to read, and the data type usage is more self-evident in the system
catalog row factories, which are the principal users of the single-argument
getDataValue calls.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLSmallint.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTinyint.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DropDependencyFilter.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLBooleanConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactory.java Thu May 14 02:36:02 2009
@@ -62,62 +62,56 @@
 
         /**
          * Get a SQL smallint with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
+         * a SQL null value.  The second arg  uses the previous value (if non-null)
          * to hold the return value.
          *
          */
-        NumberDataValue         getDataValue(Short value);
         NumberDataValue         getDataValue(Short value, NumberDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL TINYINT with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
+         * a SQL null value.  The second arg  uses the previous value (if non-null)
          * to hold the return value.
          *
          */
-        NumberDataValue         getDataValue(Byte value);
         NumberDataValue         getDataValue(Byte value, NumberDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL bigint with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
+         * a SQL null value.  The second arg  uses the previous value (if non-null)
          * to hold the return value.
          *
          */
-        NumberDataValue         getDataValue(Long value);
         NumberDataValue         getDataValue(Long value, NumberDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL real with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
+         * a SQL null value.  The second arg  uses the previous value (if non-null)
          * to hold the return value.
          *
          */
-        NumberDataValue         getDataValue(Float value) throws StandardException;
         NumberDataValue         getDataValue(Float value, NumberDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL double precision with the given value.  A null argument means
-         * a SQL null value.  The second form uses the previous value (if non-null)
+         * a SQL null value.  The second arg  uses the previous value (if non-null)
          * to hold the return value.
          *
          * @exception StandardException         Thrown on error
          */
-        NumberDataValue         getDataValue(Double value) throws StandardException;
         NumberDataValue         getDataValue(Double value, NumberDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL boolean with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
+         * a SQL null value.  The second arg  uses the previous value (if non-null)
          * to hold the return value.
          *
          */
-        BooleanDataValue        getDataValue(Boolean value);
         BooleanDataValue        getDataValue(Boolean value, BooleanDataValue previous)
                                                         throws StandardException;
         
@@ -157,20 +151,9 @@
         BitDataValue            getBlobDataValue(Blob value,
                                                                                                 BitDataValue previous)
                                                         throws StandardException;
-        // ------ BOOLEAN
-        /**
-         * Get a SQL boolean with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
-         * to hold the return value.
-         *
-         * @exception StandardException         Thrown on error
-         */
-        BooleanDataValue        getDataValue(BooleanDataValue value) throws StandardException;
-
         /**
          * Get a SQL varchar with the given value.  A null argument means get
-         * a SQL null value.  The second form uses the previous value (if non-null)
-         * to hold the return value.
+         * a SQL null value.
          *
          */
         StringDataValue         getVarcharDataValue(String value);
@@ -199,8 +182,7 @@
                 int collationType) throws StandardException;
         /**
          * Get a SQL long varchar with the given value.  A null argument means
-         * get a SQL null value.  The second form uses the previous value
-         * (if non-null) to hold the return value.
+         * get a SQL null value.
          *
          */
         StringDataValue         getLongvarcharDataValue(String value);
@@ -263,11 +245,10 @@
 
         /**
          * Get a User-defined data value with the given value and type name.
-         * A null argument means get a SQL null value.  The second form uses
+         * A null argument means get a SQL null value.  The second arg uses
          * the previous value (if non-null) hold the return value.
          *
          */
-        UserDataValue           getDataValue(Object value);
         UserDataValue           getDataValue(Object value,
                                                                                 UserDataValue previous);
 
@@ -280,20 +261,18 @@
         RefDataValue            getDataValue(RowLocation value, RefDataValue previous);
 
         /**
-         * Get a SQL int with the given value.  The second form re-uses the
+         * Get a SQL int with the given value.  The second arg re-uses the
          * previous value, if non-null, as the data holder to return.
          *
          */
-        NumberDataValue         getDataValue(int value);
         NumberDataValue         getDataValue(int value, NumberDataValue previous)
                                                         throws StandardException;
 
         /**
-         * Get a SQL bigint with the given value.  The second form re-uses the
+         * Get a SQL bigint with the given value.  The second arg re-uses the
          * previous value, if non-null, as the data holder to return.
          *
          */
-        NumberDataValue         getDataValue(long value);
         NumberDataValue         getDataValue(long value, NumberDataValue previous)
                                                         throws StandardException;
 
@@ -361,11 +340,10 @@
                                                         throws StandardException;
 
         /**
-         * Get a SQL boolean with the given value.  The second form re-uses the
+         * Get a SQL boolean with the given value.  The second arg re-uses the
          * previous value, if non-null, as the data holder to return.
          *
          */
-        BooleanDataValue        getDataValue(boolean value);
         BooleanDataValue        getDataValue(boolean value, BooleanDataValue previous)
                                                         throws StandardException;
 
@@ -420,31 +398,28 @@
 
         /**
          * Get a SQL date with the given value.  A null argument means get
-         * a SQL null value.  The second form re-uses the previous value,
+         * a SQL null value.  The second arg re-uses the previous value,
          * if non-null, as the data holder to return.
          *
          */
-        DateTimeDataValue       getDataValue(Date value) throws StandardException;
         DateTimeDataValue       getDataValue(Date value, DateTimeDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL time with the given value.  A null argument means get
-         * a SQL null value.  The second form re-uses the previous value,
+         * a SQL null value.  The second arg re-uses the previous value,
          * if non-null, as the data holder to return.
          *
          */
-        DateTimeDataValue       getDataValue(Time value) throws StandardException;
         DateTimeDataValue       getDataValue(Time value, DateTimeDataValue previous)
                                                         throws StandardException;
 
         /**
          * Get a SQL timestamp with the given value.  A null argument means get
-         * a SQL null value.  The second form re-uses the previous value,
+         * a SQL null value.  The second arg re-uses the previous value,
          * if non-null, as the data holder to return.
          *
          */
-        DateTimeDataValue       getDataValue(Timestamp value) throws StandardException;
         DateTimeDataValue       getDataValue(Timestamp value,
                                                                                 DateTimeDataValue previous)
                                                         throws StandardException;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java Thu May 14 02:36:02 2009
@@ -171,11 +171,6 @@
          * @see DataValueFactory#getDataValue
          *
          */
-        public NumberDataValue getDataValue(int value)
-        {
-                return new SQLInteger(value);
-        }
-
         public NumberDataValue getDataValue(int value, NumberDataValue previous)
                                                         throws StandardException
         {
@@ -185,14 +180,6 @@
                 return previous;
         }
 
-        public NumberDataValue getDataValue(Integer value)
-        {
-                if (value != null)
-                        return new SQLInteger(value.intValue());
-                else
-                        return new SQLInteger();
-        }
-
         public NumberDataValue getDataValue(Integer value, NumberDataValue previous)
                         throws StandardException
         {
@@ -223,20 +210,11 @@
                 return previous;
         }
 
-        public NumberDataValue getDataValue(Short value)
-        {
-                if (value != null)
-                        return new SQLSmallint(value.shortValue());
-                else
-                        return new SQLSmallint();
-        }
-
         public NumberDataValue getDataValue(Short value, NumberDataValue previous)
                         throws StandardException
         {
                 if (previous == null)
-                        return getDataValue(value);
-
+                        return new SQLSmallint(value);
                 previous.setValue(value);
                 return previous;
         }
@@ -250,29 +228,15 @@
                 return previous;
         }
 
-        public NumberDataValue getDataValue(Byte value)
-        {
-                if (value != null)
-                        return new SQLTinyint(value.byteValue());
-                else
-                        return new SQLTinyint();
-        }
-
         public NumberDataValue getDataValue(Byte value, NumberDataValue previous)
                                 throws StandardException
         {
                 if (previous == null)
-                        return getDataValue(value);
-
+                        return new SQLTinyint(value);
                 previous.setValue(value);
                 return previous;
         }
 
-        public NumberDataValue getDataValue(long value)
-        {
-                return new SQLLongint(value);
-        }
-
         public NumberDataValue getDataValue(long value, NumberDataValue previous)
                                 throws StandardException
         {
@@ -282,20 +246,12 @@
                 return previous;
         }
 
-        public NumberDataValue getDataValue(Long value)
-        {
-                if (value != null)
-                        return new SQLLongint(value.longValue());
-                else
-                        return new SQLLongint();
-        }
 
         public NumberDataValue getDataValue(Long value, NumberDataValue previous)
                         throws StandardException
         {
                 if (previous == null)
-                        return getDataValue(value);
-
+                        return new SQLLongint(value);
                 previous.setValue(value);
                 return previous;
         }
@@ -309,21 +265,11 @@
                 return previous;
         }
 
-        public NumberDataValue getDataValue(Float value)
-                throws StandardException
-        {
-                if (value != null)
-                        return new SQLReal(value.floatValue());
-                else
-                        return new SQLReal();
-        }
-
         public NumberDataValue getDataValue(Float value, NumberDataValue previous)
                         throws StandardException
         {
                 if (previous == null)
-                        return getDataValue(value);
-
+                        return new SQLReal(value);
                 previous.setValue(value);
                 return previous;
         }
@@ -337,20 +283,11 @@
                 return previous;
         }
 
-        public NumberDataValue getDataValue(Double value) throws StandardException
-        {
-                if (value != null)
-                        return new SQLDouble(value.doubleValue());
-                else
-                        return new SQLDouble();
-        }
-
         public NumberDataValue getDataValue(Double value, NumberDataValue previous)
                         throws StandardException
         {
                 if (previous == null)
-                        return getDataValue(value);
-
+                        return new SQLDouble(value);
                 previous.setValue(value);
                 return previous;
         }
@@ -383,11 +320,6 @@
                 return previous;
         }
 
-        public BooleanDataValue getDataValue(boolean value)
-        {
-                return new SQLBoolean(value);
-        }
-
         public BooleanDataValue getDataValue(boolean value,
                                                                                 BooleanDataValue previous)
                         throws StandardException
@@ -399,33 +331,16 @@
                 return previous;
         }
 
-        public BooleanDataValue getDataValue(Boolean value)
-        {
-                if (value != null)
-                        return new SQLBoolean(value.booleanValue());
-                else
-                        return new SQLBoolean();
-        }
-
         public BooleanDataValue getDataValue(Boolean value,
                                                                                         BooleanDataValue previous)
                         throws StandardException
         {
                 if (previous == null)
-                        return getDataValue(value);
-
+                        return new SQLBoolean(value);
                 previous.setValue(value);
                 return previous;
         }
 
-        public BooleanDataValue getDataValue(BooleanDataValue value)
-        {
-                if (value != null)
-                        return value;
-                else
-                        return new SQLBoolean();
-        }
-
         public BitDataValue getBitDataValue(byte[] value) throws StandardException
         {
                 return new SQLBit(value);
@@ -620,11 +535,6 @@
             return previous;
         }
 
-        public DateTimeDataValue getDataValue(Date value) throws StandardException
-        {
-                return new SQLDate(value);
-        }
-
         public DateTimeDataValue getDataValue(Date value,
                                                                                         DateTimeDataValue previous)
                         throws StandardException
@@ -635,11 +545,6 @@
                 return previous;
         }
 
-        public DateTimeDataValue getDataValue(Time value) throws StandardException
-        {
-                return new SQLTime(value);
-        }
-
         public DateTimeDataValue getDataValue(Time value,
                                                                                         DateTimeDataValue previous)
                         throws StandardException
@@ -650,11 +555,6 @@
                 return previous;
         }
 
-        public DateTimeDataValue getDataValue(Timestamp value) throws StandardException
-        {
-                return new SQLTimestamp(value);
-        }
-
         public DateTimeDataValue getDataValue(Timestamp value,
                                                                                         DateTimeDataValue previous)
                         throws StandardException
@@ -694,11 +594,6 @@
             return new SQLTimestamp( date, time);
         }
 
-        public UserDataValue getDataValue(Object value)
-        {
-                return new UserType(value);
-        }
-
         public UserDataValue getDataValue(Object value,
                                                                                 UserDataValue previous)
         {
@@ -994,7 +889,7 @@
         {
                 if (dataValue == null)
                 {
-                        return getDataValue((Object) null);
+                        return new UserType((Object) null);
                 }
                 else
                 {
@@ -1022,7 +917,7 @@
                 {
                     try
                     {
-                        return getDataValue((Date) null);
+                        return new SQLDate((Date) null);
                     }
                     catch( StandardException se)
                     {
@@ -1046,7 +941,7 @@
                 {
                     try
                     {
-                        return getDataValue((Time) null);
+                        return new SQLTime((Time) null);
                     }
                     catch( StandardException se)
                     {
@@ -1070,7 +965,7 @@
                 {
                     try
                     {
-                        return getDataValue((Timestamp) null);
+                        return new SQLTimestamp((Timestamp) null);
                     }
                     catch( StandardException se)
                     {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLSmallint.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLSmallint.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLSmallint.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLSmallint.java Thu May 14 02:36:02 2009
@@ -341,6 +341,13 @@
 		this.isnull = isnull;
 	}
 
+	public SQLSmallint(Short obj) {
+		if (isnull = (obj == null))
+			;
+		else
+			value = obj.shortValue();
+	}
+
 	/**
 		@exception StandardException thrown if string not accepted
 	 */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTinyint.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTinyint.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTinyint.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTinyint.java Thu May 14 02:36:02 2009
@@ -116,6 +116,13 @@
 		this.isnull = isnull;
 	}
 
+	public SQLTinyint(Byte obj) {
+		if (isnull = (obj == null))
+			;
+		else
+			value = obj.byteValue();
+	}
+
 	//////////////////////////////////////////////////////////////
 	//
 	// DataValueDescriptor interface

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java Thu May 14 02:36:02 2009
@@ -78,9 +78,12 @@
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.NumberDataValue;
 
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.SQLLongint;
 import org.apache.derby.iapi.types.SQLVarchar;
 import org.apache.derby.iapi.types.StringDataValue;
+import org.apache.derby.iapi.types.UserType;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
@@ -2754,7 +2757,7 @@
 				columns = modifiedColumns;
 			}
 	        curRow.setColumn(SYSCOLPERMSRowFactory.COLUMNS_COL_NUM,
-					  dvf.getDataValue((Object) columns));
+					  new UserType((Object) columns));
 			ti.updateRow(uuidKey, curRow,
 					SYSCOLPERMSRowFactory.COLPERMSID_INDEX_NUM,
 					 bArray, 
@@ -4251,9 +4254,9 @@
 		/* Set up a couple of row templates for fetching CHARS */
 
 		replaceRow[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID - 1] = 
-            dvf.getDataValue(false);
+            new SQLBoolean(false);
 		replaceRow[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE - 1] = 
-            dvf.getDataValue((Object) null);
+            new UserType((Object) null);
 
 		/* Scan the entire heap */
 		ScanController sc = 
@@ -6144,7 +6147,7 @@
   		SYSCONGLOMERATESRowFactory  rf = (SYSCONGLOMERATESRowFactory) ti.getCatalogRowFactory();
 
   		conglomNumberOrderable = 
-  				dvf.getDataValue(conglomerateNumber);
+  				new SQLLongint(conglomerateNumber);
 
 		ScanQualifier[][] scanQualifier = exFactory.getScanQualifier(1);
   		scanQualifier[0][0].setQualifier(
@@ -9165,7 +9168,7 @@
 			aiValue += increment.getLong();
 		}
 		row.setColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE,
-					  dvf.getDataValue(aiValue));
+					  new SQLLongint(aiValue));
 
 		ti.updateRow(keyRow, row,
 					 SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DropDependencyFilter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DropDependencyFilter.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DropDependencyFilter.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DropDependencyFilter.java Thu May 14 02:36:02 2009
@@ -28,6 +28,7 @@
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
 import org.apache.derby.iapi.types.BooleanDataValue;
+import org.apache.derby.iapi.types.SQLBoolean;
 
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 
@@ -185,7 +186,7 @@
 	{
 		if ( trueValue == null )
 		{
-			trueValue = getDataValueFactory().getDataValue( true );
+			trueValue = new SQLBoolean( true );
 		}
 
 		return	trueValue;
@@ -202,7 +203,7 @@
 	{
 		if ( falseValue == null )
 		{
-			falseValue = getDataValueFactory().getDataValue( false );
+			falseValue = new SQLBoolean( false );
 		}
 
 		return	falseValue;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java Thu May 14 02:36:02 2009
@@ -37,8 +37,10 @@
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.DataValueFactory;
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.SQLChar;
 import org.apache.derby.iapi.types.SQLVarchar;
+import org.apache.derby.iapi.types.UserType;
 
 
 /**
@@ -214,11 +216,11 @@
 
 		/* 7th column is SYSTEMALIAS (boolean) */
 		row.setColumn
-			(SYSALIASES_SYSTEMALIAS, dvf.getDataValue(systemAlias));
+			(SYSALIASES_SYSTEMALIAS, new SQLBoolean(systemAlias));
 
 		/* 8th column is ALIASINFO (org.apache.derby.catalog.AliasInfo) */
 		row.setColumn(SYSALIASES_ALIASINFO, 
-			dvf.getDataValue(aliasInfo));
+			new UserType(aliasInfo));
 
 		/* 9th column is specific name */
 		row.setColumn

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java Thu May 14 02:36:02 2009
@@ -41,6 +41,7 @@
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.UserType;
 
 /**
  * Factory for creating a SYSCHECKS row.
@@ -139,7 +140,7 @@
 		 *  (user type org.apache.derby.catalog.ReferencedColumns)
 		 */
 		row.setColumn(SYSCHECKS_REFERENCEDCOLUMNS,
-			dvf.getDataValue(rcd));
+			new UserType(rcd));
 
 		return row;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java Thu May 14 02:36:02 2009
@@ -37,6 +37,7 @@
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.types.SQLChar;
 import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.types.UserType;
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.RowLocation;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
@@ -136,7 +137,7 @@
         row.setColumn( GRANTOR_COL_NUM, grantor);
         row.setColumn( TABLEID_COL_NUM, new SQLChar(tableID));
         row.setColumn( TYPE_COL_NUM, new SQLChar(type));
-        row.setColumn( COLUMNS_COL_NUM, dvf.getDataValue( (Object) columns));
+        row.setColumn( COLUMNS_COL_NUM, new UserType( (Object) columns));
         return row;
     } // end of makeRow
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java Thu May 14 02:36:02 2009
@@ -49,6 +49,7 @@
 import org.apache.derby.iapi.types.SQLLongint;
 import org.apache.derby.iapi.types.SQLVarchar;
 import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.types.UserType;
 import org.apache.derby.impl.sql.compile.ColumnDefinitionNode;
 
 /**
@@ -212,11 +213,11 @@
 
 		/* 4th column is COLUMNDATATYPE */
 		row.setColumn(SYSCOLUMNS_COLUMNDATATYPE,
-				dvf.getDataValue(typeDesc));
+				new UserType(typeDesc));
 
 		/* 5th column is COLUMNDEFAULT */
 		row.setColumn(SYSCOLUMNS_COLUMNDEFAULT,
-					  dvf.getDataValue(defaultSerializable));
+					  new UserType(defaultSerializable));
 
 		/* 6th column is DEFAULTID (UUID - char(36)) */
 		row.setColumn(SYSCOLUMNS_COLUMNDEFAULTID, new SQLChar(defaultID));

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java Thu May 14 02:36:02 2009
@@ -23,9 +23,12 @@
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.SQLLongint;
 import org.apache.derby.iapi.types.SQLVarchar;
 import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.types.UserType;
 import org.apache.derby.iapi.sql.dictionary.SystemColumn;
 import org.apache.derby.catalog.TypeDescriptor;
 
@@ -175,7 +178,7 @@
 		row.setColumn(2, new SQLChar(tabID));
 
 		/* 3rd column is CONGLOMERATENUMBER (long) */
-		row.setColumn(3, dvf.getDataValue(conglomNumber));
+		row.setColumn(3, new SQLLongint(conglomNumber));
 
 		/* 4th column is CONGLOMERATENAME (varchar(128)) 
 		** If null, use the tableid so we always
@@ -185,13 +188,13 @@
                 new SQLVarchar(tabID): new SQLVarchar(conglomName));
 
 		/* 5th  column is ISINDEX (boolean) */
-		row.setColumn(5, dvf.getDataValue(supportsIndex));
+		row.setColumn(5, new SQLBoolean(supportsIndex));
 
 		/* 6th column is DESCRIPTOR
 		*  (user type org.apache.derby.catalog.IndexDescriptor)
 		*/
 		row.setColumn(6,
-			dvf.getDataValue(
+			new UserType(
 						(indexRowGenerator == null ?
 							(IndexDescriptor) null :
 							indexRowGenerator.getIndexDescriptor()
@@ -200,7 +203,7 @@
 				);
 
 		/* 7th column is ISCONSTRAINT (boolean) */
-		row.setColumn(7, dvf.getDataValue(supportsConstraint));
+		row.setColumn(7, new SQLBoolean(supportsConstraint));
 
 		/* 8th column is CONGLOMERATEID (UUID - char(36)) */
 		row.setColumn(8, new SQLChar(conglomUUIDString));

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java Thu May 14 02:36:02 2009
@@ -44,6 +44,7 @@
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.SQLInteger;
 import org.apache.derby.iapi.types.SQLVarchar;
 
 /**
@@ -205,7 +206,7 @@
 		row.setColumn(SYSCONSTRAINTS_STATE, new SQLChar(isEnabled ? "E" : "D"));
 
 		/* 7th column is REFERENCED */
-		row.setColumn(SYSCONSTRAINTS_REFERENCECOUNT, dvf.getDataValue(referenceCount));
+		row.setColumn(SYSCONSTRAINTS_REFERENCECOUNT, new SQLInteger(referenceCount));
 
 		return row;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java Thu May 14 02:36:02 2009
@@ -40,6 +40,7 @@
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.UserType;
 
 /**
  * Factory for creating a SYSDEPENDSS row.
@@ -151,14 +152,14 @@
 
 		/* 2nd column is DEPENDENTFINDER */
 		row.setColumn(SYSDEPENDS_DEPENDENTTYPE,
-				dvf.getDataValue(dependentBloodhound));
+				new UserType(dependentBloodhound));
 
 		/* 3rd column is PROVIDERID (UUID - char(36)) */
 		row.setColumn(SYSDEPENDS_PROVIDERID, new SQLChar(providerID));
 
 		/* 4th column is PROVIDERFINDER */
 		row.setColumn(SYSDEPENDS_PROVIDERTYPE,
-				dvf.getDataValue(providerBloodhound));
+				new UserType(providerBloodhound));
 
 		return row;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java Thu May 14 02:36:02 2009
@@ -34,6 +34,7 @@
 import org.apache.derby.iapi.sql.dictionary.SystemColumn;
 import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.SQLLongint;
 import org.apache.derby.iapi.types.SQLVarchar;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.types.DataValueFactory;
@@ -156,7 +157,7 @@
 		row.setColumn(NAME_COL_NUM, new SQLVarchar(SQLname));
 
 		/* 4th column is GENERATIONID (long) */
-		row.setColumn(GENERATION_ID_COL_NUM, dvf.getDataValue(generationId));
+		row.setColumn(GENERATION_ID_COL_NUM, new SQLLongint(generationId));
 
 		return row;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java Thu May 14 02:36:02 2009
@@ -24,8 +24,10 @@
 import org.apache.derby.iapi.reference.Property;
 
 import org.apache.derby.iapi.types.DataTypeDescriptor;
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.SQLVarchar;
 import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.types.UserType;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
 import org.apache.derby.iapi.store.raw.RawStoreFactory;
@@ -208,7 +210,7 @@
 		row.setColumn(4, new SQLChar(typeStr));
 
 		/* 5th column is VALID */
-		row.setColumn(5, dvf.getDataValue(valid));
+		row.setColumn(5, new SQLBoolean(valid));
 
 		/* 6th column is TEXT */
 		row.setColumn(6, dvf.getLongvarcharDataValue(text));
@@ -227,10 +229,10 @@
 		**
 		** CONSTANTSTATE is really a formatable StorablePreparedStatement.
 		*/
-		row.setColumn(10, dvf.getDataValue(preparedStatement));
+		row.setColumn(10, new UserType(preparedStatement));
 
 		/* 11th column is INITIALLY_COMPILABLE */
-		row.setColumn(11, dvf.getDataValue(initiallyCompilable));
+		row.setColumn(11, new SQLBoolean(initiallyCompilable));
 
 		return row;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java Thu May 14 02:36:02 2009
@@ -35,6 +35,7 @@
 import org.apache.derby.iapi.sql.execute.ExecIndexRow;
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.types.UserType;
 import org.apache.derby.iapi.types.DataValueFactory;
 import org.apache.derby.iapi.types.RowLocation;
 import org.apache.derby.iapi.types.DataValueDescriptor;
@@ -164,9 +165,9 @@
 		row.setColumn(3, new SQLChar(tableID));
 		row.setColumn(4, new SQLTimestamp(updateTime));
 		row.setColumn(5, new SQLChar(statType));
-  		row.setColumn(6, dvf.getDataValue(validStat));
-		row.setColumn(7, dvf.getDataValue(columnCount));
-		row.setColumn(8, dvf.getDataValue(statisticsObject));
+  		row.setColumn(6, new SQLBoolean(validStat));
+		row.setColumn(7, new SQLInteger(columnCount));
+		row.setColumn(8, new UserType(statisticsObject));
 		return row;
 	}
 	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java Thu May 14 02:36:02 2009
@@ -23,9 +23,12 @@
 
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.SQLChar;
+import org.apache.derby.iapi.types.SQLTimestamp;
 import org.apache.derby.iapi.types.SQLVarchar;
 import org.apache.derby.iapi.types.TypeId;
+import org.apache.derby.iapi.types.UserType;
 
 import org.apache.derby.iapi.types.TypeId;
 
@@ -203,7 +206,7 @@
 		row.setColumn(3, new SQLChar((suuid == null) ? null : suuid.toString()));
 
 		/* 4th column is CREATIONTIMESTAMP */
-		row.setColumn(4, dvf.getDataValue(createTime));
+		row.setColumn(4, new SQLTimestamp(createTime));
 
 		/* 5th column is EVENT */
 		row.setColumn(5, new SQLChar(event));
@@ -229,16 +232,16 @@
 		/* 12th column is REFERENCEDCOLUMNS 
 		 *  (user type org.apache.derby.catalog.ReferencedColumns)
 		 */
-		row.setColumn(12, dvf.getDataValue(rcd));
+		row.setColumn(12, new UserType(rcd));
 
 		/* 13th column is TRIGGERDEFINITION */
 		row.setColumn(13, dvf.getLongvarcharDataValue(triggerDefinition));
 
 		/* 14th column is REFERENCINGOLD */
-		row.setColumn(14, dvf.getDataValue(referencingOld));
+		row.setColumn(14, new SQLBoolean(referencingOld));
 
 		/* 15th column is REFERENCINGNEW */
-		row.setColumn(15, dvf.getDataValue(referencingNew));
+		row.setColumn(15, new SQLBoolean(referencingNew));
 
 		/* 16th column is OLDREFERENCINGNAME */
 		row.setColumn(16, new SQLVarchar(oldReferencingName));

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java Thu May 14 02:36:02 2009
@@ -27,6 +27,7 @@
 
 import org.apache.derby.iapi.sql.compile.Optimizable;
 
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.BooleanDataValue;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.TypeId;
@@ -68,7 +69,7 @@
 			 ReuseFactory.getInteger(1));
 
 			booleanValue = ((Boolean) arg1).booleanValue();
-			super.setValue(getDataValueFactory().getDataValue(booleanValue));
+			super.setValue(new SQLBoolean(booleanValue));
 		}
 		else
 		{
@@ -198,7 +199,7 @@
 		}
 
 		booleanValue = !booleanValue;
-		super.setValue(getDataValueFactory().getDataValue(booleanValue));
+		super.setValue(new SQLBoolean(booleanValue));
 
 		return this;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java Thu May 14 02:36:02 2009
@@ -32,7 +32,12 @@
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.info.JVMInfo;
 
+import org.apache.derby.iapi.types.SQLDouble;
 import org.apache.derby.iapi.types.SQLInteger;
+import org.apache.derby.iapi.types.SQLLongint;
+import org.apache.derby.iapi.types.SQLReal;
+import org.apache.derby.iapi.types.SQLSmallint;
+import org.apache.derby.iapi.types.SQLTinyint;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.types.DataTypeUtilities;
 import org.apache.derby.iapi.types.NumberDataValue;
@@ -85,7 +90,7 @@
 			{
 				maxwidth = TypeId.SMALLINT_MAXWIDTH;
 				typeid = Types.TINYINT;
-				setValue(getDataValueFactory().getDataValue((Byte) arg1));
+				setValue(new SQLTinyint((Byte) arg1));
 			} 
 			break;
 
@@ -107,7 +112,7 @@
 			{
 				maxwidth = TypeId.SMALLINT_MAXWIDTH;
 				typeid = Types.SMALLINT;
-				setValue(getDataValueFactory().getDataValue((Short) arg1));
+				setValue(new SQLSmallint((Short) arg1));
 			}
 			break;
 
@@ -118,7 +123,7 @@
 			{
 				maxwidth = TypeId.LONGINT_MAXWIDTH;
 				typeid = Types.BIGINT;
-				setValue(getDataValueFactory().getDataValue((Long) arg1));
+				setValue(new SQLLongint((Long) arg1));
 			}
 			break;
 			
@@ -152,7 +157,7 @@
 			{
 				maxwidth = TypeId.DOUBLE_MAXWIDTH;
 				typeid = Types.DOUBLE;
-				setValue(getDataValueFactory().getDataValue((Double) arg1));
+				setValue(new SQLDouble((Double) arg1));
 			}
 			break;
 
@@ -163,8 +168,7 @@
 			{
 				maxwidth = TypeId.REAL_MAXWIDTH;
 				typeid = Types.REAL;
-				setValue(
-					getDataValueFactory().getDataValue((Float) arg1));
+				setValue(new SQLReal((Float) arg1));
 			}
 			break;
 			

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLBooleanConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLBooleanConstantNode.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLBooleanConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLBooleanConstantNode.java Thu May 14 02:36:02 2009
@@ -29,6 +29,7 @@
 
 import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
 import org.apache.derby.iapi.types.BooleanDataValue;
+import org.apache.derby.iapi.types.SQLBoolean;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
@@ -78,14 +79,7 @@
 			 Boolean.TRUE,
 			 ReuseFactory.getInteger(1));
 
-		if ( val == null )
-		{
-			setValue(getTypeServices().getNull() );
-		}
-		else
-		{
-			setValue(getDataValueFactory().getDataValue(val.booleanValue()));
-		}
+		setValue(new SQLBoolean(val));
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java?rev=774617&r1=774616&r2=774617&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java Thu May 14 02:36:02 2009
@@ -156,15 +156,15 @@
                 setValue( dvd);
 			else if (arg1 instanceof Date)
 			{
-				setValue(getDataValueFactory().getDataValue((Date) arg1));
+				setValue(new SQLDate((Date) arg1));
 			}
 			else if (arg1 instanceof Time)
 			{
-				setValue(getDataValueFactory().getDataValue((Time) arg1));
+				setValue(new SQLTime((Time) arg1));
 			}
 			else if (arg1 instanceof Timestamp)
 			{
-				setValue(getDataValueFactory().getDataValue((Timestamp) arg1));
+				setValue(new SQLTimestamp((Timestamp) arg1));
 			}
 
 			value = arg1;



Mime
View raw message