db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r565966 - in /db/derby/code/trunk/java/engine/org/apache/derby: catalog/types/ iapi/sql/dictionary/ impl/sql/execute/
Date Tue, 14 Aug 2007 23:23:26 GMT
Author: djd
Date: Tue Aug 14 16:23:24 2007
New Revision: 565966

URL: http://svn.apache.org/viewvc?view=rev&rev=565966
Log:
Minor code cleanup, removing some unused methods/fields.
Making activation private final in some classes.
Related to DERBY-2661

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/IndexDescriptorImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/IndexRowGenerator.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexSetChanger.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowChangerImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/IndexDescriptorImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/IndexDescriptorImpl.java?view=diff&rev=565966&r1=565965&r2=565966
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/IndexDescriptorImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/IndexDescriptorImpl.java
Tue Aug 14 16:23:24 2007
@@ -185,9 +185,6 @@
 
 	public String toString()
 	{
-		String	uniqueness;
-		String	cols;
-
 		StringBuffer	sb = new StringBuffer(60);
 
 		if (isUnique)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/IndexRowGenerator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/IndexRowGenerator.java?view=diff&rev=565966&r1=565965&r2=565966
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/IndexRowGenerator.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/IndexRowGenerator.java
Tue Aug 14 16:23:24 2007
@@ -21,44 +21,32 @@
 
 package org.apache.derby.iapi.sql.dictionary;
 
-import org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList;
-
-import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 
-import org.apache.derby.iapi.sql.execute.ExecutionContext;
+import org.apache.derby.catalog.IndexDescriptor;
+import org.apache.derby.catalog.types.IndexDescriptorImpl;
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.services.context.ContextService;
+import org.apache.derby.iapi.services.io.Formatable;
+import org.apache.derby.iapi.services.io.FormatableBitSet;
+import org.apache.derby.iapi.services.io.StoredFormatIds;
+import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.execute.ExecIndexRow;
 import org.apache.derby.iapi.sql.execute.ExecRow;
+import org.apache.derby.iapi.sql.execute.ExecutionContext;
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
-
-import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.RowLocation;
 import org.apache.derby.iapi.types.StringDataValue;
 
-import org.apache.derby.iapi.services.io.Formatable;
-import org.apache.derby.iapi.services.io.FormatIdUtil;
-import org.apache.derby.iapi.services.io.StoredFormatIds;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import org.apache.derby.iapi.services.context.ContextService;
-
-import org.apache.derby.iapi.error.StandardException;
-
-import org.apache.derby.catalog.IndexDescriptor;
-import org.apache.derby.catalog.types.IndexDescriptorImpl;
-
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.IOException;
-import org.apache.derby.iapi.services.io.FormatableBitSet;
-
 /**
  * This class extends IndexDescriptor for internal use by the
  * DataDictionary.
  */
 public class IndexRowGenerator implements IndexDescriptor, Formatable
 {
-	IndexDescriptor	id;
+	private IndexDescriptor	id;
 	private ExecutionFactory ef;
 
 	/**
@@ -190,58 +178,6 @@
 
 		/* Set the row location in the last column of the index row */
 		indexRow.setColumn(colCount + 1, rowLocation);
-	}
-
-	/**
-	 * Get a NULL Index Row for this index. This is useful to create objects 
-	 * that need to be passed to ScanController.
-	 *
-	 * @param columnList ColumnDescriptors describing the base table.
-	 * @param rowLocation	empty row location.
-	 *
-	 * @exception StandardException thrown on error.
-	 */
-	public ExecIndexRow getNullIndexRow(ColumnDescriptorList columnList,
-										RowLocation rowLocation)
-				throws StandardException				
-	{
-		int[] baseColumnPositions = id.baseColumnPositions();
-		int i;
-		ExecIndexRow indexRow = getIndexRowTemplate();
-
-		for (i = 0; i < baseColumnPositions.length; i++)
-		{
-			DataTypeDescriptor dtd =
-				columnList.elementAt(baseColumnPositions[i] - 1).getType();
-			indexRow.setColumn(i + 1, dtd.getNull());
-		}
-
-		indexRow.setColumn(i + 1, rowLocation);
-		return indexRow;
-	}
-
-	/**
-	 * Return true iff a change to a set of columns changes the index for this
-	 * IndexRowGenerator.
-	 *
-	 * @param changedColumnIds - holds the 1 based column ids for the changed
-	 *		columns.
-	 * @return	true iff a change to one of the columns in changedColumnIds
-	 *          effects this index. 
-	 */
-	public boolean indexChanged(int[] changedColumnIds)
-	{
-		int[] baseColumnPositions = id.baseColumnPositions();
-
-		for (int ix = 0; ix < changedColumnIds.length; ix++)
-		{
-			for (int iy = 0; iy < baseColumnPositions.length; iy++)
-			{
-				if (changedColumnIds[ix] == baseColumnPositions[iy])
-					return true;
-			}
-		}
-		return false;
 	}
 
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java?view=diff&rev=565966&r1=565965&r2=565966
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java Tue
Aug 14 16:23:24 2007
@@ -68,8 +68,6 @@
 	private ConglomerateController indexCC = null;
 	private ScanController indexSC = null;
 
-	private LanguageConnectionContext lcc;
-
 	//
 	//Index rows used by this module to perform DML.
 	private ExecIndexRow ourIndexRow = null;
@@ -78,7 +76,7 @@
 	private TemporaryRowHolderImpl	rowHolder = null;
 	private boolean					rowHolderPassedIn;
 	private int						isolationLevel;
-	private Activation				activation;
+	private final Activation				activation;
 	private boolean					ownIndexSC = true;
 
 	/**
@@ -226,19 +224,6 @@
 			}
 		}
 		return false;
-	}
-
-	private ExecIndexRow getDeferredIndexRowTemplate(ExecRow baseRow,
-													RowLocation baseRowLoc)
-		 throws StandardException
-	{
-		ExecIndexRow	template;
-
-		template = irg.getIndexRowTemplate();
-
-		irg.getIndexRow(baseRow, baseRowLoc, template, baseRowReadMap);
-
-		return template;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexSetChanger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexSetChanger.java?view=diff&rev=565966&r1=565965&r2=565966
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexSetChanger.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexSetChanger.java
Tue Aug 14 16:23:24 2007
@@ -88,7 +88,7 @@
 	private int whatIsOpen = NO_INDEXES;
 
 	private int isolationLevel;
-	private Activation activation;
+	private final Activation activation;
 
 	/**
 	  Create a new IndexSetChanger

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowChangerImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowChangerImpl.java?view=diff&rev=565966&r1=565965&r2=565966
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowChangerImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowChangerImpl.java
Tue Aug 14 16:23:24 2007
@@ -66,7 +66,7 @@
 	DynamicCompiledOpenConglomInfo[] indexDCOCIs;
 	StaticCompiledOpenConglomInfo[] indexSCOCIs;
 	IndexRowGenerator[] irgs = null;
-	Activation		activation;
+	private final Activation		activation;
 	TransactionController	tc;
 	FormatableBitSet 	changedColumnBitSet;	
 	FormatableBitSet 	baseRowReadList;	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java?view=diff&rev=565966&r1=565965&r2=565966
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java
Tue Aug 14 16:23:24 2007
@@ -32,7 +32,6 @@
 import org.apache.derby.iapi.sql.Row;
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
 import org.apache.derby.iapi.sql.execute.TargetResultSet;
 import org.apache.derby.iapi.store.access.ConglomerateController;
@@ -59,7 +58,6 @@
 	private boolean 				finished;
 	private ExecRow					currentRow;
 	private ResultDescription		resultDescription;
-	private ExecutionFactory		ef;
 	private boolean                 isAppendable = false;
 	private long                    positionIndexConglomId;
 	private boolean 				isVirtualMemHeap;



Mime
View raw message