cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r606896 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/query/ test/java/org/apache/cayenne/access/jdbc/
Date Wed, 26 Dec 2007 12:48:36 GMT
Author: aadamchik
Date: Wed Dec 26 04:48:34 2007
New Revision: 606896

URL: http://svn.apache.org/viewvc?rev=606896&view=rev
Log:
generics

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/EJBQLQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/NamedQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/EJBQLSelectTranslatorTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java?rev=606896&r1=606895&r2=606896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/EJBQLTranslationContext.java
Wed Dec 26 04:48:34 2007
@@ -37,13 +37,13 @@
 public class EJBQLTranslationContext {
 
     private Map<String, String> tableAliases;
-    private Map boundParameters;
+    private Map<String, Object> boundParameters;
     private StringBuilder mainBuffer;
     private StringBuilder currentBuffer;
     private EJBQLCompiledExpression compiledExpression;
     private Map<String, Object> attributes;
     private Map<String, String> reusableJoins;
-    private Map parameters;
+    private Map<Object, Object> parameters;
     private Map<String, String> idAliases;
     private int columnAliasPosition;
     private EJBQLTranslatorFactory translatorFactory;
@@ -54,7 +54,7 @@
     private boolean appendingResultColumns;
 
     public EJBQLTranslationContext(EJBQLCompiledExpression compiledExpression,
-            Map parameters, EJBQLTranslatorFactory translatorFactory) {
+            Map<Object, Object> parameters, EJBQLTranslatorFactory translatorFactory)
{
         this.compiledExpression = compiledExpression;
         this.mainBuffer = new StringBuilder();
         this.currentBuffer = mainBuffer;
@@ -128,8 +128,8 @@
     }
 
     /**
-     * Inserts a marker in the SQL, mapped to a StringBuilder that can be later filled with
-     * content.
+     * Inserts a marker in the SQL, mapped to a StringBuilder that can be later filled
+     * with content.
      */
     void markCurrentPosition(String marker) {
         // ensure buffer is created for the marker
@@ -266,7 +266,7 @@
      */
     String bindParameter(Object value, String prefix) {
         if (boundParameters == null) {
-            boundParameters = new HashMap();
+            boundParameters = new HashMap<String, Object>();
         }
 
         String var = prefix + boundParameters.size();
@@ -307,8 +307,8 @@
      * such alias hasn't been used, it is created on the fly.
      */
     protected String getTableAlias(String idPath, String tableName) {
-        
-        if(!isUsingAliases()) {
+
+        if (!isUsingAliases()) {
             return tableName;
         }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/EJBQLQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/EJBQLQuery.java?rev=606896&r1=606895&r2=606896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/EJBQLQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/EJBQLQuery.java
Wed Dec 26 04:48:34 2007
@@ -101,7 +101,7 @@
      * Returns unmodifiable map of combined named and positional parameters. Positional
      * parameter keys are Integers, while named parameter keys are strings.
      */
-    public Map<String, ?> getParameters() {
+    public Map<Object, Object> getParameters() {
         return parameters != null
                 ? Collections.unmodifiableMap(parameters)
                 : Collections.EMPTY_MAP;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/NamedQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/NamedQuery.java?rev=606896&r1=606895&r2=606896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/NamedQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/NamedQuery.java
Wed Dec 26 04:48:34 2007
@@ -41,7 +41,7 @@
  */
 public class NamedQuery extends IndirectQuery {
 
-    protected Map<String, ?> parameters;
+    protected Map<String, Object> parameters;
 
     protected boolean forceNoCache;
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/EJBQLSelectTranslatorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/EJBQLSelectTranslatorTest.java?rev=606896&r1=606895&r2=606896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/EJBQLSelectTranslatorTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/EJBQLSelectTranslatorTest.java
Wed Dec 26 04:48:34 2007
@@ -34,7 +34,7 @@
         return translateSelect(ejbql, Collections.EMPTY_MAP);
     }
 
-    private SQLTemplate translateSelect(String ejbql, Map<?,?> parameters) {
+    private SQLTemplate translateSelect(String ejbql, Map<Object, Object> parameters)
{
         EJBQLParser parser = EJBQLParserFactory.getParser();
         EJBQLCompiledExpression select = parser.compile(ejbql, getDomain()
                 .getEntityResolver());



Mime
View raw message