db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1483911 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/dictionary/ impl/sql/ impl/sql/catalog/ impl/sql/compile/ impl/sql/depend/
Date Fri, 17 May 2013 16:52:52 GMT
Author: rhillegas
Date: Fri May 17 16:52:52 2013
New Revision: 1483911

URL: http://svn.apache.org/r1483911
Log:
DERBY-6213: Generify impl/sql/catalog and impl/sql/depend.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptorList.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DefaultDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DependencyDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/FileInfoDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PrivilegedSQLObject.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SchemaDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SubConstraintDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueSQLObjectDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueTupleDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ViewDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
    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/catalog/RoleClosureIteratorImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java Fri May 17 16:52:52 2013
@@ -60,8 +60,8 @@ import org.apache.derby.iapi.util.IdUtil
  */
 
 public final class AliasDescriptor 
-	extends TupleDescriptor
-	implements PrivilegedSQLObject, Provider, Dependent
+	extends PrivilegedSQLObject
+	implements Provider, Dependent
 {
 	private final UUID		aliasID;
 	private final String		aliasName;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptorList.java Fri May 17 16:52:52 2013
@@ -36,7 +36,7 @@ import java.util.Iterator;
  * This represents a list of column descriptors. 
  */
 
-public class ColumnDescriptorList extends ArrayList
+public class ColumnDescriptorList extends ArrayList<TupleDescriptor>
 {
 	/**
 	 * Add the column.  Currently, the table id is ignored.
@@ -71,7 +71,7 @@ public class ColumnDescriptorList extend
 	{
 		ColumnDescriptor	returnValue = null;
 
-		for (Iterator iterator = iterator(); iterator.hasNext(); )
+		for (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )
 		{
 			ColumnDescriptor columnDescriptor = (ColumnDescriptor) iterator.next();
 
@@ -98,7 +98,7 @@ public class ColumnDescriptorList extend
 	{
 		ColumnDescriptor	returnValue = null;
 
-		for (Iterator iterator = iterator(); iterator.hasNext(); )
+		for (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )
 		{
 			ColumnDescriptor columnDescriptor = (ColumnDescriptor) iterator.next();
 			if ( ( columnID == columnDescriptor.getPosition() ) &&
@@ -138,7 +138,7 @@ public class ColumnDescriptorList extend
 
 		for (int index = 0; index < size; index++)
 		{
-			ColumnDescriptor columnDescriptor = elementAt(index);
+			ColumnDescriptor columnDescriptor = (ColumnDescriptor) elementAt(index);
 			strings[index] = columnDescriptor.getColumnName();
 		}
 		return strings;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptor.java Fri May 17 16:52:52 2013
@@ -59,8 +59,8 @@ import org.apache.derby.iapi.services.mo
  * @version 0.1
  */
 
-public final class ConglomerateDescriptor extends TupleDescriptor
-	implements UniqueTupleDescriptor, Provider
+public final class ConglomerateDescriptor extends UniqueTupleDescriptor
+	implements Provider
 {
 	// Implementation
 	private long	conglomerateNumber;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptorList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptorList.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptorList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptorList.java Fri May 17 16:52:52 2013
@@ -32,7 +32,7 @@ import org.apache.derby.catalog.UUID;
 import java.util.Iterator;
 import java.util.ArrayList;
 
-public class ConglomerateDescriptorList extends ArrayList
+public class ConglomerateDescriptorList extends ArrayList<TupleDescriptor>
 {
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java Fri May 17 16:52:52 2013
@@ -47,8 +47,8 @@ import org.apache.derby.iapi.store.acces
  */
 
 public abstract class ConstraintDescriptor 
-	extends TupleDescriptor
-	implements UniqueTupleDescriptor, Provider, Dependent
+	extends UniqueTupleDescriptor
+	implements Provider, Dependent
 {
 	// used to indicate what type of constraints we 
 	// are interested in

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java Fri May 17 16:52:52 2013
@@ -39,7 +39,7 @@ import org.apache.derby.catalog.UUID;
 
 import java.util.ArrayList;
 
-public class ConstraintDescriptorList extends ArrayList
+public class ConstraintDescriptorList extends ArrayList<ConstraintDescriptor>
 {
 
 	private boolean scanned;
@@ -243,7 +243,7 @@ public class ConstraintDescriptorList ex
 	 */
 	public ConstraintDescriptor elementAt(int n)
 	{
-		return (ConstraintDescriptor) get(n);
+		return get(n);
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java Fri May 17 16:52:52 2013
@@ -33,6 +33,7 @@ import org.apache.derby.iapi.sql.conn.La
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.store.access.TransactionController;
+import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.RowLocation;
 
 import org.apache.derby.catalog.DependableFinder;
@@ -1102,7 +1103,7 @@ public interface DataDictionary
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-    public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List defaults)
+    public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List<DataValueDescriptor> defaults)
             throws StandardException;
 
 	/**
@@ -1583,7 +1584,7 @@ public interface DataDictionary
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public List getDependentsDescriptorList(String dependentID)
+	public List<TupleDescriptor> getDependentsDescriptorList(String dependentID)
 		throws StandardException;
 
 	/**
@@ -1597,7 +1598,7 @@ public interface DataDictionary
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public List getProvidersDescriptorList(String providerID)
+	public List<TupleDescriptor> getProvidersDescriptorList(String providerID)
 		throws StandardException;
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DefaultDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DefaultDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DefaultDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DefaultDescriptor.java Fri May 17 16:52:52 2013
@@ -40,8 +40,8 @@ import org.apache.derby.iapi.sql.depend.
  */
 
 public final class DefaultDescriptor 
-	extends TupleDescriptor
-	implements UniqueTupleDescriptor, Provider, Dependent
+	extends UniqueTupleDescriptor
+	implements Provider, Dependent
 {
 	private final int			columnNumber;
 	private final UUID		defaultUUID;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DependencyDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DependencyDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DependencyDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DependencyDescriptor.java Fri May 17 16:52:52 2013
@@ -35,8 +35,7 @@ import org.apache.derby.iapi.sql.depend.
  * 
  * 
  */
-public class DependencyDescriptor extends TupleDescriptor 
-	implements UniqueTupleDescriptor
+public class DependencyDescriptor extends UniqueTupleDescriptor 
 {
 	/** public interface for this class is:
 		<ol>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/FileInfoDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/FileInfoDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/FileInfoDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/FileInfoDescriptor.java Fri May 17 16:52:52 2013
@@ -35,8 +35,8 @@ import org.apache.derby.iapi.services.io
 /**
  * A Descriptor for a file that has been stored in the database.
  */
-public final class  FileInfoDescriptor extends TupleDescriptor 
-	implements Provider, UniqueSQLObjectDescriptor
+public final class  FileInfoDescriptor extends UniqueSQLObjectDescriptor 
+	implements Provider
 {
 	/** A type tho indicate the file is a jar file **/
 	public static final int JAR_FILE_TYPE = 0;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/GenericDescriptorList.java Fri May 17 16:52:52 2013
@@ -26,7 +26,7 @@ import org.apache.derby.catalog.UUID;
 import java.util.ArrayList;
 import java.util.Iterator;
 
-public class GenericDescriptorList extends ArrayList
+public class GenericDescriptorList extends ArrayList<TupleDescriptor>
 {
 	private boolean scanned;
 
@@ -64,7 +64,7 @@ public class GenericDescriptorList exten
 	 */
 	public UniqueTupleDescriptor getUniqueTupleDescriptor(UUID uuid)
 	{
-		for (Iterator iterator = iterator(); iterator.hasNext(); )
+		for (Iterator<TupleDescriptor> iterator = iterator(); iterator.hasNext(); )
 		{
 			UniqueTupleDescriptor ud = (UniqueTupleDescriptor) iterator.next();
 			if (ud.getUUID().equals(uuid))

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PrivilegedSQLObject.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PrivilegedSQLObject.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PrivilegedSQLObject.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/PrivilegedSQLObject.java Fri May 17 16:52:52 2013
@@ -26,9 +26,15 @@ import org.apache.derby.iapi.sql.depend.
 /**
  * This is a descriptor for schema object which can have privileges granted on it.
  */
-public interface PrivilegedSQLObject extends UniqueSQLObjectDescriptor, Provider
+public abstract class PrivilegedSQLObject
+    extends UniqueSQLObjectDescriptor
+    implements Provider
 {
+    /** Pass-through constructors */
+    public  PrivilegedSQLObject() { super(); }
+    public  PrivilegedSQLObject( DataDictionary dd ) { super( dd ); }
+    
     /** Get the type of the object for storage in SYS.SYSPERMS */
-    public String getObjectTypeName();
+    public abstract String getObjectTypeName();
     
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java Fri May 17 16:52:52 2013
@@ -68,8 +68,8 @@ import org.apache.derby.iapi.types.DataT
  *
  *
  */
-public class SPSDescriptor extends TupleDescriptor
-	implements UniqueSQLObjectDescriptor, Dependent, Provider
+public class SPSDescriptor extends UniqueSQLObjectDescriptor
+	implements Dependent, Provider
 {
 	/**
 	 * Statement types.  

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SchemaDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SchemaDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SchemaDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SchemaDescriptor.java Fri May 17 16:52:52 2013
@@ -40,8 +40,8 @@ import org.apache.derby.catalog.Dependab
  * @version 0.1
  */
 
-public final class SchemaDescriptor extends TupleDescriptor 
-	implements UniqueTupleDescriptor, Provider
+public final class SchemaDescriptor extends UniqueTupleDescriptor 
+	implements Provider
 {
 	
 	/*

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java Fri May 17 16:52:52 2013
@@ -41,8 +41,9 @@ import org.apache.derby.iapi.store.acces
  * is null, then the sequence has been exhausted and no more values
  * can be generated from it.
  */
-public class SequenceDescriptor extends TupleDescriptor
-        implements Provider, Dependent, PrivilegedSQLObject
+public class SequenceDescriptor
+    extends PrivilegedSQLObject
+    implements Provider, Dependent
 {
 
     private UUID sequenceUUID;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SubConstraintDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SubConstraintDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SubConstraintDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SubConstraintDescriptor.java Fri May 17 16:52:52 2013
@@ -34,8 +34,7 @@ import org.apache.derby.iapi.services.sa
  * @version 0.1
  */
 
-public abstract class SubConstraintDescriptor extends TupleDescriptor
-	implements UniqueTupleDescriptor
+public abstract class SubConstraintDescriptor extends UniqueTupleDescriptor
 {
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Fri May 17 16:52:52 2013
@@ -89,8 +89,8 @@ import org.apache.derby.iapi.util.IdUtil
 	*
 	*/
 
-public class TableDescriptor extends TupleDescriptor
-	implements UniqueSQLObjectDescriptor, Provider, Dependent
+public class TableDescriptor extends UniqueSQLObjectDescriptor
+	implements Provider, Dependent
 {
 	public static final int BASE_TABLE_TYPE = 0;
 	public static final int SYSTEM_TABLE_TYPE = 1;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java Fri May 17 16:52:52 2013
@@ -90,8 +90,8 @@ import java.io.IOException;
  * <li> public String getNewReferencingName();
  * </ol>
  */
-public class TriggerDescriptor extends TupleDescriptor
-	implements UniqueSQLObjectDescriptor, Provider, Dependent, Formatable 
+public class TriggerDescriptor extends UniqueSQLObjectDescriptor
+	implements Provider, Dependent, Formatable 
 {
 	// field that we want users to be able to know about
 	public static final int SYSTRIGGERS_STATE_FIELD = 8;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueSQLObjectDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueSQLObjectDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueSQLObjectDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueSQLObjectDescriptor.java Fri May 17 16:52:52 2013
@@ -37,15 +37,19 @@ import org.apache.derby.catalog.UUID;
  * UUIDS.
  *
  */
-public interface UniqueSQLObjectDescriptor extends UniqueTupleDescriptor
+public abstract class UniqueSQLObjectDescriptor extends UniqueTupleDescriptor
 {
+    /** Pass-through constructors */
+    public  UniqueSQLObjectDescriptor() { super(); }
+    public  UniqueSQLObjectDescriptor( DataDictionary dd ) { super( dd ); }
+    
 	/**
 	 * Get the name of this object.  E.g. for a table descriptor,
 	 * this will be the table name.
 	 * 
 	 * @return the name
 	 */
-	public String getName();
+	public abstract String getName();
 
 	/**
 	 * Get the objects schema descriptor
@@ -54,6 +58,6 @@ public interface UniqueSQLObjectDescript
 	 *
 	 * @exception StandardException on error
 	 */
-	public SchemaDescriptor getSchemaDescriptor()
+	public abstract SchemaDescriptor getSchemaDescriptor()
 		throws StandardException;
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueTupleDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueTupleDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueTupleDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/UniqueTupleDescriptor.java Fri May 17 16:52:52 2013
@@ -24,16 +24,20 @@ package org.apache.derby.iapi.sql.dictio
 import org.apache.derby.catalog.UUID;
 
 /**
- * Simple interface for Tuple Descriptors that have
+ * Extension for Tuple Descriptors that have
  * UUIDS.
  *
  */
-public interface UniqueTupleDescriptor
+public abstract class UniqueTupleDescriptor extends TupleDescriptor
 {
+    /** Pass-through constructors */
+    public  UniqueTupleDescriptor() { super(); }
+    public  UniqueTupleDescriptor( DataDictionary dd ) { super( dd ); }
+    
 	/**
 	 * Return the UUID for this Descriptor
 	 *
 	 * @return the uuid
 	 */
-	public UUID getUUID();
+	public abstract UUID getUUID();
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ViewDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ViewDescriptor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ViewDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ViewDescriptor.java Fri May 17 16:52:52 2013
@@ -51,8 +51,8 @@ import org.apache.derby.iapi.services.io
  * @version 0.1
  */
 
-public final class ViewDescriptor extends TupleDescriptor
-	implements UniqueTupleDescriptor, Dependent, Provider
+public final class ViewDescriptor extends UniqueTupleDescriptor
+	implements Dependent, Provider
 {
 	private final int			checkOption;
 	private String		viewName;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml Fri May 17 16:52:52 2013
@@ -104,9 +104,33 @@
       <classpath>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <include name="${derby.dir}/${cur.dir}/catalog/**"/>
+      <include name="${derby.dir}/${cur.dir}/depend/**"/>
+      <compilerarg value="-Xlint:unchecked"/>
+    </javac>
+
+    <javac
+      source="1.6"
+      target="1.6"
+      bootclasspath="${empty}"
+      nowarn="on"
+      debug="${debug}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.engine.src.dir}:${generated.src.dir}"
+      destdir="${out.dir}">
+      <classpath>
+        <pathelement path="${java16compile.classpath}"/>
+      </classpath>
       <include name="${derby.dir}/${cur.dir}/**"/>
+      <exclude name="${derby.dir}/${cur.dir}/catalog/**"/>
+      <exclude name="${derby.dir}/${cur.dir}/depend/**"/>
       <!-- <compilerarg value="-Xlint:unchecked"/> -->
     </javac>
+
     <copy file="${derby.engine.src.dir}/${derby.dir}/${cur.dir}/catalog/metadata_net.properties" tofile="${out.dir}/org/apache/derby/impl/sql/catalog/metadata_net.properties"/>
   </target>
 

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=1483911&r1=1483910&r2=1483911&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 Fri May 17 16:52:52 2013
@@ -363,7 +363,7 @@ public	class DD_Version implements	Forma
 		
 		*/
 
-        HashSet  newlyCreatedRoutines = new HashSet();
+        HashSet<String>  newlyCreatedRoutines = new HashSet<String>();
         
 		if (fromMajorVersionNumber <= DataDictionary.DD_VERSION_DERBY_10_3)
 		{

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=1483911&r1=1483910&r2=1483911&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 Fri May 17 16:52:52 2013
@@ -188,7 +188,7 @@ import org.apache.derby.impl.sql.execute
  * that stores the information in the system catalogs.
  */
 public final class	DataDictionaryImpl
-	implements DataDictionary, CacheableFactory, ModuleControl, ModuleSupportable,java.security.PrivilegedAction
+	implements DataDictionary, CacheableFactory, ModuleControl, ModuleSupportable,java.security.PrivilegedAction<Properties>
 {
 
     private static final String		CFG_SYSTABLES_ID = "SystablesIdentifier";
@@ -399,7 +399,7 @@ public final class	DataDictionaryImpl
 	CacheManager	nameTdCache;
 	private CacheManager	spsNameCache;
     private CacheManager sequenceGeneratorCache;
-	private Hashtable		spsIdHash;
+	private Hashtable<UUID,SPSDescriptor>		spsIdHash;
 	// private Hashtable       spsTextHash;
 	int				tdCacheSize;
 	int				stmtCacheSize;
@@ -422,7 +422,7 @@ public final class	DataDictionaryImpl
 	/* Number of readers that start in DDL_MODE */
 	volatile int	readersInDDLMode;
 
-    private HashMap sequenceIDs;
+    private HashMap<String,HashMap<String,String>> sequenceIDs;
     
 	/**
 		True if the database is read only and requires
@@ -700,14 +700,14 @@ public final class	DataDictionaryImpl
 					"SPSNameDescriptorCache",
 					stmtCacheSize,
 					stmtCacheSize);
-			spsIdHash = new Hashtable(stmtCacheSize);
+			spsIdHash = new Hashtable<UUID,SPSDescriptor>(stmtCacheSize);
 			// spsTextHash = new Hashtable(stmtCacheSize);
 		}
 
 		sequenceGeneratorCache = cf.newCacheManager
             ( this, "SequenceGeneratorCache", seqgenCacheSize, seqgenCacheSize );
 
-        sequenceIDs = new HashMap();
+        sequenceIDs = new HashMap<String,HashMap<String,String>>();
 
 		/* Get the object to coordinate cache transitions */
 		cacheCoordinator = new ShExLockable();
@@ -789,7 +789,7 @@ public final class	DataDictionaryImpl
 				String userName = IdUtil.getUserNameFromURLProps(startParams);
 				authorizationDatabaseOwner = IdUtil.getUserAuthorizationId(userName);
 
-                HashSet newlyCreatedRoutines = new HashSet();
+                HashSet<String> newlyCreatedRoutines = new HashSet<String>();
                 
 				// create any required tables.
 				createDictionaryTables(startParams, bootingTC, ddg);
@@ -1801,7 +1801,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false,
 						isolationLevel,
 						tc);
@@ -1844,7 +1844,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false,
                         TransactionController.ISOLATION_REPEATABLE_READ,
 						tc);
@@ -2267,7 +2267,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 
 		return finishTableDescriptor(td);
@@ -2377,7 +2377,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 
 		return finishTableDescriptor(td);
@@ -2677,7 +2677,7 @@ public final class	DataDictionaryImpl
              (ScanQualifier [][]) null,
              ti,
              (TupleDescriptor) null,
-             (List) null,
+             (List<TupleDescriptor>) null,
              true,
              TransactionController.ISOLATION_REPEATABLE_READ,
              tc);
@@ -2754,7 +2754,7 @@ public final class	DataDictionaryImpl
              (ScanQualifier [][]) null,
              aliasTI,
              (TupleDescriptor) null,
-             (List) null,
+             (List<TupleDescriptor>) null,
              true,
              TransactionController.ISOLATION_REPEATABLE_READ,
              tc);
@@ -2820,7 +2820,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(DefaultDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -3058,7 +3058,7 @@ public final class	DataDictionaryImpl
 
 		// First get all the ColPermsDescriptor for the given tableid from   
 		//SYSCOLPERMS using getDescriptorViaIndex(). 
-		List permissionDescriptorsList;//all ColPermsDescriptor for given tableid
+		List<TupleDescriptor> permissionDescriptorsList;//all ColPermsDescriptor for given tableid
 		DataValueDescriptor		tableIDOrderable = getIDValueAsCHAR(tableID);
 		TabInfoImpl	ti = getNonCoreTI(SYSCOLPERMS_CATALOG_NUM);
 		SYSCOLPERMSRowFactory rf = (SYSCOLPERMSRowFactory) ti.getCatalogRowFactory();
@@ -3350,10 +3350,10 @@ public final class	DataDictionaryImpl
 	 * FIXME: Need to cache graph and invalidate when role graph is modified.
 	 * Currently, we always read from SYSROLES.
 	 */
-	HashMap getRoleGrantGraph(TransactionController tc, boolean inverse)
+	HashMap<String,List<RoleGrantDescriptor>> getRoleGrantGraph(TransactionController tc, boolean inverse)
 			throws StandardException {
 
-		HashMap hm = new HashMap();
+		HashMap<String,List<RoleGrantDescriptor>> hm = new HashMap<String,List<RoleGrantDescriptor>>();
 
 		TabInfoImpl ti = getNonCoreTI(SYSROLES_CATALOG_NUM);
 		SYSROLESRowFactory rf = (SYSROLESRowFactory) ti.getCatalogRowFactory();
@@ -3409,9 +3409,9 @@ public final class	DataDictionaryImpl
 				hashKey = grantDescr.getRoleName();
 			}
 
-			List arcs = (List)hm.get(hashKey);
+			List<RoleGrantDescriptor> arcs = hm.get(hashKey);
 			if (arcs == null) {
-				arcs = new LinkedList();
+				arcs = new LinkedList<RoleGrantDescriptor>();
 			}
 
 			arcs.add(grantDescr);
@@ -3901,7 +3901,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 
 		if (vd != null)
@@ -3963,7 +3963,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -4006,7 +4006,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
         return r;
 	}
@@ -4065,7 +4065,7 @@ public final class	DataDictionaryImpl
 		if ((spsNameCache != null) && 
 			(getCacheMode() == DataDictionary.COMPILE_ONLY_MODE))
 		{
-			sps = (SPSDescriptor)spsIdHash.get(uuid);
+			sps = spsIdHash.get(uuid);
 			if (sps != null)
 			{
 				//System.out.println("found in hash table ");
@@ -4188,7 +4188,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 
 		return spsd;
@@ -4282,7 +4282,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	
 		/*
@@ -4294,7 +4294,7 @@ public final class	DataDictionaryImpl
 		*/
 		if (spsd != null)
 		{
-            List tmpDefaults = new ArrayList();
+            List<DataValueDescriptor> tmpDefaults = new ArrayList<DataValueDescriptor>();
             spsd.setParams(getSPSParams(spsd, tmpDefaults));
             Object[] defaults = tmpDefaults.toArray();
 			spsd.setParameterDefaults(defaults);
@@ -4405,7 +4405,7 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-    public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List defaults)
+    public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, List<DataValueDescriptor> defaults)
         throws StandardException
 	{
 		ColumnDescriptorList cdl = new ColumnDescriptorList();
@@ -4714,12 +4714,12 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public List getAllSPSDescriptors()
+	public List<TupleDescriptor> getAllSPSDescriptors()
 		throws StandardException
 	{
 		TabInfoImpl					ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
 
-		List list = newSList();
+		List<TupleDescriptor> list = newSList();
 
         // DERBY-3870: The compiled plan may not be possible to deserialize
         // during upgrade. Skip the column that contains the compiled plan to
@@ -4804,13 +4804,12 @@ public final class	DataDictionaryImpl
      * Comparator that can be used for sorting lists of column references
      * on the position they have in the SQL query string.
      */
-    private static final Comparator OFFSET_COMPARATOR = new Comparator() {
-        public int compare(Object o1, Object o2) {
+    private static final Comparator<ColumnReference> OFFSET_COMPARATOR = new Comparator<ColumnReference>() {
+        public int compare(ColumnReference o1, ColumnReference o2) {
             // Return negative int, zero, or positive int if the first column
             // reference has an offset which is smaller than, equal to, or
             // greater than the offset of the second column reference.
-            return ((ColumnReference) o1).getBeginOffset() -
-                    ((ColumnReference) o2).getBeginOffset();
+            return o1.getBeginOffset() - o2.getBeginOffset();
         }
     };
 
@@ -4943,9 +4942,9 @@ public final class	DataDictionaryImpl
 			}
 		}
 
-		CollectNodesVisitor visitor = new CollectNodesVisitor(ColumnReference.class);
+		CollectNodesVisitor<ColumnReference> visitor = new CollectNodesVisitor<ColumnReference>(ColumnReference.class);
 		actionStmt.accept(visitor);
-		List refs = visitor.getList();
+		List<ColumnReference> refs = visitor.getList();
 		/* we need to sort on position in string, beetle 4324
 		 */
 		Collections.sort(refs, OFFSET_COMPARATOR);
@@ -5422,7 +5421,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -5462,7 +5461,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -5755,7 +5754,7 @@ public final class	DataDictionaryImpl
 		throws StandardException
 	{
 		TabInfoImpl ti = getNonCoreTI(SYSSTATISTICS_CATALOG_NUM);
-		List statDescriptorList = newSList();
+		List<TupleDescriptor> statDescriptorList = newSList();
 		DataValueDescriptor UUIDStringOrderable;
 
 		/* set up the start/stop position for the scan */
@@ -6134,7 +6133,7 @@ public final class	DataDictionaryImpl
 						ScanQualifier [][] scanQualifiers,
 						TabInfoImpl ti,
 						TupleDescriptor parentTupleDescriptor,
-						List list)
+						ConstraintDescriptorList list)
 			throws StandardException
 	{
 		SYSCONSTRAINTSRowFactory rf = (SYSCONSTRAINTSRowFactory) ti.getCatalogRowFactory();
@@ -6237,7 +6236,7 @@ public final class	DataDictionaryImpl
 	public TableDescriptor getConstraintTableDescriptor(UUID constraintId)
 			throws StandardException
 	{
-		List slist = getConstraints(constraintId,
+		List<UUID> slist = getConstraints(constraintId,
 											SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_INDEX1_ID,
 											SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_TABLEID);
 
@@ -6265,7 +6264,7 @@ public final class	DataDictionaryImpl
 			throws StandardException
 	{
 		TabInfoImpl ti = getNonCoreTI(SYSFOREIGNKEYS_CATALOG_NUM);
-		List fkList = newSList();
+		List<TupleDescriptor> fkList = newSList();
 
 		// Use constraintIDOrderable in both start and stop positions for scan
 		DataValueDescriptor constraintIDOrderable = getIDValueAsCHAR(constraintId);
@@ -6310,7 +6309,7 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public List getConstraints(UUID uuid, int indexId, int columnNum)
+	public List<UUID> getConstraints(UUID uuid, int indexId, int columnNum)
 			throws StandardException
 	{
 		ExecIndexRow	  		indexRow1;
@@ -6322,7 +6321,7 @@ public final class	DataDictionaryImpl
 		TabInfoImpl 				ti = getNonCoreTI(SYSCONSTRAINTS_CATALOG_NUM);
 		SYSCONSTRAINTSRowFactory rf = (SYSCONSTRAINTSRowFactory) ti.getCatalogRowFactory();
 		TableDescriptor			td = null;
-		List					slist = newSList();
+		List<UUID>				slist = new ArrayList<UUID>();
 
 		if (SanityManager.DEBUG)
 		{
@@ -6704,7 +6703,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -6880,7 +6879,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -6924,10 +6923,10 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc)
+	public Hashtable<Long,ConglomerateDescriptor> hashAllConglomerateDescriptorsByNumber(TransactionController tc)
 		throws StandardException
 	{
-		Hashtable ht = new Hashtable();
+		Hashtable<Long,ConglomerateDescriptor> ht = new Hashtable<Long,ConglomerateDescriptor>();
 		ConglomerateDescriptor	  cd = null;
 		ScanController			  scanController;
 		ExecRow 				  outRow;
@@ -6981,10 +6980,10 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public Hashtable hashAllTableDescriptorsByTableId(TransactionController tc)
+	public Hashtable<UUID,TableDescriptor> hashAllTableDescriptorsByTableId(TransactionController tc)
 		throws StandardException
 	{
-		Hashtable ht = new Hashtable();
+		Hashtable<UUID,TableDescriptor> ht = new Hashtable<UUID,TableDescriptor>();
 		ScanController			  scanController;
 		ExecRow 				  outRow;
 		TabInfoImpl					ti = coreInfo[SYSTABLES_CORE_NUM];
@@ -7065,7 +7064,7 @@ public final class	DataDictionaryImpl
 		DataValueDescriptor		UUIDStringOrderable;
 		TabInfoImpl					ti = coreInfo[SYSCONGLOMERATES_CORE_NUM];
 
-		List cdl = newSList();
+		List<TupleDescriptor> cdl = newSList();
 
         if ( uuid != null )
         {
@@ -7249,7 +7248,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						forUpdate);
 	}
 									
@@ -7477,10 +7476,10 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public List getDependentsDescriptorList(String dependentID)
+	public List<TupleDescriptor> getDependentsDescriptorList(String dependentID)
 		throws StandardException
 	{
-		List					ddlList = newSList();
+		List<TupleDescriptor>					ddlList = newSList();
 		DataValueDescriptor		dependentIDOrderable;
 		TabInfoImpl					ti = getNonCoreTI(SYSDEPENDS_CATALOG_NUM);
 
@@ -7514,10 +7513,10 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public List getProvidersDescriptorList(String providerID)
+	public List<TupleDescriptor> getProvidersDescriptorList(String providerID)
 		throws StandardException
 	{
-		List					ddlList = newSList();
+		List<TupleDescriptor>					ddlList = newSList();
 		DataValueDescriptor		providerIDOrderable;
 		TabInfoImpl					ti = getNonCoreTI(SYSDEPENDS_CATALOG_NUM);
 
@@ -7549,14 +7548,14 @@ public final class	DataDictionaryImpl
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-	public List getAllDependencyDescriptorsList()
+	public List<TupleDescriptor> getAllDependencyDescriptorsList()
 				throws StandardException
 	{
 		ScanController			 	scanController;
 		TransactionController	  	tc;
 		ExecRow					  	outRow;
 		ExecRow					 	templateRow;
-		List						ddl = newSList();
+		List<TupleDescriptor>				ddl = newSList();
 		TabInfoImpl						ti = getNonCoreTI(SYSDEPENDS_CATALOG_NUM);
 		SYSDEPENDSRowFactory		rf = (SYSDEPENDSRowFactory) ti.getCatalogRowFactory();
 
@@ -7741,7 +7740,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -7785,7 +7784,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -7797,18 +7796,18 @@ public final class	DataDictionaryImpl
 		but instead look up the routines from the in-meomry table driven
 		by the contents of SYSFUN_FUNCTIONS.
 	 */
-	public java.util.List getRoutineList(String schemaID, String routineName, char nameSpace)
+	public java.util.List<AliasDescriptor> getRoutineList(String schemaID, String routineName, char nameSpace)
 		throws StandardException {
 
+        // We expect to find just a single function, since we currently
+        // don't support multiple routines with the same name, but use a
+        // list to support future extension.
+        List<AliasDescriptor> list = new ArrayList<AliasDescriptor>(1);
+
 		// Special in-memory table lookup for SYSFUN
 		if (schemaID.equals(SchemaDescriptor.SYSFUN_SCHEMA_UUID)
 				&& nameSpace == AliasInfo.ALIAS_NAME_SPACE_FUNCTION_AS_CHAR)
 		{
-            // We expect to find just a single function, since we currently
-            // don't support multiple routines with the same name, but use a
-            // list to support future extension.
-            List list = new ArrayList(1);
-
 			for (int f = 0; f < DataDictionaryImpl.SYSFUN_FUNCTIONS.length; f++)
 			{
 				String[] details = DataDictionaryImpl.SYSFUN_FUNCTIONS[f];
@@ -7862,9 +7861,9 @@ public final class	DataDictionaryImpl
 		}
 		
 		AliasDescriptor ad = getAliasDescriptor(schemaID, routineName, nameSpace);
-        return ad == null ?
-                Collections.EMPTY_LIST :
-                Collections.singletonList(ad);
+        if ( ad !=null ) { list.add( ad ); }
+
+        return list;
 	}
 
 	/** 
@@ -7952,7 +7951,7 @@ public final class	DataDictionaryImpl
              (ScanQualifier [][]) null,
              ti,
              (TupleDescriptor) null,
-             (List) null,
+             (List<TupleDescriptor>) null,
              false
              );
 	}
@@ -8370,7 +8369,7 @@ public final class	DataDictionaryImpl
                 (DataValueDescriptor[]) null, // stop position -through last row
                 0);                           // stopSearchOperation - none
 
-        Map schemas = new HashMap();
+        Map<String,Object> schemas = new HashMap<String,Object>();
 
         try
         {
@@ -8387,7 +8386,7 @@ public final class	DataDictionaryImpl
             scanController.close();
         }
 
-        Iterator i = schemas.keySet().iterator();
+        Iterator<String> i = schemas.keySet().iterator();
         FileResource fh = tc.getFileHandler();
 
         // remove those directories with their contents
@@ -8395,7 +8394,7 @@ public final class	DataDictionaryImpl
             fh.removeJarDir(
                     FileResource.JAR_DIRECTORY_NAME +
                     File.separatorChar +
-                    (String)i.next());
+                    i.next());
         }
     }
 
@@ -9379,7 +9378,7 @@ public final class	DataDictionaryImpl
 						ScanQualifier [][] scanQualifiers,
 						TabInfoImpl ti,
 						TupleDescriptor parentTupleDescriptor,
-						List list,
+						List<TupleDescriptor> list,
 						boolean forUpdate)
 			throws StandardException
 	{
@@ -9432,7 +9431,7 @@ public final class	DataDictionaryImpl
 						ScanQualifier [][] scanQualifiers,
 						TabInfoImpl ti,
 						TupleDescriptor parentTupleDescriptor,
-						List list,
+						List<TupleDescriptor> list,
 						boolean forUpdate,
 						int isolationLevel,
 						TransactionController tc)
@@ -9460,7 +9459,7 @@ public final class	DataDictionaryImpl
 						ScanQualifier [][] scanQualifiers,
 						TabInfoImpl ti,
 						TupleDescriptor parentTupleDescriptor,
-						List list,
+						List<TupleDescriptor> list,
 						boolean forUpdate,
 						int isolationLevel,
 						TransactionController tc)
@@ -9721,7 +9720,7 @@ public final class	DataDictionaryImpl
 						ScanQualifier [][] scanQualifiers,
 						TabInfoImpl ti,
 						TupleDescriptor parentTupleDescriptor,
-						List list)
+						List<TupleDescriptor> list)
 			throws StandardException
 	{
 		CatalogRowFactory		rf = ti.getCatalogRowFactory();
@@ -10330,7 +10329,7 @@ public final class	DataDictionaryImpl
              (ScanQualifier[][]) null,
              ti,
              (TupleDescriptor) null,
-             (List) null,
+             (List<TupleDescriptor>) null,
              false,
              TransactionController.ISOLATION_REPEATABLE_READ,
              tc);
@@ -10714,7 +10713,7 @@ public final class	DataDictionaryImpl
     boolean               isDeterministic,
     boolean               hasVarargs,
     TypeDescriptor          return_type,
-    HashSet               newlyCreatedRoutines,
+    HashSet<String>               newlyCreatedRoutines,
     TransactionController   tc,
     String procClass)
         throws StandardException
@@ -10835,7 +10834,7 @@ public final class	DataDictionaryImpl
     boolean               isDeterministic,
     boolean               hasVarargs,
     TypeDescriptor          return_type,
-    HashSet               newlyCreatedRoutines,
+    HashSet<String>               newlyCreatedRoutines,
     TransactionController   tc)
         throws StandardException
     {
@@ -10861,7 +10860,7 @@ public final class	DataDictionaryImpl
 	 * @exception  StandardException  Standard exception policy.
      **/
     private final void create_SYSCS_procedures(
-                                               TransactionController   tc, HashSet newlyCreatedRoutines )
+                                               TransactionController   tc, HashSet<String> newlyCreatedRoutines )
         throws StandardException
     {
         // Types used for routine parameters and return types, all nullable.
@@ -11514,7 +11513,7 @@ public final class	DataDictionaryImpl
 	 * @exception  StandardException  Standard exception policy.
      **/
     protected final void create_SYSIBM_procedures(
-                                                  TransactionController   tc, HashSet newlyCreatedRoutines )
+                                                  TransactionController   tc, HashSet<String> newlyCreatedRoutines )
         throws StandardException
     {
         /*
@@ -12125,7 +12124,7 @@ public final class	DataDictionaryImpl
      **/
     void create_10_1_system_procedures(
     TransactionController   tc,
-    HashSet               newlyCreatedRoutines,
+    HashSet<String>               newlyCreatedRoutines,
     UUID                    sysUtilUUID)
 		throws StandardException
     { 
@@ -12186,7 +12185,7 @@ public final class	DataDictionaryImpl
      **/
     void create_10_2_system_procedures(
     TransactionController   tc,
-    HashSet               newlyCreatedRoutines,
+    HashSet<String>               newlyCreatedRoutines,
     UUID                    sysUtilUUID)
 		throws StandardException
     {
@@ -12334,7 +12333,7 @@ public final class	DataDictionaryImpl
      **/
     private void create_10_3_system_procedures_SYSIBM(
         TransactionController   tc,
-        HashSet               newlyCreatedRoutines )
+        HashSet<String>               newlyCreatedRoutines )
         throws StandardException {
         //create 10.3 functions used by LOB methods.
         UUID schema_uuid = getSysIBMSchemaDescriptor().getUUID();
@@ -12735,7 +12734,7 @@ public final class	DataDictionaryImpl
      * @param newlyCreatedRoutines set of routines we are creating (used to add permissions later on)
      * @throws StandardException Standard exception policy.
      */
-    void create_10_5_system_procedures(TransactionController tc, HashSet newlyCreatedRoutines )
+    void create_10_5_system_procedures(TransactionController tc, HashSet<String> newlyCreatedRoutines )
     throws StandardException
     {
         // Create the procedures in the SYSCS_UTIL schema.
@@ -12777,7 +12776,7 @@ public final class	DataDictionaryImpl
      * @throws StandardException Standard exception policy.
      */
     void create_10_6_system_procedures(TransactionController tc,
-            HashSet newlyCreatedRoutines)
+            HashSet<String> newlyCreatedRoutines)
     throws StandardException
     {
         // Create the procedures in the SYSCS_UTIL schema.
@@ -12876,7 +12875,7 @@ public final class	DataDictionaryImpl
      * @param newlyCreatedRoutines set of routines we are creating (used to add permissions later on)
      * @throws StandardException Standard exception policy. 
      */
-    void create_10_3_system_procedures(TransactionController tc, HashSet newlyCreatedRoutines ) 
+    void create_10_3_system_procedures(TransactionController tc, HashSet<String> newlyCreatedRoutines ) 
     throws StandardException {
         // Create the procedures in the SYSCS_UTIL schema.
         create_10_3_system_procedures_SYSCS_UTIL(tc, newlyCreatedRoutines );
@@ -12895,7 +12894,7 @@ public final class	DataDictionaryImpl
      * @param newlyCreatedRoutines set of routines we are creating (used to add permissions later on)
      * @exception  StandardException  Standard exception policy.
      **/
-    void create_10_3_system_procedures_SYSCS_UTIL( TransactionController   tc, HashSet newlyCreatedRoutines )
+    void create_10_3_system_procedures_SYSCS_UTIL( TransactionController   tc, HashSet<String> newlyCreatedRoutines )
         throws StandardException
     {
         UUID  sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
@@ -13160,7 +13159,7 @@ public final class	DataDictionaryImpl
      * @param tc an instance of the Transaction Controller.
      * @param newlyCreatedRoutines set of routines we are creating (used to add permissions later on)
      **/
-    void create_10_9_system_procedures( TransactionController   tc, HashSet newlyCreatedRoutines )
+    void create_10_9_system_procedures( TransactionController   tc, HashSet<String> newlyCreatedRoutines )
         throws StandardException
     {
         UUID  sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
@@ -13358,7 +13357,7 @@ public final class	DataDictionaryImpl
      * @param tc an instance of the Transaction Controller.
      * @param newlyCreatedRoutines set of routines we are creating (used to add permissions later on)
      **/
-    void create_10_10_system_procedures( TransactionController   tc, HashSet newlyCreatedRoutines )
+    void create_10_10_system_procedures( TransactionController   tc, HashSet<String> newlyCreatedRoutines )
         throws StandardException
     {
         UUID  sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
@@ -13422,10 +13421,10 @@ public final class	DataDictionaryImpl
 	private String spsSet;
 	private final synchronized Properties getQueryDescriptions(boolean net) {
 		spsSet = net ? "metadata_net.properties" : "/org/apache/derby/impl/jdbc/metadata.properties";
-		return (Properties) java.security.AccessController.doPrivileged(this);
+		return java.security.AccessController.doPrivileged(this);
 	}
 
-	public final Object run() {
+	public final Properties run() {
 		// SECURITY PERMISSION - IP3
 		Properties p = new Properties();
 		try {
@@ -13439,8 +13438,8 @@ public final class	DataDictionaryImpl
 	}
 
 
-	private static List newSList() {
-		return java.util.Collections.synchronizedList(new java.util.LinkedList());
+	private static List<TupleDescriptor> newSList() {
+		return java.util.Collections.synchronizedList(new java.util.LinkedList<TupleDescriptor>());
 	}
 
     /**
@@ -13828,7 +13827,7 @@ public final class	DataDictionaryImpl
                                  (ScanQualifier [][]) null,
                                  ti,
                                  (TupleDescriptor) null,
-                                 (List) null,
+                                 (List<TupleDescriptor>) null,
                                  false);
     } // end of getUncachedPermissionsDescriptor
 
@@ -13968,7 +13967,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -14011,7 +14010,7 @@ public final class	DataDictionaryImpl
 						(ScanQualifier [][]) null,
 						ti,
 						(TupleDescriptor) null,
-						(List) null,
+						(List<TupleDescriptor>) null,
 						false);
 	}
 
@@ -14063,7 +14062,7 @@ public final class	DataDictionaryImpl
 				(ScanQualifier [][]) null,
 				ti,
 				(TupleDescriptor) null,
-				(List) null,
+				(List<TupleDescriptor>) null,
 				false);
 	}
 
@@ -14186,7 +14185,7 @@ public final class	DataDictionaryImpl
                         (ScanQualifier[][]) null,
                         ti,
                         (TupleDescriptor) null,
-                        (List) null,
+                        (List<TupleDescriptor>) null,
                         false);
 
         putSequenceID( sequenceDescriptor );
@@ -14226,7 +14225,7 @@ public final class	DataDictionaryImpl
                         (ScanQualifier[][]) null,
                         ti,
                         (TupleDescriptor) null,
-                        (List) null,
+                        (List<TupleDescriptor>) null,
                         false);
 
         putSequenceID( sequenceDescriptor );
@@ -14245,10 +14244,10 @@ public final class	DataDictionaryImpl
         String  sequenceName = sd.getSequenceName();
         String  uuid = sd.getUUID().toString();
         
-        HashMap sequencesInSchema = (HashMap) sequenceIDs.get( schemaName );
+        HashMap<String,String> sequencesInSchema = sequenceIDs.get( schemaName );
         if ( sequencesInSchema == null )
         {
-            sequencesInSchema = new HashMap();
+            sequencesInSchema = new HashMap<String,String>();
             sequenceIDs.put( schemaName, sequencesInSchema );
         }
 
@@ -14268,7 +14267,7 @@ public final class	DataDictionaryImpl
         String  schemaName = schema.getSchemaName();
         String  sequenceName = sd.getSequenceName();
         
-        HashMap sequencesInSchema = (HashMap) sequenceIDs.get( schemaName );
+        HashMap<String,String> sequencesInSchema = (HashMap<String,String>) sequenceIDs.get( schemaName );
         if ( sequencesInSchema == null ) { return; }
 
         if ( sequencesInSchema.get( sequenceName ) == null ) { return; }
@@ -14285,7 +14284,7 @@ public final class	DataDictionaryImpl
     private String  getSequenceID( String schemaName, String sequenceName )
         throws StandardException
     {
-        HashMap sequencesInSchema = (HashMap) sequenceIDs.get( schemaName );
+        HashMap<String,String> sequencesInSchema = sequenceIDs.get( schemaName );
         if ( sequencesInSchema != null )
         {
             String  uuid = (String) sequencesInSchema.get( sequenceName );

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/RoleClosureIteratorImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/RoleClosureIteratorImpl.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/RoleClosureIteratorImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/RoleClosureIteratorImpl.java Fri May 17 16:52:52 2013
@@ -57,7 +57,7 @@ public class RoleClosureIteratorImpl imp
      *   <li>Value: none</li>
      * </ul>
      */
-    private HashMap seenSoFar;
+    private HashMap<String,Object> seenSoFar;
 
     /**
      * Holds the grant graph.
@@ -67,18 +67,18 @@ public class RoleClosureIteratorImpl imp
      *        in graph</li>
      * </ul>
      */
-    private HashMap graph;
+    private HashMap<String,List<RoleGrantDescriptor>> graph;
 
     /**
      * Holds discovered, but not yet handed out, roles in the closure.
      */
-    private List lifo;
+    private List<RoleGrantDescriptor> lifo;
 
     /**
      * Last node returned by next; a logical pointer into the arcs
      * list of a node we are currently processing.
      */
-    private Iterator currNodeIter;
+    private Iterator<RoleGrantDescriptor> currNodeIter;
 
     /**
      * DataDictionaryImpl used to get closure graph
@@ -120,8 +120,8 @@ public class RoleClosureIteratorImpl imp
         this.root = root;
         this.dd = dd;
         this.tc = tc;
-        seenSoFar = new HashMap();
-        lifo      = new ArrayList(); // remaining work stack
+        seenSoFar = new HashMap<String,Object>();
+        lifo      = new ArrayList<RoleGrantDescriptor>(); // remaining work stack
 
         RoleGrantDescriptor dummy = new RoleGrantDescriptor
             (null,
@@ -131,7 +131,7 @@ public class RoleClosureIteratorImpl imp
              null,
              false,
              false);
-        List dummyList = new ArrayList();
+        List<RoleGrantDescriptor> dummyList = new ArrayList<RoleGrantDescriptor>();
         dummyList.add(dummy);
         currNodeIter = dummyList.iterator();
         initial = true;
@@ -150,7 +150,7 @@ public class RoleClosureIteratorImpl imp
         } else if (graph == null) {
             // We get here the second time next is called.
             graph = dd.getRoleGrantGraph(tc, inverse);
-            List outArcs = (List)graph.get(root);
+            List<RoleGrantDescriptor> outArcs = graph.get(root);
             if (outArcs != null) {
                 currNodeIter = outArcs.iterator();
             }
@@ -182,12 +182,12 @@ public class RoleClosureIteratorImpl imp
 
                 while (lifo.size() > 0 && currNodeIter == null) {
 
-                    newNode = (RoleGrantDescriptor)lifo.remove(lifo.size() - 1);
+                    newNode = lifo.remove(lifo.size() - 1);
 
                     // In the example (see interface doc), the
                     // iterator of outgoing arcs for f (grant inverse)
                     // would contain {e,c,d}.
-                    List outArcs = (List)graph.get(
+                    List<RoleGrantDescriptor> outArcs = graph.get(
                         inverse? newNode.getRoleName(): newNode.getGrantee());
 
                     if (outArcs != null) {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java Fri May 17 16:52:52 2013
@@ -35,9 +35,9 @@ import org.apache.derby.iapi.sql.compile
  * parameter.
  *
  */
-public class CollectNodesVisitor implements Visitor
+public class CollectNodesVisitor<T extends Visitable> implements Visitor
 {
-    private final List nodeList;
+    private final List<T> nodeList;
     private final Class nodeClass;
     private final Class skipOverClass;
 
@@ -62,7 +62,7 @@ public class CollectNodesVisitor impleme
 	 */
 	public CollectNodesVisitor(Class nodeClass, Class skipOverClass)
 	{
-        this.nodeList = new ArrayList();
+        this.nodeList = new ArrayList<T>();
         this.nodeClass = nodeClass;
 		this.skipOverClass = skipOverClass;
 	}
@@ -93,7 +93,7 @@ public class CollectNodesVisitor impleme
 	{
 		if (nodeClass.isInstance(node))
 		{
-			nodeList.add(node);
+			nodeList.add( (T) node);
 		}
 		return node;
 	}
@@ -122,7 +122,7 @@ public class CollectNodesVisitor impleme
      * is never {@code null}.
 	 *
 	 */
-	public List getList()
+	public List<T> getList()
 	{
 		return nodeList;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java?rev=1483911&r1=1483910&r2=1483911&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java Fri May 17 16:52:52 2013
@@ -46,6 +46,7 @@ import org.apache.derby.iapi.sql.depend.
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 import org.apache.derby.iapi.sql.dictionary.DependencyDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;
 import org.apache.derby.iapi.sql.dictionary.ViewDescriptor;
 import org.apache.derby.iapi.store.access.TransactionController;
 
@@ -86,7 +87,7 @@ public class BasicDependencyManager impl
      * 
      */
     //@GuardedBy("this")
-    private final Map dependents = new HashMap();
+    private final Map<UUID,List<Dependency>> dependents = new HashMap<UUID,List<Dependency>>();
     
     /**
      * Map of in-memory dependencies for Providers.
@@ -100,7 +101,7 @@ public class BasicDependencyManager impl
      * 
      */    
     //@GuardedBy("this")
-    private final Map providers = new HashMap();
+    private final Map<UUID,List<Dependency>> providers = new HashMap<UUID,List<Dependency>>();
 
 
 	//
@@ -312,7 +313,7 @@ public class BasicDependencyManager impl
 	private void coreInvalidateFor(Provider p, int action, LanguageConnectionContext lcc)
 		throws StandardException
 	{
-		List list = getDependents(p);
+		List<Dependency> list = getDependents(p);
 
         if (list.isEmpty()) {
 			return;
@@ -354,7 +355,7 @@ public class BasicDependencyManager impl
 			{
 				if (ei >= list.size())
 					continue;
-				Dependency dependency = (Dependency) list.get(ei);
+				Dependency dependency = list.get(ei);
 
 				Dependent dep = dependency.getDependent();
 
@@ -573,7 +574,7 @@ public class BasicDependencyManager impl
 		}
 
         Iterator provIter = list.iterator();
-        List pih = new ArrayList();
+        List<ProviderInfo> pih = new ArrayList<ProviderInfo>();
         while (provIter.hasNext()) {
             Provider p = (Provider)provIter.next();
 
@@ -895,11 +896,11 @@ public class BasicDependencyManager impl
 	 *
 	 * @return boolean		Whether or not the dependency get added.
 	 */
-    private boolean addDependencyToTable(Map table, Object key, Dependency dy) {
+    private boolean addDependencyToTable(Map<UUID,List<Dependency>> table, UUID key, Dependency dy) {
 
-		List deps = (List) table.get(key);
+		List<Dependency> deps = (List<Dependency>) table.get(key);
 		if (deps == null) {
-            deps = new ArrayList();
+            deps = new ArrayList<Dependency>();
 			deps.add(dy);
 			table.put(key, deps);
 		}
@@ -908,9 +909,9 @@ public class BasicDependencyManager impl
 			UUID	provKey = dy.getProvider().getObjectID();
 			UUID	depKey = dy.getDependent().getObjectID();
 
-			for (ListIterator depsIT = deps.listIterator();  depsIT.hasNext(); )
+			for (ListIterator<Dependency> depsIT = deps.listIterator();  depsIT.hasNext(); )
 			{
-				Dependency curDY = (Dependency)depsIT.next();
+				Dependency curDY = depsIT.next();
 				if (curDY.getProvider().getObjectID().equals(provKey) &&
 					curDY.getDependent().getObjectID().equals(depKey))
 				{
@@ -954,7 +955,7 @@ public class BasicDependencyManager impl
 	}
 
 	/**
-	 * Replace the DependencyDescriptors in an List with Dependencys.
+	 * Turn a list of DependencyDescriptors into a list of Dependencies.
 	 *
 	 * @param storedList	The List of DependencyDescriptors representing
 	 *						stored dependencies.
@@ -965,10 +966,12 @@ public class BasicDependencyManager impl
 	 *
 	 * @exception StandardException thrown if something goes wrong
 	 */
-	private List getDependencyDescriptorList(List storedList,
+	private List<Dependency> getDependencyDescriptorList(List<TupleDescriptor> storedList,
 			Provider providerForList)
 		throws StandardException
 	{
+        List<Dependency>    retval = new ArrayList<Dependency>();
+        
 		if (storedList.size() != 0)
 		{
 			/* For each DependencyDescriptor, we need to instantiate
@@ -978,7 +981,7 @@ public class BasicDependencyManager impl
 			 * back into the same place in the List
 			 * so that the call gets an enumerations of Dependencys.
 			 */
-			for (ListIterator depsIterator = storedList.listIterator();
+			for (ListIterator<TupleDescriptor> depsIterator = storedList.listIterator();
 				 depsIterator.hasNext(); ) 
 			{
 				Dependent 			tempD;
@@ -1010,11 +1013,11 @@ public class BasicDependencyManager impl
 						
 					}
 
-				depsIterator.set(new BasicDependency(tempD, tempP));
+				retval.add( new BasicDependency( tempD, tempP ) );
 			}
 		}
 
-		return storedList;
+		return retval;
 	}
 
 	/**
@@ -1038,8 +1041,8 @@ public class BasicDependencyManager impl
      * @return A list of providers (possibly empty).
      * @throws StandardException thrown if something goes wrong
      */
-    private List getProviders (Dependent d) throws StandardException {
-        List provs = new ArrayList();
+    private List<Provider> getProviders (Dependent d) throws StandardException {
+        List<Provider> provs = new ArrayList<Provider>();
         synchronized (this) {
             List deps = (List) dependents.get(d.getObjectID());
             if (deps != null) {
@@ -1053,15 +1056,14 @@ public class BasicDependencyManager impl
         // If the dependent is persistent, we have to take stored dependencies
         // into consideration as well.
         if (d.isPersistent()) {
-			List storedList = getDependencyDescriptorList(
-								dd.getDependentsDescriptorList(
-												d.getObjectID().toString()
-															),
-								(Provider) null
-													);
-            Iterator depIter = storedList.iterator();
+			List<Dependency> storedList = getDependencyDescriptorList
+                (
+                 dd.getDependentsDescriptorList( d.getObjectID().toString() ),
+                 (Provider) null
+                 );
+            Iterator<Dependency> depIter = storedList.iterator();
             while (depIter.hasNext()) {
-                provs.add(((Dependency)depIter.next()).getProvider());
+                provs.add((depIter.next()).getProvider());
             }
 		}
         return provs;
@@ -1076,11 +1078,11 @@ public class BasicDependencyManager impl
      * @return A list of dependents (possibly empty).
      * @throws StandardException if something goes wrong
 	 */
-	private List getDependents (Provider p) 
+	private List<Dependency> getDependents (Provider p) 
 			throws StandardException {
-        List deps = new ArrayList();
+        List<Dependency> deps = new ArrayList<Dependency>();
         synchronized (this) {
-            List memDeps = (List) providers.get(p.getObjectID());
+            List<Dependency> memDeps = providers.get(p.getObjectID());
             if (memDeps != null) {
                 deps.addAll(memDeps);
             }
@@ -1089,12 +1091,11 @@ public class BasicDependencyManager impl
         // If the provider is persistent, then we have to add providers for
         // stored dependencies as well.
         if (p.isPersistent()) {
-			List storedList = getDependencyDescriptorList(
-								dd.getProvidersDescriptorList(
-												p.getObjectID().toString()
-															),
-							p
-													);
+			List<Dependency> storedList = getDependencyDescriptorList
+                (
+                 dd.getProvidersDescriptorList( p.getObjectID().toString() ),
+                 p
+                 );
             deps.addAll(storedList);
         }
         return deps;



Mime
View raw message