click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadr...@apache.org
Subject svn commit: r955765 - /click/trunk/click/extras/src/org/apache/click/extras/cayenne/CayenneTemplate.java
Date Thu, 17 Jun 2010 22:16:53 GMT
Author: aadrian
Date: Thu Jun 17 22:16:52 2010
New Revision: 955765

URL: http://svn.apache.org/viewvc?rev=955765&view=rev
Log:
generify

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/cayenne/CayenneTemplate.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/cayenne/CayenneTemplate.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/cayenne/CayenneTemplate.java?rev=955765&r1=955764&r2=955765&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/cayenne/CayenneTemplate.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/cayenne/CayenneTemplate.java Thu
Jun 17 22:16:52 2010
@@ -68,8 +68,8 @@ public class CayenneTemplate {
      * @param dataObjectClass the data object class to create and register
      * @return the new registered data object
      */
-    protected DataObject newObject(Class dataObjectClass) {
-        return (DataObject) getDataContext().newObject(dataObjectClass);
+    protected DataObject newObject(Class<DataObject> dataObjectClass) {
+        return getDataContext().newObject(dataObjectClass);
     }
 
     /**
@@ -79,8 +79,8 @@ public class CayenneTemplate {
      * @param dataObjectClass the data object class to create and register
      * @return the new registered data object
      */
-    protected DataObject createAndRegisterNewObject(Class dataObjectClass) {
-        return (DataObject) getDataContext().newObject(dataObjectClass);
+    protected DataObject createAndRegisterNewObject(Class<DataObject> dataObjectClass)
{
+        return getDataContext().newObject(dataObjectClass);
     }
 
     /**
@@ -355,7 +355,7 @@ public class CayenneTemplate {
      * @param parameters the Map of query parameter names and values
      * @return the array of update counts
      */
-    protected int[] performNonSelectingQuery(String queryName, Map parameters) {
+    protected int[] performNonSelectingQuery(String queryName, Map<String, ?> parameters)
{
         return getDataContext().performNonSelectingQuery(queryName, parameters);
     }
 



Mime
View raw message