You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2006/08/20 16:46:14 UTC

svn commit: r432972 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/dictionary/ impl/sql/catalog/

Author: djd
Date: Sun Aug 20 07:46:09 2006
New Revision: 432972

URL: http://svn.apache.org/viewvc?rev=432972&view=rev
Log:
DERBY-1674 (partial) Move PermissionsCatalogRowFactory into its correct location under impl/sql/catalog.
System tables are a detail of the catalog implementation, not the dictionary api. The class was only ever referenced
in the impl/sql/catalog package.

Added:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/PermissionsCatalogRowFactory.java
      - copied, changed from r432887, db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PermissionsCatalogRowFactory.java
Removed:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PermissionsCatalogRowFactory.java
Modified:
    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/catalog/SYSCOLPERMSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSROUTINEPERMSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLEPERMSRowFactory.java

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=432972&r1=432971&r2=432972&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 Sun Aug 20 07:46:09 2006
@@ -29,7 +29,6 @@
 
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
 import org.apache.derby.iapi.sql.dictionary.CatalogRowFactory;
-import org.apache.derby.iapi.sql.dictionary.PermissionsCatalogRowFactory;
 
 import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;
 import org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList;
@@ -10171,7 +10170,7 @@
         perm.setGrantee( grantee);
         TabInfo ti = getNonCoreTI( catalogNumber);
         PermissionsCatalogRowFactory rf = (PermissionsCatalogRowFactory) ti.getCatalogRowFactory();
-        int primaryIndexNumber = rf.getPrimaryIndexNumber();
+        int primaryIndexNumber = rf.getPrimaryKeyIndexNumber();
         ConglomerateController heapCC = tc.openConglomerate( ti.getHeapConglomerate(),
                                                              false,  // do not keep open across commits
                                                              0,

Copied: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/PermissionsCatalogRowFactory.java (from r432887, db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PermissionsCatalogRowFactory.java)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/PermissionsCatalogRowFactory.java?p2=db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/PermissionsCatalogRowFactory.java&p1=db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PermissionsCatalogRowFactory.java&r1=432887&r2=432972&rev=432972&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PermissionsCatalogRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/PermissionsCatalogRowFactory.java Sun Aug 20 07:46:09 2006
@@ -19,11 +19,12 @@
 
  */
 
-package org.apache.derby.iapi.sql.dictionary;
+package org.apache.derby.impl.sql.catalog;
 
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
+import org.apache.derby.iapi.sql.dictionary.CatalogRowFactory;
 import org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor;
 import org.apache.derby.iapi.sql.execute.ExecIndexRow;
 import org.apache.derby.iapi.sql.execute.ExecRow;
@@ -33,24 +34,24 @@
 import org.apache.derby.iapi.types.RowLocation;
 import org.apache.derby.iapi.types.StringDataValue;
 
-public abstract class PermissionsCatalogRowFactory extends CatalogRowFactory
+abstract class PermissionsCatalogRowFactory extends CatalogRowFactory
 {
-    public static final String AUTHORIZATION_ID_TYPE = "VARCHAR";
-    public static final boolean AUTHORIZATION_ID_IS_BUILTIN_TYPE = true;
-    public static final int AUTHORIZATION_ID_LENGTH = Limits.MAX_IDENTIFIER_LENGTH;
+    static final String AUTHORIZATION_ID_TYPE = "VARCHAR";
+    static final boolean AUTHORIZATION_ID_IS_BUILTIN_TYPE = true;
+    static final int AUTHORIZATION_ID_LENGTH = Limits.MAX_IDENTIFIER_LENGTH;
 
-    public PermissionsCatalogRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf,
+    PermissionsCatalogRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf,
                                         boolean convertIdToLower)
     {
         super(uuidf,ef,dvf,convertIdToLower);
     }
 
-    protected DataValueDescriptor getAuthorizationID( String value)
+    DataValueDescriptor getAuthorizationID( String value)
     {
         return getDataValueFactory().getVarcharDataValue( value);
     }
 
-    protected DataValueDescriptor getNullAuthorizationID()
+    DataValueDescriptor getNullAuthorizationID()
     {
         return getDataValueFactory().getNullVarchar( (StringDataValue) null);
     }
@@ -63,16 +64,11 @@
      *
      * @return The internal authorization ID
      */
-    protected String getAuthorizationID( ExecRow row, int columnPos)
+    String getAuthorizationID( ExecRow row, int columnPos)
         throws StandardException
     {
         return row.getColumn( columnPos).getString();
     }
-    
-    /**
-     * @return the index number of the primary key index.
-     */
-    public abstract int getPrimaryIndexNumber();
 
     /**
      * Build an index key row from a permission descriptor. A key row does not include the RowLocation column.
@@ -82,7 +78,7 @@
      *
      * @exception StandardException standard error policy
      */
-    public abstract ExecIndexRow buildIndexKeyRow( int indexNumber,
+    abstract ExecIndexRow buildIndexKeyRow( int indexNumber,
                                                    PermissionsDescriptor perm)
         throws StandardException;
 
@@ -98,7 +94,7 @@
      *
      * @exception StandardException standard error policy
      */
-    abstract public int orPermissions( ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged)
+    abstract int orPermissions( ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged)
         throws StandardException;
 
     /**
@@ -113,7 +109,7 @@
      *
      * @exception StandardException standard error policy
      */
-    abstract public int removePermissions( ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged)
+    abstract int removePermissions( ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged)
         throws StandardException;
 
     /**
@@ -126,5 +122,5 @@
      * @param perm Permission descriptor
      * @throws StandardException
      */
-    abstract public void setUUIDOfThePassedDescriptor(ExecRow row, PermissionsDescriptor perm) throws StandardException;
+    abstract void setUUIDOfThePassedDescriptor(ExecRow row, PermissionsDescriptor perm) throws StandardException;
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java?rev=432972&r1=432971&r2=432972&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLPERMSRowFactory.java Sun Aug 20 07:46:09 2006
@@ -21,7 +21,6 @@
 
 package org.apache.derby.impl.sql.catalog;
 
-import org.apache.derby.iapi.sql.dictionary.PermissionsCatalogRowFactory;
 import org.apache.derby.iapi.sql.dictionary.ColPermsDescriptor;
 import org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
@@ -312,7 +311,7 @@
         return row;
     } // end of buildIndexKeyRow
     
-    public int getPrimaryIndexNumber()
+    public int getPrimaryKeyIndexNumber()
     {
         return GRANTEE_TABLE_TYPE_GRANTOR_INDEX_NUM;
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSROUTINEPERMSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSROUTINEPERMSRowFactory.java?rev=432972&r1=432971&r2=432972&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSROUTINEPERMSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSROUTINEPERMSRowFactory.java Sun Aug 20 07:46:09 2006
@@ -25,7 +25,6 @@
 import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;
 import org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
-import org.apache.derby.iapi.sql.dictionary.PermissionsCatalogRowFactory;
 import org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor;
 
 import org.apache.derby.iapi.error.StandardException;
@@ -280,7 +279,7 @@
         return row;
     } // end of buildIndexKeyRow
     
-    public int getPrimaryIndexNumber()
+    public int getPrimaryKeyIndexNumber()
     {
         return GRANTEE_ALIAS_GRANTOR_INDEX_NUM;
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLEPERMSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLEPERMSRowFactory.java?rev=432972&r1=432971&r2=432972&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLEPERMSRowFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLEPERMSRowFactory.java Sun Aug 20 07:46:09 2006
@@ -25,7 +25,6 @@
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
-import org.apache.derby.iapi.sql.dictionary.PermissionsCatalogRowFactory;
 import org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor;
 import org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
@@ -368,7 +367,7 @@
         return row;
     } // end of buildIndexRow
     
-    public int getPrimaryIndexNumber()
+    public int getPrimaryKeyIndexNumber()
     {
         return GRANTEE_TABLE_GRANTOR_INDEX_NUM;
     }