db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1481816 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/compile/ impl/sql/catalog/ impl/sql/compile/ impl/sql/execute/
Date Mon, 13 May 2013 12:18:20 GMT
Author: kahatlen
Date: Mon May 13 12:18:20 2013
New Revision: 1481816

URL: http://svn.apache.org/r1481816
Log:
DERBY-6169: Reduce visibility of classes and methods under impl/sql

Changes to prevent exposing package-private classes outside the
package via public or protected fields or methods:

- Reduce visibility to package or private if possible

- Remove the code if it's not actually used

- Use public interfaces rather than implementation classes in the
  method signatures if the methods have to be public

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.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/compile/BinaryRelationalOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RelationalOperator.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.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/RowTriggerExecutor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/StatementTriggerExecutor.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java Mon
May 13 12:18:20 2013
@@ -35,7 +35,7 @@ import java.util.Properties;
  * Optimizable provides services for optimizing a table in a query.
  */
 
-public interface Optimizable {
+public interface Optimizable extends Visitable {
 
 	/**
 	 * Choose the next access path to evaluate for this Optimizable.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java Mon
May 13 12:18:20 2013
@@ -28,39 +28,18 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.sql.dictionary.CatalogRowFactory;
 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
-import org.apache.derby.iapi.sql.dictionary.SPSDescriptor;
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
-import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
-import org.apache.derby.iapi.types.DataValueFactory;
-import org.apache.derby.iapi.types.RowLocation;
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.store.access.ConglomerateController;
 import org.apache.derby.iapi.store.access.TransactionController;
-import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;
-import org.apache.derby.iapi.store.access.ScanController;
-import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.sql.execute.ExecIndexRow;
 import org.apache.derby.iapi.services.io.StoredFormatIds;
 
-import org.apache.derby.iapi.services.io.FormatableBitSet;
-import org.apache.derby.iapi.services.info.ProductGenusNames;
 import org.apache.derby.iapi.services.info.ProductVersionHolder;
-import org.apache.derby.iapi.reference.JDBC30Translation;
-import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.util.IdUtil;
 
-import org.apache.derby.iapi.services.uuid.UUIDFactory;
-import org.apache.derby.catalog.UUID;
-import org.apache.derby.catalog.types.RoutineAliasInfo;
-import org.apache.derby.catalog.AliasInfo;
-import org.apache.derby.catalog.TypeDescriptor;
-import org.apache.derby.iapi.types.DataTypeDescriptor;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.sql.Types;
-import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Properties;
 
@@ -596,19 +575,6 @@ public	class DD_Version implements	Forma
 
 		bootingDictionary.clearCaches();
 	}
-	
-	/**
- 	 * Make a catalog.
-	 *	@param	tc	TransactionController
-	 *	@exception StandardException  Standard Derby error policy.
-	 */
-	protected void makeSystemCatalog(TransactionController tc,
-									 TabInfoImpl ti)
-		throws StandardException
-	{
-		SchemaDescriptor sd = bootingDictionary.getSystemSchemaDescriptor();
-		bootingDictionary.makeCatalog(ti,sd,tc);
-	}
 
 	/**
 	  Remove the description of a System table from the data dictionary.
@@ -655,71 +621,6 @@ public	class DD_Version implements	Forma
 		dropSystemCatalogDescription(tc,td);
 	}
 
-
-	/**
-	 * Populates a new system index from the base system table.
-	 *
-	 *	@param	tc						transaction controller
-	 *	@param	heapConglomerateNumber	identifies system table to Store
-	 *	@param	tabInfo					describes base system table
-	 *	@param	indexNumber				index to populate
-	 *
-	 *
-	 * @exception StandardException		Thrown on failure
-	 */
-	protected	void	fillIndex
-	(
-		TransactionController	tc,
-		long					heapConglomerateNumber,
-		TabInfoImpl					tabInfo,
-		int						indexNumber
-    )
-		throws StandardException
-	{
-		long						indexConglomerateNumber = tabInfo.getIndexConglomerate( indexNumber );
-		IndexRowGenerator			indexRowGenerator = tabInfo.getIndexRowGenerator( indexNumber );
-		CatalogRowFactory			rowFactory = tabInfo.getCatalogRowFactory();
-		ExecRow						heapRow = rowFactory.makeEmptyRow();
-		ExecIndexRow				indexableRow = indexRowGenerator.getIndexRowTemplate();
-
-		ScanController				heapScan =
-			tc.openScan(
-				heapConglomerateNumber,       // conglomerate to open
-				false,                          // don't hold open across commit
-				0,                              // for read
-                TransactionController.MODE_TABLE,
-                TransactionController.ISOLATION_REPEATABLE_READ,
-				(FormatableBitSet) null,                 // all fields as objects
-				null,                           // start position - first row
-				ScanController.GE,              // startSearchOperation
-				null,                           //scanQualifier,
-				null,                           //stop position-through last row
-				ScanController.GT);             // stopSearchOperation
-
-		RowLocation					heapLocation = 
-            heapScan.newRowLocationTemplate();
-
-		ConglomerateController		indexController = 
-			tc.openConglomerate( 
-				indexConglomerateNumber, 
-                false,
-				TransactionController.OPENMODE_FORUPDATE,
-				TransactionController.MODE_TABLE,
-				TransactionController.ISOLATION_REPEATABLE_READ);
-
-		while ( heapScan.fetchNext(heapRow.getRowArray()) )
-        {
- 			heapScan.fetchLocation( heapLocation );
-
-			indexRowGenerator.getIndexRow( heapRow, heapLocation, indexableRow, (FormatableBitSet)
null );
-
-			indexController.insert(indexableRow.getRowArray());
-		}
-
-		indexController.close();
-		heapScan.close();
-	}
-
 	////////////////////////////////////////////////////////////////////////
 	//
 	//	FORMATABLE 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=1481816&r1=1481815&r2=1481816&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
Mon May 13 12:18:20 2013
@@ -185,7 +185,7 @@ import org.apache.derby.impl.sql.execute
 
 /**
  * Standard database implementation of the data dictionary
- * that stores the information in the system catlogs.
+ * that stores the information in the system catalogs.
  */
 public final class	DataDictionaryImpl
 	implements DataDictionary, CacheableFactory, ModuleControl, ModuleSupportable,java.security.PrivilegedAction
@@ -838,7 +838,7 @@ public final class	DataDictionaryImpl
                         false);
 			} else {
 				// Get the ids for non-core tables
-				loadDictionaryTables(bootingTC, ddg, startParams);
+                loadDictionaryTables(bootingTC, startParams);
 
                 // See if index stats update is disabled by a database prop.
                 String dbIndexStatsUpdateAuto =
@@ -4134,7 +4134,7 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public SPSDescriptor getUncachedSPSDescriptor(TableKey stmtKey)
+    SPSDescriptor getUncachedSPSDescriptor(TableKey stmtKey)
 				throws StandardException
 	{
 		return getSPSDescriptorIndex1Scan(stmtKey.getTableName(), 
@@ -7983,17 +7983,15 @@ public final class	DataDictionaryImpl
 	 *
 	 *
 	 *	@param	tc		TransactionController
-	 *	@param	ddg		DataDescriptorGenerator
 	 *
 	 * 	@exception StandardException		Thrown on error
 	 */
-	protected void loadDictionaryTables(TransactionController tc,
-										DataDescriptorGenerator ddg,
+    private void loadDictionaryTables(TransactionController tc,
 										Properties startParams)
 		throws StandardException
 	{        
 		// load the core catalogs first
-		loadCatalogs(ddg, coreInfo);
+        loadCatalogs(coreInfo);
 
 		dictionaryVersion = (DD_Version)tc.getProperty(
 											DataDictionary.CORE_DATA_DICTIONARY_VERSION);
@@ -8035,12 +8033,9 @@ public final class	DataDictionaryImpl
 	/**
 	 * Initialize indices for an array of catalogs
 	 *
-	 *	@param	ddg		DataDescriptorGenerator
-	 *
-	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public void loadCatalogs(DataDescriptorGenerator ddg, TabInfoImpl[] catalogArray)
+    private void loadCatalogs(TabInfoImpl[] catalogArray)
 		throws StandardException
 	{
 		int			ictr;
@@ -8058,13 +8053,10 @@ public final class	DataDictionaryImpl
 
 			numIndexes = catalog.getNumberOfIndexes();
 
-			if (numIndexes > 0)
-			{
-				for (indexCtr = 0; indexCtr < numIndexes; indexCtr++)
-				{
-					initSystemIndexVariables(ddg, catalog, indexCtr);	
-				}
-			}
+            for (indexCtr = 0; indexCtr < numIndexes; indexCtr++)
+            {
+                initSystemIndexVariables(catalog, indexCtr);
+            }
 		}
 
 	}
@@ -8416,7 +8408,7 @@ public final class	DataDictionaryImpl
 	 *
 	 *	@exception StandardException Standard Derby error policy
 	 */
-	public	void	makeCatalog( TabInfoImpl					ti,
+    private void    makeCatalog( TabInfoImpl                ti,
 								 SchemaDescriptor			sd,
 								 TransactionController 		tc )
 					throws StandardException
@@ -8608,44 +8600,6 @@ public final class	DataDictionaryImpl
 
 	}
 
-
-	/**
-	  *	Code to add an index to a catalog during upgrade.
-	  *
-	  *	@param	tc						transaction controller
-	  *	@param	ti						information on the catalog that's having a new index added
-	  *	@param	indexNumber				0-based index number
-	  *	@param	heapConglomerateNumber	what it is
-	  *
-	  * @return The conglomerate number of the new index.
-	  *
-	  * @exception StandardException		Thrown on failure
-	  */
-	public	long	upgrade_makeOneIndex
-	(
-		TransactionController	tc,
-		TabInfoImpl					ti,
-		int						indexNumber,
-		long					heapConglomerateNumber
-    )
-		throws StandardException
-	{
-		SchemaDescriptor		sd = getSystemSchemaDescriptor( );
-		DataDescriptorGenerator ddg = getDataDescriptorGenerator();
-		long					indexConglomerateNumber;
-
-		ConglomerateDescriptor	conglomerateDescriptor = bootstrapOneIndex
-			( sd, tc, ddg, ti, indexNumber, heapConglomerateNumber );
-
-		indexConglomerateNumber = conglomerateDescriptor.getConglomerateNumber();
-
-		addDescriptor(conglomerateDescriptor, sd, 
-					  SYSCONGLOMERATES_CATALOG_NUM, false, tc);
-					  
-		return indexConglomerateNumber;
-	}	  
-
-
 	/**
 	 * Get the UUID for the specified system table.  Prior
 	 * to Plato, system tables did not have canonical UUIDs, so
@@ -8984,7 +8938,7 @@ public final class	DataDictionaryImpl
 		IndexRowGenerator			irg;
 		ConglomerateDescriptor	conglomerateDescriptor;
 
-		initSystemIndexVariables(ddg, ti, indexNumber);
+		initSystemIndexVariables(ti, indexNumber);
 
 		irg = ti.getIndexRowGenerator(indexNumber);
 
@@ -9057,9 +9011,7 @@ public final class	DataDictionaryImpl
 		return conglomerateDescriptor;
 	}
 
-	public void initSystemIndexVariables(DataDescriptorGenerator ddg,
-										   TabInfoImpl ti,
-										   int indexNumber)
+    private void initSystemIndexVariables(TabInfoImpl ti, int indexNumber)
 		throws StandardException
 	{
 		int					numCols = ti.getIndexColumnCount(indexNumber);
@@ -9975,15 +9927,10 @@ public final class	DataDictionaryImpl
 	{
 		int numIndexes = ti.getNumberOfIndexes();
 
-		if (numIndexes > 0)
-		{
-			DataDescriptorGenerator ddg = getDataDescriptorGenerator();
-
-			for (int indexCtr = 0; indexCtr < numIndexes; indexCtr++)
-			{
-				initSystemIndexVariables(ddg, ti, indexCtr);	
-			}
-		}
+        for (int indexCtr = 0; indexCtr < numIndexes; indexCtr++)
+        {
+            initSystemIndexVariables(ti, indexCtr);
+        }
 	}
 
 	// Expected to be called only during boot time, so no synchronization.
@@ -10000,7 +9947,7 @@ public final class	DataDictionaryImpl
 	  *
 	  * @exception StandardException		Thrown on error
 	  */
-	public	void	faultInTabInfo( TabInfoImpl ti )
+    private void faultInTabInfo(TabInfoImpl ti)
 		throws StandardException
 	{
 		int		numIndexes;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
Mon May 13 12:18:20 2013
@@ -25,8 +25,6 @@ import org.apache.derby.iapi.reference.C
 
 import org.apache.derby.iapi.util.JBitSet;
 
-import org.apache.derby.iapi.services.loader.GeneratedMethod;
-
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -34,21 +32,18 @@ import org.apache.derby.iapi.services.sa
 import org.apache.derby.iapi.error.StandardException;
 
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
+import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;
 import org.apache.derby.iapi.sql.compile.Optimizable;
 
 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;
 
-import org.apache.derby.iapi.store.access.Qualifier;
 import org.apache.derby.iapi.store.access.ScanController;
 
-import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
 import org.apache.derby.iapi.types.Orderable;
 
-import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
-
 import java.sql.Types;
 
 /**
@@ -330,7 +325,7 @@ public class BinaryRelationalOperatorNod
 	public ValueNode getExpressionOperand(
 								int tableNumber,
 								int columnPosition,
-								FromTable ft)
+								Optimizable ft)
 	{
 		ColumnReference	cr;
 		boolean walkSubtree = true;
@@ -487,11 +482,11 @@ public class BinaryRelationalOperatorNod
 	public void generateExpressionOperand(
 								Optimizable optTable,
 								int columnPosition,
-								ExpressionClassBuilder acb,
+								ExpressionClassBuilderInterface acbi,
 								MethodBuilder mb)
 						throws StandardException
 	{
-		ColumnReference	cr;
+        ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;
 		FromBaseTable	ft;
 
 		if (SanityManager.DEBUG)
@@ -782,11 +777,13 @@ public class BinaryRelationalOperatorNod
 	/**
 	 * @exception StandardException		Thrown on error
 	 */
-	public void generateQualMethod(ExpressionClassBuilder acb,
+    public void generateQualMethod(ExpressionClassBuilderInterface acbi,
 								   MethodBuilder mb,
 								   Optimizable optTable)
 						throws StandardException
 	{
+        ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;
+
 		/* Generate a method that returns the expression */
 		MethodBuilder qualMethod = acb.newUserExprFun();
 
@@ -1734,7 +1731,7 @@ public class BinaryRelationalOperatorNod
 	 *  otherwise.
 	 */
 	private boolean valNodeReferencesOptTable(ValueNode valNode,
-		FromTable optTable, boolean forPush, boolean walkOptTableSubtree)
+        Optimizable optTable, boolean forPush, boolean walkOptTableSubtree)
 	{
 		// Following call will initialize/reset the btnVis,
 		// valNodeBaseTables, and optBaseTables fields of this object.
@@ -1822,7 +1819,7 @@ public class BinaryRelationalOperatorNod
 	 * @param forPush Whether or not we are searching with the intent
 	 *  to push this operator to the target table.
 	 */
-	private void buildTableNumList(FromTable ft, boolean forPush)
+    private void buildTableNumList(Optimizable ft, boolean forPush)
 		throws StandardException
 	{
 		// Start with the target table's own table number.  Note

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RelationalOperator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RelationalOperator.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RelationalOperator.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RelationalOperator.java
Mon May 13 12:18:20 2013
@@ -25,20 +25,19 @@ import org.apache.derby.iapi.services.co
 
 import org.apache.derby.iapi.error.StandardException;
 
+import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;
 import org.apache.derby.iapi.sql.compile.Optimizable;
 
 import org.apache.derby.iapi.store.access.TransactionController;
 
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
-import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
-
 /**
  * This interface is an abstraction of a relational operator.  It was created
  * for optimization, to allow binary comparison operators and IS NULL to
  * be treated the same.
  */
-public interface RelationalOperator
+interface RelationalOperator
 {
 	public final int EQUALS_RELOP = 1;
 	public final int NOT_EQUALS_RELOP = 2;
@@ -111,7 +110,7 @@ public interface RelationalOperator
 	 */
 	ValueNode getExpressionOperand(int tableNumber,
 									int columnPosition,
-									FromTable ft);
+									Optimizable ft);
 
 	/**
 	 * Check whether this RelationalOperator is a comparison of the given
@@ -128,7 +127,7 @@ public interface RelationalOperator
 	 */
 	void generateExpressionOperand(Optimizable optTable,
 										int columnPosition,
-										ExpressionClassBuilder acb,
+										ExpressionClassBuilderInterface acb,
 										MethodBuilder mb)
 						throws StandardException;
 
@@ -248,7 +247,7 @@ public interface RelationalOperator
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	void generateQualMethod(ExpressionClassBuilder acb,
+    void generateQualMethod(ExpressionClassBuilderInterface acb,
 								MethodBuilder mb,
 								Optimizable optTable)
 						throws StandardException;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
Mon May 13 12:18:20 2013
@@ -22,6 +22,7 @@
 package	org.apache.derby.impl.sql.compile;
 
 import java.util.List;
+import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;
 import org.apache.derby.iapi.sql.compile.Optimizable;
 
 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;
@@ -268,7 +269,7 @@ public abstract class UnaryComparisonOpe
 	 */
 	public ValueNode getExpressionOperand(int tableNumber,
 										  int columnNumber,
-										  FromTable ft)
+										  Optimizable ft)
 	{
 		return null;
 	}
@@ -278,12 +279,13 @@ public abstract class UnaryComparisonOpe
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public void generateExpressionOperand(Optimizable optTable,
-												int columnPosition,
-												ExpressionClassBuilder acb,
-												MethodBuilder mb)
+    public void generateExpressionOperand(Optimizable optTable,
+                                          int columnPosition,
+                                          ExpressionClassBuilderInterface acbi,
+                                          MethodBuilder mb)
 						throws StandardException
 	{
+        ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;
 		acb.generateNull(mb, operand.getTypeCompiler(), 
 				operand.getTypeServices().getCollationType());
 	}
@@ -325,11 +327,12 @@ public abstract class UnaryComparisonOpe
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public void generateQualMethod(ExpressionClassBuilder acb,
+    public void generateQualMethod(ExpressionClassBuilderInterface acbi,
 										MethodBuilder mb,
 										Optimizable optTable)
 						throws StandardException
 	{
+        ExpressionClassBuilder acb = (ExpressionClassBuilder) acbi;
 		MethodBuilder qualMethod = acb.newUserExprFun();
 
 		/* Generate a method that returns that expression */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java
Mon May 13 12:18:20 2013
@@ -240,7 +240,7 @@ public class GenericConstantActionFactor
      * @param conglomerateUUID	ID of conglomerate
      * @param properties	The optional properties list associated with the index.
      */
-	public	CreateIndexConstantAction	getCreateIndexConstantAction
+    public IndexConstantAction getCreateIndexConstantAction
 	(
         boolean forCreateTable,
 		boolean			unique,
@@ -565,7 +565,7 @@ public class GenericConstantActionFactor
 	 *  @param  tableConglomerateId	heap conglomerate ID for table
 	 *
 	 */
-	public	DropIndexConstantAction	getDropIndexConstantAction
+    public IndexConstantAction getDropIndexConstantAction
 	(
 		String				fullIndexName,
 		String				indexName,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java
Mon May 13 12:18:20 2013
@@ -307,7 +307,7 @@ public class GenericExecutionFactory
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public InternalTriggerExecutionContext getTriggerExecutionContext
+    InternalTriggerExecutionContext getTriggerExecutionContext
 	(
 		LanguageConnectionContext	lcc,
 		ConnectionContext			cc,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
Mon May 13 12:18:20 2013
@@ -38,12 +38,12 @@ import org.apache.derby.iapi.reference.S
  * a trigger.  It is subclassed by row and statement
  * executors.
  */
-public abstract class GenericTriggerExecutor
+abstract class GenericTriggerExecutor
 {
-	protected InternalTriggerExecutionContext	tec;
-	protected TriggerDescriptor					triggerd;
-	protected Activation						activation;
-	protected LanguageConnectionContext			lcc;
+    final InternalTriggerExecutionContext   tec;
+    final TriggerDescriptor                 triggerd;
+    final Activation                        activation;
+    private final LanguageConnectionContext lcc;
 
 	private	boolean			whenClauseRetrieved;
 	private	boolean			actionRetrieved;

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?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- 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 Mon
May 13 12:18:20 2013
@@ -50,9 +50,9 @@ import org.apache.derby.iapi.types.DataV
 import org.apache.derby.iapi.types.RowLocation;
 
 /**
-  Perform Index maintenace associated with DML operations for a single index.
+  Perform Index maintenance associated with DML operations for a single index.
   */
-public class IndexChanger
+class IndexChanger
 {
 	private IndexRowGenerator irg;
 	//Index Conglomerate ID
@@ -84,8 +84,8 @@ public class IndexChanger
 
 	  @param irg the IndexRowGenerator for the index.
 	  @param indexCID the conglomerate id for the index.
-	  @param indexSCOCI the SCOCI for the idexes. 
-	  @param indexDCOCI the DCOCI for the idexes. 
+	  @param indexSCOCI the SCOCI for the indexes.
+	  @param indexDCOCI the DCOCI for the indexes.
 	  @param baseCC the ConglomerateController for the base table.
 	  @param tc			The TransactionController
 	  @param lockMode	The lock mode (granularity) to use
@@ -95,7 +95,7 @@ public class IndexChanger
 
 	  @exception StandardException		Thrown on error
 	  */
-	public IndexChanger
+    IndexChanger
 	(
 		IndexRowGenerator 		irg,
 		long 					indexCID,
@@ -148,7 +148,7 @@ public class IndexChanger
 	 *
 	 * @param rowHolder	the row holder
 	 */
-	public void setRowHolder(TemporaryRowHolderImpl rowHolder)
+    void setRowHolder(TemporaryRowHolderImpl rowHolder)
 	{
 		this.rowHolder = rowHolder;
 		rowHolderPassedIn = (rowHolder != null);
@@ -160,7 +160,7 @@ public class IndexChanger
 	 *
 	 * @param baseCC	The heap's ConglomerateController.
 	 */
-	public void setBaseCC(ConglomerateController baseCC)
+    void setBaseCC(ConglomerateController baseCC)
 	{
 		this.baseCC = baseCC;
 	}
@@ -524,7 +524,7 @@ public class IndexChanger
 
 	  @exception StandardException		Thrown on error
 	  */
-	public void open()
+    void open()
 		 throws StandardException
 	{
 	}
@@ -536,8 +536,7 @@ public class IndexChanger
 	  @param baseRowLocation the base table row's location.
 	  @exception StandardException		Thrown on error
 	  */
-	public void delete(ExecRow baseRow,
-					   RowLocation baseRowLocation)
+    void delete(ExecRow baseRow, RowLocation baseRowLocation)
 		 throws StandardException
 	{
 		setOurIndexRow(baseRow, baseRowLocation);
@@ -554,7 +553,7 @@ public class IndexChanger
 
 	  @exception StandardException		Thrown on error
 	  */
-	public void update(ExecRow oldBaseRow,
+    void update(ExecRow oldBaseRow,
 					   ExecRow newBaseRow,
 					   RowLocation baseRowLocation
 					   )
@@ -583,7 +582,7 @@ public class IndexChanger
 
 	  @exception StandardException		Thrown on error
 	  */
-	public void insert(ExecRow newRow, RowLocation baseRowLocation)
+    void insert(ExecRow newRow, RowLocation baseRowLocation)
 		 throws StandardException
 	{
 		setOurIndexRow(newRow, baseRowLocation);
@@ -625,8 +624,7 @@ public class IndexChanger
 
 	  @exception StandardException		Thrown on error
 	 */
-	public void finish()
-		throws StandardException
+    void finish() throws StandardException
 	{
 		ExecRow			deferredRow;
 
@@ -672,8 +670,7 @@ public class IndexChanger
 
 	  @exception StandardException		Thrown on error
 	  */
-	public void close()
-		throws StandardException
+    void close() throws StandardException
 	{
 		closeIndexCC();
 		closeIndexSC();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowTriggerExecutor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowTriggerExecutor.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowTriggerExecutor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowTriggerExecutor.java
Mon May 13 12:18:20 2013
@@ -23,7 +23,6 @@ package org.apache.derby.impl.sql.execut
 
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.sql.dictionary.SPSDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TriggerDescriptor;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
 import org.apache.derby.iapi.sql.Activation;
@@ -33,7 +32,7 @@ import org.apache.derby.iapi.sql.Activat
  * a row trigger.  It is instantiated at execution time.
  * There is one per row trigger.
  */
-public class RowTriggerExecutor extends GenericTriggerExecutor
+class RowTriggerExecutor extends GenericTriggerExecutor
 {
 	/**
 	 * Constructor

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/StatementTriggerExecutor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/StatementTriggerExecutor.java?rev=1481816&r1=1481815&r2=1481816&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/StatementTriggerExecutor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/StatementTriggerExecutor.java
Mon May 13 12:18:20 2013
@@ -33,7 +33,7 @@ import org.apache.derby.iapi.sql.Activat
  * a statement trigger.  It is instantiated at execution
  * time.  There is one per statement trigger.
  */
-public class StatementTriggerExecutor extends GenericTriggerExecutor
+class StatementTriggerExecutor extends GenericTriggerExecutor
 {
 	/**
 	 * Constructor



Mime
View raw message