db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r434100 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/dictionary/ impl/sql/catalog/
Date Wed, 23 Aug 2006 17:49:19 GMT
Author: djd
Date: Wed Aug 23 10:49:17 2006
New Revision: 434100

URL: http://svn.apache.org/viewvc?rev=434100&view=rev
Log:
DERBY-1674 (partial) CatalogRowFactory.buildEmptyIndexRow() row was implemented in all the
sub-classes but could
never be called, except for SYSTABLESRowFactory. Seen by code inspection and double checked
with the code
coverage. Remove all the methods (except SYSTABLESRowFactory) and abstract definition in CatalogRowFactory.
Changed DataDictionaryImpl to call buildEmptyIndexRow using a reference to SYSTABLESRowFactory
since it
was special case code for SYSTABLES.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.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/catalog/SYSALIASESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.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/SYSCOLUMNSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDUMMY1RowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFOREIGNKEYSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSKEYSRowFactory.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/SYSSCHEMASRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLEPERMSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLESRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSVIEWSRowFactory.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -349,14 +349,6 @@
 
 	/** builds a column list for the catalog */
 	public abstract SystemColumn[]	buildColumnList();
-    
-
-	/**
-	 * builds an empty row given for a given index number.
-	 */
-  	public abstract ExecIndexRow	buildEmptyIndexRow(int indexNumber,
-													   RowLocation rowLocation) 
-  		throws StandardException;
 
 	/** Return the column positions for a given index number */
 	public int[] getIndexColumnPositions(int indexNumber)

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=434100&r1=434099&r2=434100&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
Wed Aug 23 10:49:17 2006
@@ -6725,7 +6725,7 @@
 		DataValueDescriptor		tableNameOrderable;
 		ScanController			scanController;
 		TabInfoImpl					ti = coreInfo[SYSTABLES_CORE_NUM];
-		CatalogRowFactory		rf = ti.getCatalogRowFactory();
+        SYSTABLESRowFactory		rf = (SYSTABLESRowFactory) ti.getCatalogRowFactory();
 
 		// We only want the 1st column from the heap
 		row = exFactory.getValueRow(1);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -243,57 +243,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);		
-
-		switch( indexNumber )
-		{
-		    case SYSALIASES_INDEX1_ID:
-				/* 1st column is SCHEMAID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-				/* 2nd column is ALIAS (varchar(128)) */
-				row.setColumn(2, getDataValueFactory().getVarcharDataValue((String) null));
-
-				/* 3rd column is NAMESPACE (char(1)) */
-				row.setColumn(3, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		    case SYSALIASES_INDEX2_ID:
-				/* 1st column is ALIASID (UUID - char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		    case SYSALIASES_INDEX3_ID:
-				/* 1st column is SCHEMAID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-				/* 2nd column is SPECIFICNAME (varchar(128)) */
-				row.setColumn(2, getDataValueFactory().getVarcharDataValue((String) null));
-
-				break;
-		}	// end switch
-
-		return	row;
-	}
-
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCHECKSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -162,35 +162,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int  ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-		switch( indexNumber )
-		{
-		    case SYSCHECKS_INDEX1_ID:
-				/* 1st column is CONSTRAINTID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-				break;
-		}	// end switch
-
-		return	row;
-	}
-
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory

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=434100&r1=434099&r2=434100&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
Wed Aug 23 10:49:17 2006
@@ -182,33 +182,6 @@
                    "org.apache.derby.iapi.services.io.FormatableBitSet", false)    
         };
     }
-	/**
-	 * builds an empty row given for a given index number.
-	 */
-  	public ExecIndexRow buildEmptyIndexRow(int indexNumber,
-                                           RowLocation rowLocation) 
-  		throws StandardException
-    {
-        ExecIndexRow row = getExecutionFactory().getIndexableRow( indexColumnPositions[indexNumber].length
+ 1);
-        row.setColumn( row.nColumns(), rowLocation);
-        
-        switch( indexNumber)
-        {
-        case GRANTEE_TABLE_TYPE_GRANTOR_INDEX_NUM:
-            row.setColumn(1, getNullAuthorizationID()); // grantee
-            row.setColumn(2, getDataValueFactory().getNullChar( (StringDataValue) null));
// table UUID
-            row.setColumn(3, getDataValueFactory().getNullChar( (StringDataValue) null));
// type
-            row.setColumn(4, getNullAuthorizationID()); // grantor
-            break;
-        case COLPERMSID_INDEX_NUM:
-            row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null));
// COLPERMSID
-            break;
-        case TABLEID_INDEX_NUM:
-            row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null));
// TABLEID
-            break;
-        }
-        return row;
-    } // end of buildEmptyIndexRow
 
 	/**
 	 * builds an index key row for a given index number.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -326,51 +326,6 @@
 	///////////////////////////////////////////////////////////////////////////
 
 	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-		switch(indexNumber)
-		{
-			case SYSCOLUMNS_INDEX1_ID:
-				/* 1st column is REFERENCEID (UUID - char(36)) */
-				row.setColumn
-					(1, getDataValueFactory().getCharDataValue((String) null));
-
-				/* 2nd column is COLUMNNAME (varchar(128)) */
-				row.setColumn
-				    (2, 
-					 getDataValueFactory().getVarcharDataValue((String) null));
-
-				break;
-
-		    case SYSCOLUMNS_INDEX2_ID:
-				
-				/* 1st column is DEFAULTID (UUID - char(36)) */
-				row.setColumn
-					(1, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-		}	// end switch
-
-		return	row;
-	}
-
-
-	/**
 	 * Make a ColumnDescriptor out of a SYSCOLUMNS row
 	 *
 	 * @param row 					a SYSCOLUMNS row

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONGLOMERATESRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -213,58 +213,6 @@
 		return makeRow(null, null);
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row =	getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-		switch( indexNumber )
-		{
-		    case SYSCONGLOMERATES_INDEX1_ID:
-				
-				/* 1st column is CONGLOMERATEID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-				break;
-
-		    case SYSCONGLOMERATES_INDEX2_ID:
-				
-				/* 1st column is CONGLOMERATENAME (varchar(128)) */
-				row.setColumn(1, getDataValueFactory().getVarcharDataValue((String) null));
-				
-				/* 2nd column is SCHEMAID (char(36)) */
-				row.setColumn(2, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		    case SYSCONGLOMERATES_INDEX3_ID:
-				
-				/* Build the row */
-				/* NOTE: this index is not unique, need extra column in template for
-				 * drop method in DataDictionary.
-				 */
-
-				/* 1st column is TABLEID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		}	// end switch
-
-		return	row;
-	}
 
 	/**
 	 * Get the Properties associated with creating the heap.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -224,57 +224,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-		switch( indexNumber )
-		{
-		    case SYSCONSTRAINTS_INDEX1_ID:
-				/* 1st column is CONSTRAINTID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-				break;
-
-		    case SYSCONSTRAINTS_INDEX2_ID:
-				/* 1st column is CONSTRAINTNAME (varchar(128)) */
-				row.setColumn(1, getDataValueFactory().getVarcharDataValue((String) null));
-
-				/* 2nd column is SCHEMAID (UUID - char(36)) */
-				row.setColumn(2, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		    case SYSCONSTRAINTS_INDEX3_ID:
-				/* 1st column is TABLEID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		    default:
-
-				if (SanityManager.DEBUG)
-					SanityManager.NOTREACHED();
-				return null;
-
-
-		}	// end switch
-
-		return	row;
-	}
 
 	///////////////////////////////////////////////////////////////////////////
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDEPENDSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -180,29 +180,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(2);
-
-		/* both indices are on UUID */
-		row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-		row.setColumn(2, rowLocation);
-
-		return	row;
-	}
-
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDUMMY1RowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDUMMY1RowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDUMMY1RowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSDUMMY1RowFactory.java
Wed Aug 23 10:49:17 2006
@@ -101,12 +101,6 @@
 		return null;
 	}
 
-  	public ExecIndexRow	buildEmptyIndexRow(int indexNumber, RowLocation rowLocation)
-  		throws StandardException
-	{
-		return null;
-	}
-
 	/**
 	 * Builds a list of columns suitable for creating this Catalog.
 	 *

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFILESRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -161,46 +161,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1,  rowLocation);
-
-		switch( indexNumber )
-		{
-		    case SYSFILES_INDEX1_ID:
-				/* 1st column is NAME (varchar(128)) */
-				row.setColumn(1, getDataValueFactory().getVarcharDataValue((String) null));
-
-				/* 2nd column is SCHEMAID (UUID - char(36)) */
-				row.setColumn(2, getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-
-		    case SYSFILES_INDEX2_ID:
-				/* 1st column is ID (UUID - char(36)) */
-				row.setColumn(1,
-							  getDataValueFactory().getCharDataValue((String) null));
-
-				break;
-		}	// end switch
-
-		return	row;
-	}
-
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFOREIGNKEYSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFOREIGNKEYSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFOREIGNKEYSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSFOREIGNKEYSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -178,30 +178,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols +1, rowLocation);
-
-		/* 1st column is CONSTRAINTID (char(36)) or KEYCONSTRAINTID (char(36)) */
-		row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-		return	row;
-	}
-
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSKEYSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSKEYSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSKEYSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSKEYSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -151,46 +151,7 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		ExecIndexRow			row = null;
 
-		switch( indexNumber )
-		{
-		    case SYSKEYS_INDEX1_ID:
-				
-				/* Build the row */
-				row = getExecutionFactory().getIndexableRow(2);
-
-				/* 1st column is CONSTRAINTID (char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-				row.setColumn(2, rowLocation);
-
-				break;
-
-		    default:
-
-				if (SanityManager.DEBUG)
-					SanityManager.NOTREACHED();
-				return null;
-
-
-		}	// end switch
-
-		return	row;
-	}
 
 	///////////////////////////////////////////////////////////////////////////
 	//

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=434100&r1=434099&r2=434100&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
Wed Aug 23 10:49:17 2006
@@ -206,33 +206,6 @@
     } // end of buildColumnList
 
 	/**
-	 * builds an empty row given for a given index number.
-	 */
-  	public ExecIndexRow buildEmptyIndexRow(int indexNumber,
-                                           RowLocation rowLocation)
-  		throws StandardException
-    {
-        ExecIndexRow row = getExecutionFactory().getIndexableRow( indexColumnPositions[indexNumber].length
+ 1);
-        row.setColumn( row.nColumns(), rowLocation);
-        
-        switch( indexNumber)
-        {
-        case GRANTEE_ALIAS_GRANTOR_INDEX_NUM:
-            row.setColumn(1, getNullAuthorizationID()); // grantee
-            row.setColumn(2, getDataValueFactory().getNullChar( (StringDataValue) null));
// table UUID
-            row.setColumn(3, getNullAuthorizationID()); // grantor
-            break;
-        case ROUTINEPERMSID_INDEX_NUM:
-            row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null));
// ROUTINEPERMSID
-            break;
-        case ALIASID_INDEX_NUM:
-            row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null));
// ROUTINEPERMSID
-            break;
-        }
-        return row;
-    } // end of buildEmptyIndexRow
-
-	/**
 	 * builds an index key row given for a given index number.
 	 */
   	public ExecIndexRow buildIndexKeyRow( int indexNumber,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSCHEMASRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSCHEMASRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSCHEMASRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSCHEMASRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -158,41 +158,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-
-		switch( indexNumber )
-		{
-		    case SYSSCHEMAS_INDEX1_ID:
-				/* 1st column is SCHEMANAME (varchar(128)) */
-				row.setColumn(1, getDataValueFactory().getVarcharDataValue((String) null));
-				break;
-
-		    case SYSSCHEMAS_INDEX2_ID:
-				/* 1st column is SCHEMAID (UUID - char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-				break;
-
-		}	// end switch
-
-		return	row;
-	}
 
 	///////////////////////////////////////////////////////////////////////////
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATEMENTSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -234,40 +234,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 * @param	indexNumber	Index to build empty row for.
-	 * @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-		switch( indexNumber )
-		{
-		    case SYSSTATEMENTS_INDEX1_ID:
-				/* 1st column is STMTID (UUID - char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-				break;
-
-		    case SYSSTATEMENTS_INDEX2_ID:
-				/* 1st column is STMTNAME (varchar(128)) */
-				row.setColumn(1, getDataValueFactory().getVarcharDataValue((String) null));
-				break;
-		}	// end switch
-
-		return	row;
-	}
-
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSSTATISTICSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -232,18 +232,6 @@
 										   statType, stat, columnCount);
 	}			
 
-	public ExecIndexRow	buildEmptyIndexRow(int indexNumber,
-										   RowLocation rowLocation) 
-			throws StandardException
-	{
-		/* there is only one index-- just use hardwired values. */
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(3);
-		row.setColumn(1, getDataValueFactory().getCharDataValue((String)null));
-		row.setColumn(2, getDataValueFactory().getCharDataValue((String)null));
-		row.setColumn(3, rowLocation);
-		return row;
-	}
-
 	/**
 	 * Builds a list of columns suitable for creating this Catalog.
 	 *

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=434100&r1=434099&r2=434100&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
Wed Aug 23 10:49:17 2006
@@ -296,33 +296,6 @@
     } // end of buildColumnList
 
 	/**
-	 * builds an empty row given for a given index number.
-	 */
-  	public ExecIndexRow buildEmptyIndexRow(int indexNumber,
-                                           RowLocation rowLocation)
-  		throws StandardException
-    {
-        ExecIndexRow row = getExecutionFactory().getIndexableRow( indexColumnPositions[indexNumber].length
+ 1);
-        row.setColumn( row.nColumns(), rowLocation);
-        
-        switch( indexNumber)
-        {
-        case GRANTEE_TABLE_GRANTOR_INDEX_NUM:
-            row.setColumn(1, getNullAuthorizationID()); // grantee
-            row.setColumn(2, getDataValueFactory().getNullChar( (StringDataValue) null));
// table UUID
-            row.setColumn(3, getNullAuthorizationID()); // grantor
-            break;
-        case TABLEPERMSID_INDEX_NUM:
-            row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null));
// TABLEPERMSID
-            break;
-        case TABLEID_INDEX_NUM:
-            row.setColumn(1, getDataValueFactory().getNullChar( (StringDataValue) null));
// TABLEID
-            break;
-        }
-        return row;
-    } // end of buildEmptyIndexRow
-
-	/**
 	 * builds a key row given for a given index number.
 	 */
   	public ExecIndexRow buildIndexKeyRow( int indexNumber,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLESRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLESRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLESRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTABLESRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -55,7 +55,7 @@
  * @author Rick Hillegas (extracted from DataDictionaryImpl).
  */
 
-public class SYSTABLESRowFactory extends CatalogRowFactory
+class SYSTABLESRowFactory extends CatalogRowFactory
 {
 	private static final String		TABLENAME_STRING = "SYSTABLES";
 
@@ -96,7 +96,7 @@
 	//
 	/////////////////////////////////////////////////////////////////////////////
 
-    public	SYSTABLESRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf,
+    SYSTABLESRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf,
                                 boolean convertIdToLower)
 	{
 		super(uuidf,ef,dvf,convertIdToLower);
@@ -227,7 +227,7 @@
 	 * @return corresponding empty index row
 	 * @exception   StandardException thrown on failure
 	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
+	ExecIndexRow	buildEmptyIndexRow( int indexNumber,
 											RowLocation rowLocation)
 			throws StandardException
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -248,50 +248,6 @@
 		return row;
 	}
 
-	/**
-	 * Builds an empty index row.
-	 *
-	 * @param	indexNumber	Index to build empty row for.
-	 * @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		int ncols = getIndexColumnCount(indexNumber);
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(ncols + 1);
-
-		row.setColumn(ncols + 1, rowLocation);
-
-		switch( indexNumber )
-		{
-		    case SYSTRIGGERS_INDEX1_ID:
-				/* 1st column is TRIGGERID (UUID - char(36)) */
-				row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-				break;
-
-		    case SYSTRIGGERS_INDEX2_ID:
-				/* 1st column is TRIGGERNAME (varchar(128)) */
-				row.setColumn(1, getDataValueFactory().getVarcharDataValue((String) null));
-
-				/* 2nd column is SCHEMAID (char(32)) */
-				row.setColumn(2, getDataValueFactory().getCharDataValue((String) null));
-				break;
-
-		    case SYSTRIGGERS_INDEX3_ID:
-				/* 1nd column is TABLEID (char(32)) */
-				row.setColumn(2, getDataValueFactory().getCharDataValue((String) null));
-
-				/* 2nd column is COMPILATIONTIMESTAMP (timestamp) */
-				row.setColumn(2, new SQLTimestamp());
-				break;
-		}	// end switch
-
-		return	row;
-	}
 
 	///////////////////////////////////////////////////////////////////////////
 	//
@@ -666,11 +622,6 @@
 							);
 
 		return	columnList;
-	}
-
-	public int heapColumnCount()
-	{
-		return SYSTRIGGERS_COLUMN_COUNT;
 	}
 
 	// a little helper

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSVIEWSRowFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSVIEWSRowFactory.java?rev=434100&r1=434099&r2=434100&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSVIEWSRowFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSVIEWSRowFactory.java
Wed Aug 23 10:49:17 2006
@@ -188,31 +188,7 @@
 
 		return row;
 	}
-
-	/**
-	 * Builds an empty index row.
-	 *
-	 *	@param	indexNumber	Index to build empty row for.
-	 *  @param  rowLocation	Row location for last column of index row
-	 *
-	 * @return corresponding empty index row
-	 * @exception   StandardException thrown on failure
-	 */
-	public ExecIndexRow	buildEmptyIndexRow( int indexNumber,
-											RowLocation rowLocation) 
-			throws StandardException
-	{
-		/* Build the row  */
-		ExecIndexRow row = getExecutionFactory().getIndexableRow(2);
-
-		/* 1st column is TABLEID (char(36)) */
-		row.setColumn(1, getDataValueFactory().getCharDataValue((String) null));
-
-		row.setColumn(2, rowLocation);
-
-		return	row;
-	}
-
+    
 	///////////////////////////////////////////////////////////////////////////
 	//
 	//	ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory
@@ -349,10 +325,5 @@
 							36					// maxLength
 			                );
 		return	columnList;
-	}
-
-	public int heapColumnCount()
-	{
-		return SYSVIEWS_COLUMN_COUNT;
 	}
 }



Mime
View raw message