db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r571568 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute: IndexRow.java ValueRow.java
Date Fri, 31 Aug 2007 20:39:46 GMT
Author: djd
Date: Fri Aug 31 13:39:45 2007
New Revision: 571568

URL: http://svn.apache.org/viewvc?rev=571568&view=rev
Log:
Remove dead code from ValueRow and IndexRow that supported formattable

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRow.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ValueRow.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRow.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRow.java?rev=571568&r1=571567&r2=571568&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRow.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRow.java Fri Aug
31 13:39:45 2007
@@ -37,20 +37,6 @@
  */
 public class IndexRow extends ValueRow implements ExecIndexRow
 {
-	/********************************************************
-	**
-	**	This class implements Formatable. That means that it
-	**	can write itself to and from a formatted stream. If
-	**	you add more fields to this class, make sure that you
-	**	also write/read them with the writeExternal()/readExternal()
-	**	methods.
-	**
-	**	If, inbetween releases, you add more fields to this class,
-	**	then you should bump the version number emitted by the getTypeFormatId()
-	**	method.
-	**
-	********************************************************/
-
 	///////////////////////////////////////////////////////////////////////
 	//
 	//	STATE
@@ -66,12 +52,6 @@
 	//
 	///////////////////////////////////////////////////////////////////////
 
-	/**
-	 * Public niladic constructor. Needed for Formatable interface to work.
-	 *
-	 */
-    public	IndexRow() {}
-
 	IndexRow(int ncols) {
 		 super(ncols);
 		 orderedNulls = new boolean[ncols];	/* Initializes elements to false */
@@ -103,54 +83,6 @@
 				"execRowToExecIndexRow() not expected to be called for IndexRow");
 		}
 	}
-
-	///////////////////////////////////////////////////////////////////////
-	//
-	//	FORMATABLE INTERFACE
-	//
-	///////////////////////////////////////////////////////////////////////
-
-	/**
-	 * Read this object from a stream of stored objects.
-	 *
-	 * @param in read this.
-	 *
-	 * @exception IOException					thrown on error
-	 * @exception ClassNotFoundException		thrown on error
-	 */
-	public void readExternal( ObjectInput in )
-		 throws IOException, ClassNotFoundException
-	{
-		super.readExternal( in );
-
-		int colCount = nColumns();
-
-		orderedNulls = new boolean[ colCount ];
-		for ( int ictr = 0; ictr < colCount; ictr++ ) { orderedNulls[ ictr ] = in.readBoolean();
}
-	}
-
-	/**
-	 * Write this object to a stream of stored objects.
-	 *
-	 * @param out write bytes here.
-	 *
-	 * @exception IOException		thrown on error
-	 */
-	public void writeExternal( ObjectOutput out )
-		 throws IOException
-	{
-		super.writeExternal( out );
-		int colCount = nColumns();
-
-		for ( int ictr = 0; ictr < colCount; ictr++ ) { out.writeBoolean( orderedNulls[ ictr
] ); }
-	}
-
-	/**
-	 * Get the formatID which corresponds to this class.
-	 *
-	 *	@return	the formatID of this class
-	 */
-	public	int	getTypeFormatId()	{ return StoredFormatIds.INDEX_ROW_V01_ID; }
 
 	ExecRow cloneMe() {
 		return new IndexRow(nColumns());

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ValueRow.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ValueRow.java?rev=571568&r1=571567&r2=571568&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ValueRow.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ValueRow.java Fri Aug
31 13:39:45 2007
@@ -21,15 +21,7 @@
 
 package org.apache.derby.impl.sql.execute;
 
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-import org.apache.derby.iapi.services.io.ArrayUtil;
-import org.apache.derby.iapi.services.io.Formatable;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
-import org.apache.derby.iapi.services.io.Storable;
-import org.apache.derby.iapi.services.io.StoredFormatIds;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.RowLocation;
@@ -38,22 +30,8 @@
 	Basic implementation of ExecRow.
 
  */
-public class ValueRow implements ExecRow, Formatable
+public class ValueRow implements ExecRow
 {
-	/********************************************************
-	**
-	**	This class implements Formatable. That means that it
-	**	can write itself to and from a formatted stream. If
-	**	you add more fields to this class, make sure that you
-	**	also write/read them with the writeExternal()/readExternal()
-	**	methods.
-	**
-	**	If, inbetween releases, you add more fields to this class,
-	**	then you should bump the version number emitted by the getTypeFormatId()
-	**	method.
-	**
-	********************************************************/
-
 	///////////////////////////////////////////////////////////////////////
 	//
 	//	STATE
@@ -69,11 +47,6 @@
 	//
 	///////////////////////////////////////////////////////////////////////
 
-	/**
-	 * Public niladic constructor. Needed for Formatable interface to work.
-	 *
-	 */
-    public	ValueRow() {}
 
 	/**
 	  *	Make a value row with a designated number of column slots.
@@ -110,7 +83,7 @@
 	// position is 1-based
 	public DataValueDescriptor	getColumn (int position) {
 		if (position <= column.length)
-			return (DataValueDescriptor) (column[position-1]);
+			return column[position-1];
 		else
 			return (DataValueDescriptor)null;
 	}
@@ -283,48 +256,4 @@
 		System.arraycopy(column, 0, newcol, 0, column.length);
 		column = newcol;
 	}
-
-	///////////////////////////////////////////////////////////////////////
-	//
-	//	FORMATABLE INTERFACE
-	//
-	///////////////////////////////////////////////////////////////////////
-
-	/**
-	 * Read this object from a stream of stored objects.
-	 *
-	 * @param in read this.
-	 *
-	 * @exception IOException					thrown on error
-	 * @exception ClassNotFoundException		thrown on error
-	 */
-	public void readExternal( ObjectInput in )
-		 throws IOException, ClassNotFoundException
-	{
-		column = new DataValueDescriptor[ArrayUtil.readArrayLength(in)];
-		ArrayUtil.readArrayItems(in, column);
-		ncols = column.length;
-	}
-
-	/**
-	 * Write this object to a stream of stored objects.
-	 *
-	 * @param out write bytes here.
-	 *
-	 * @exception IOException		thrown on error
-	 */
-	public void writeExternal( ObjectOutput out )
-		 throws IOException
-	{
-		ArrayUtil.writeArrayLength(out, column);
-		ArrayUtil.writeArrayItems(out, column);
-	}
-
-	/**
-	 * Get the formatID which corresponds to this class.
-	 *
-	 *	@return	the formatID of this class
-	 */
-	public	int getTypeFormatId()	{ return StoredFormatIds.VALUE_ROW_V01_ID; }
-
 }



Mime
View raw message