db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1467201 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/db/ impl/sql/conn/ impl/sql/execute/
Date Fri, 12 Apr 2013 08:22:16 GMT
Author: kahatlen
Date: Fri Apr 12 08:22:16 2013
New Revision: 1467201

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

- Reduce visibility of some classes, fields and constructors under
  impl/sql/execute

- Expose InternalTriggerExecutionContext.getAutoincrementValue()
  through the interface so that callers don't have to cast the
  context to the internal implementation type

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/TriggerExecutionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregateSortObserver.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java
    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/IndexSetChanger.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateConstantAction.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/iapi/db/TriggerExecutionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/TriggerExecutionContext.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/TriggerExecutionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/TriggerExecutionContext.java
Fri Apr 12 08:22:16 2013
@@ -189,4 +189,11 @@ public interface TriggerExecutionContext
 	 * completed
 	 */
 	public ResultSet getNewRow() throws SQLException;
+
+    /**
+     * Get the last auto-increment value for the specified column.
+     * @param identity the fully qualified name of the identity column
+     * @return the last auto-increment value, or {@code null} if not found
+     */
+    Long getAutoincrementValue(String identity);
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
Fri Apr 12 08:22:16 2013
@@ -25,7 +25,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.cache.CacheManager;
 
 import org.apache.derby.impl.sql.compile.CompilerContextImpl;
-import org.apache.derby.impl.sql.execute.InternalTriggerExecutionContext;
 import org.apache.derby.impl.sql.execute.AutoincrementCounter;
 import org.apache.derby.impl.sql.GenericPreparedStatement;
 import org.apache.derby.impl.sql.GenericStatement;
@@ -85,7 +84,6 @@ import org.apache.derby.iapi.reference.P
 import java.util.List;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.AbstractMap;
 import java.util.IdentityHashMap;
 import java.util.WeakHashMap;
 import java.util.Iterator;
@@ -3379,8 +3377,8 @@ public class GenericLanguageConnectionCo
         for (int i = size - 1; i >= 0; i--)
         {
             // first loop through triggers.
-            InternalTriggerExecutionContext itec = 
-                (InternalTriggerExecutionContext)triggerExecutionContexts.get(i);
+            TriggerExecutionContext itec =
+                (TriggerExecutionContext) triggerExecutionContexts.get(i);
             Long value = itec.getAutoincrementValue(aiKey);
             if (value == null)
                 continue;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregateSortObserver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregateSortObserver.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregateSortObserver.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregateSortObserver.java
Fri Apr 12 08:22:16 2013
@@ -31,11 +31,11 @@ import org.apache.derby.iapi.types.UserD
  * This sort observer performs aggregation.
  *
  */
-public class AggregateSortObserver extends BasicSortObserver
+class AggregateSortObserver extends BasicSortObserver
 {
 
-	protected GenericAggregator[]	aggsToProcess;
-	protected GenericAggregator[]	aggsToInitialize;
+    private final GenericAggregator[] aggsToProcess;
+    private final GenericAggregator[] aggsToInitialize;
 
 	private int firstAggregatorColumn;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java
Fri Apr 12 08:22:16 2013
@@ -22,15 +22,9 @@
 package org.apache.derby.impl.sql.execute;
 
 import org.apache.derby.iapi.services.io.FormatableBitSet;
-
-import org.apache.derby.iapi.services.io.Storable;
-
 import org.apache.derby.iapi.error.StandardException;
-
 import org.apache.derby.iapi.store.access.RowLocationRetRowSource;
-
 import org.apache.derby.iapi.types.DataValueDescriptor;
-
 import org.apache.derby.iapi.types.RowLocation;
 
 /**
@@ -41,7 +35,7 @@ import org.apache.derby.iapi.types.RowLo
  * the cardinality of all the leading columns.
  */
 
-public class CardinalityCounter implements RowLocationRetRowSource
+class CardinalityCounter implements RowLocationRetRowSource
 {
 	private RowLocationRetRowSource rowSource;
 	private DataValueDescriptor[] prevKey;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
Fri Apr 12 08:22:16 2013
@@ -53,15 +53,11 @@ import java.util.Enumeration;
  * it should be done based on whether the resultset has dependent resultsets or not.
  *
  */
-public class DeleteCascadeResultSet extends DeleteResultSet
+class DeleteCascadeResultSet extends DeleteResultSet
 {
 
-
-	public ResultSet[] dependentResultSets;
+    ResultSet[] dependentResultSets;
 	private int noDependents =0;
-	private CursorResultSet parentSource;
-	private FKInfo parentFKInfo;
-	private long fkIndexConglomNumber;
 	private String resultSetId;
 	private boolean mainNodeForTable = true;
 	private boolean affectedRows = false;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java
Fri Apr 12 08:22:16 2013
@@ -91,7 +91,7 @@ public class DeleteConstantAction extend
 	 *  @param numColumns	Number of columns to read.
 	 *  @param singleRowSource		Whether or not source is a single row source
 	 */
-	public	DeleteConstantAction(
+    DeleteConstantAction(
 								long				conglomId,
 								StaticCompiledOpenConglomInfo heapSCOCI,
 								IndexRowGenerator[]	irgs,

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=1467201&r1=1467200&r2=1467201&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 Apr
12 08:22:16 2013
@@ -21,21 +21,15 @@
 
 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.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;
 
-
 /**
 	Basic implementation of ExecIndexRow.
 
  */
-public class IndexRow extends ValueRow implements ExecIndexRow
+class IndexRow extends ValueRow implements ExecIndexRow
 {
 	///////////////////////////////////////////////////////////////////////
 	//

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?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- 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
Fri Apr 12 08:22:16 2013
@@ -43,7 +43,7 @@ import org.apache.derby.iapi.services.io
   Perform Index maintenace associated with DML operations for a table's
   indexes.
   */
-public class IndexSetChanger
+class IndexSetChanger
 {
 	//
 	//Index row generators.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java
Fri Apr 12 08:22:16 2013
@@ -120,7 +120,7 @@ public class InsertConstantAction extend
 	 *  @param autoincRowLocation Array of rowlocations of autoincrement values
 	 * 							  in SYSCOLUMNS for each ai column.
 	 */
-	public	InsertConstantAction(TableDescriptor tableDescriptor,
+    InsertConstantAction(TableDescriptor tableDescriptor,
 								long				conglomId,
 								StaticCompiledOpenConglomInfo heapSCOCI,
 								IndexRowGenerator[]	irgs,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
Fri Apr 12 08:22:16 2013
@@ -57,7 +57,8 @@ import org.apache.derby.iapi.types.DataV
  * were holding from when the trigger fired.
  *
  */
-public class InternalTriggerExecutionContext implements TriggerExecutionContext, ExecutionStmtValidator
+class InternalTriggerExecutionContext
+        implements TriggerExecutionContext, ExecutionStmtValidator
 {
 	/*
 	** Immutable
@@ -137,7 +138,7 @@ public class InternalTriggerExecutionCon
 	 *
 	 * @exception StandardException on error
 	 */
-	public InternalTriggerExecutionContext
+    InternalTriggerExecutionContext
 	(
 		LanguageConnectionContext	lcc,
 		ConnectionContext			cc,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java
Fri Apr 12 08:22:16 2013
@@ -61,7 +61,7 @@ public class UpdatableVTIConstantAction 
      * @param changedColumnIds Array of ids of changed columns
 	 *
 	 */
-	public	UpdatableVTIConstantAction( int statementType,
+    UpdatableVTIConstantAction(int statementType,
                                         boolean deferred,
                                         int[] changedColumnIds)
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateConstantAction.java?rev=1467201&r1=1467200&r2=1467201&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateConstantAction.java
Fri Apr 12 08:22:16 2013
@@ -98,7 +98,7 @@ public class UpdateConstantAction extend
 	 *  @param positionedUpdate	is this a positioned update
 	 *  @param singleRowSource		Whether or not source is a single row source
 	 */
-	public	UpdateConstantAction(
+    UpdateConstantAction(
 								long				conglomId,
 								StaticCompiledOpenConglomInfo heapSCOCI,
 								IndexRowGenerator[]	irgs,

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=1467201&r1=1467200&r2=1467201&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 Apr
12 08:22:16 2013
@@ -24,13 +24,12 @@ package org.apache.derby.impl.sql.execut
 import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.RowLocation;
 
 /**
 	Basic implementation of ExecRow.
 
  */
-public class ValueRow implements ExecRow
+class ValueRow implements ExecRow
 {
 	///////////////////////////////////////////////////////////////////////
 	//



Mime
View raw message