db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1345655 - in /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque: Torque.java TorqueInstance.java
Date Sun, 03 Jun 2012 11:27:57 GMT
Author: tfischer
Date: Sun Jun  3 11:27:57 2012
New Revision: 1345655

URL: http://svn.apache.org/viewvc?rev=1345655&view=rev
Log:
adopted for using generics in AbstractBaseManager

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java?rev=1345655&r1=1345654&r2=1345655&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java Sun
Jun  3 11:27:57 2012
@@ -190,7 +190,7 @@ public final class Torque
      *
      * @return The requested Manager.
      */
-    public static AbstractBaseManager getManager(String name)
+    public static AbstractBaseManager<?> getManager(String name)
     {
         return getInstance().getManager(name);
     }
@@ -204,7 +204,7 @@ public final class Torque
      *
      * @return a Manager
      */
-    public static AbstractBaseManager getManager(String name,
+    public static AbstractBaseManager<?> getManager(String name,
             String defaultClassName)
     {
         return getInstance().getManager(name, defaultClassName);

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java?rev=1345655&r1=1345654&r2=1345655&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
Sun Jun  3 11:27:57 2012
@@ -82,7 +82,7 @@ public class TorqueInstance
             = Collections.synchronizedMap(new HashMap<String, Database>());
 
     /** A repository of Manager instances. */
-    private Map<String, AbstractBaseManager> managers;
+    private Map<String, AbstractBaseManager<?>> managers;
 
     /** A repository of idBroker instances. */
     private final Set<IDBroker> idBrokers = new HashSet<IDBroker>();
@@ -675,7 +675,7 @@ public class TorqueInstance
     private synchronized void initManager(String name, String className)
             throws TorqueException
     {
-        AbstractBaseManager manager = managers.get(name);
+        AbstractBaseManager<?> manager = managers.get(name);
 
         if (manager == null)
         {
@@ -683,7 +683,7 @@ public class TorqueInstance
             {
                 try
                 {
-                    manager = (AbstractBaseManager)
+                    manager = (AbstractBaseManager<?>)
                             Class.forName(className).newInstance();
                     managers.put(name, manager);
                 }
@@ -762,9 +762,9 @@ public class TorqueInstance
      * @param name name of the manager
      * @return a Manager
      */
-    public AbstractBaseManager getManager(String name)
+    public AbstractBaseManager<?> getManager(String name)
     {
-        AbstractBaseManager m = managers.get(name);
+        AbstractBaseManager<?> m = managers.get(name);
         if (m == null)
         {
             log.error("No configured manager for key " + name + ".");
@@ -781,10 +781,10 @@ public class TorqueInstance
      *
      * @return a Manager
      */
-    public AbstractBaseManager getManager(String name,
+    public AbstractBaseManager<?> getManager(String name,
             String defaultClassName)
     {
-        AbstractBaseManager m = managers.get(name);
+        AbstractBaseManager<?> m = managers.get(name);
         if (m == null)
         {
             log.debug("Added late Manager mapping for Class: "
@@ -830,13 +830,13 @@ public class TorqueInstance
         // shut down the cache managers
         synchronized (managers)
         {
-            for (Iterator<Map.Entry<String, AbstractBaseManager>> it
+            for (Iterator<Map.Entry<String, AbstractBaseManager<?>>> it
                     = managers.entrySet().iterator(); it.hasNext();)
             {
-                Map.Entry<String, AbstractBaseManager> mentry
+                Map.Entry<String, AbstractBaseManager<?>> mentry
                         = it.next();
 
-                AbstractBaseManager manager = mentry.getValue();
+                AbstractBaseManager<?> manager = mentry.getValue();
                 manager.dispose();
                 it.remove();
             }
@@ -895,7 +895,7 @@ public class TorqueInstance
      */
     private void resetConfiguration()
     {
-        managers = new HashMap<String, AbstractBaseManager>();
+        managers = new HashMap<String, AbstractBaseManager<?>>();
         isInit = false;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message