db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r511367 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/execute/ impl/sql/execute/
Date Sat, 24 Feb 2007 22:46:47 GMT
Author: djd
Date: Sat Feb 24 14:46:46 2007
New Revision: 511367

URL: http://svn.apache.org/viewvc?view=rev&rev=511367
Log:
Cleanup of some of the ConstantAction classes including removing GenericConstantAction
which was basically an empty class since true constant actions are not formattable.
Added comments to WriteCursorConstantAction indicating how it is not really a ConstantAction
but just a set of constants, since its executeConstantAction() method is never called,
which is the only method on ConstantAction interface.

Removed:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantAction.java
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GrantRevokeConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LockTableConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetTransactionIsolationConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -33,7 +33,9 @@
  *	statements to describe what they should stuff into the catalogs.
  *	<p>
  *	An object satisfying this interface is put into the PreparedStatement
- *	and run at Execution time.
+ *	and run at Execution time. Thus ConstantActions may be shared
+ *  across threads and must not store connection/thread specific
+ *  information in any instance field.
  *
  *	@author Rick Hillegas
  */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -51,40 +51,8 @@
  *
  * @author jamie
  */
-public abstract class DDLConstantAction extends GenericConstantAction
+abstract class DDLConstantAction implements ConstantAction
 {
-	//TransactionController 		tc;
-	//protected LanguageConnectionContext 	lcc;
-	//DataDescriptorGenerator 	ddg;
-	//DataDictionary 				dd;
-	//DependencyManager			dm;
-
-	/**
-	 * Set up the "environment variables" for this
-	 * constant action.
-	 */
-	//protected void setEnvironmentVariables(Activation activation)
-	//{
-		/* find the language context.
-		 * NOTE: The activation could be null if
-		 * we are creating the SPSs for the metadata
-		 * queries in the background, so we get
-		 * the lcc from the ContextService.
-		 */
-		//lcc = (activation == null) ?
-		//		(LanguageConnectionContext)
-		//			ContextService.getContext(LanguageConnectionContext.CONTEXT_ID):
-		//		activation.getLanguageConnectionContext();
-
-
-        // Get the current transaction controller
-        //tc = lcc.getTransactionExecute();
-
-		//dd = lcc.getDataDictionary();
-		//dm = dd.getDependencyManager();
-		//ddg = dd.getDataDescriptorGenerator();
-//	}
-
 	/**
 	 * Get the schema descriptor for the schemaid.
 	 *

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GrantRevokeConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GrantRevokeConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GrantRevokeConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GrantRevokeConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -25,10 +25,11 @@
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.sql.Activation;
+import org.apache.derby.iapi.sql.execute.ConstantAction;
 
 import java.util.List;
 
-class GrantRevokeConstantAction extends GenericConstantAction
+class GrantRevokeConstantAction implements ConstantAction
 {
 	private boolean grant;
 	private PrivilegeInfo privileges;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LockTableConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LockTableConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LockTableConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LockTableConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -44,7 +44,7 @@
  *	@author jamie 
  */
 
-class LockTableConstantAction extends GenericConstantAction
+class LockTableConstantAction implements ConstantAction
 {
 
 	private final String					fullTableName;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -49,7 +49,7 @@
  *	@author jamie 
  */
 
-class SetSchemaConstantAction extends GenericConstantAction
+class SetSchemaConstantAction implements ConstantAction
 {
 
 	private final String					schemaName;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetTransactionIsolationConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetTransactionIsolationConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetTransactionIsolationConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetTransactionIsolationConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -41,7 +41,7 @@
  *	@author Jerry Brenner.
  */
 
-class SetTransactionIsolationConstantAction extends GenericConstantAction
+class SetTransactionIsolationConstantAction implements ConstantAction
 {
 
 	private final int isolationLevel;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java?view=diff&rev=511367&r1=511366&r2=511367
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/WriteCursorConstantAction.java
Sat Feb 24 14:46:46 2007
@@ -47,6 +47,14 @@
  *	This abstract class describes compiled constants that are passed into
  *	Delete, Insert, and Update ResultSets.
  *
+ *  This class and its sub-classes are not really implementations
+ *  of ConstantAction, since they are not executed.
+ *  
+ *  A better name for these classes would be 'Constants'.
+ *  E.g. WriteCursorConstants, DeleteConstants.
+ *  
+ *  Ideally one day the split will occur.
+ *
  *	@author Rick Hillegas
  */
 



Mime
View raw message