cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r880993 [3/4] - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/a...
Date Mon, 16 Nov 2009 22:06:38 GMT
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/IncrementalSelectQuery.java Mon Nov 16 22:06:17 2009
@@ -37,6 +37,7 @@
 import org.apache.cayenne.query.SQLAction;
 import org.apache.cayenne.query.SQLActionVisitor;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.reflect.ClassDescriptor;
 import org.apache.cayenne.util.XMLEncoder;
 
@@ -150,13 +151,8 @@
     }
 
     @Override
-    public void addOrdering(String sortPathSpec, boolean isAscending, boolean ignoreCase) {
-        query.addOrdering(sortPathSpec, isAscending, ignoreCase);
-    }
-
-    @Override
-    public void addOrdering(String sortPathSpec, boolean isAscending) {
-        query.addOrdering(sortPathSpec, isAscending);
+    public void addOrdering(String sortPathSpec, SortOrder order) {
+        query.addOrdering(sortPathSpec, order);
     }
 
     @Override
@@ -264,24 +260,6 @@
         return query.isFetchingDataRows();
     }
 
-    /**
-     * @deprecated since 3.0
-     */
-    @Deprecated
-    @Override
-    public boolean isRefreshingObjects() {
-        return query.isRefreshingObjects();
-    }
-
-    /**
-     * @deprecated since 3.0. Inheritance resolving is not optional anymore.
-     */
-    @Deprecated
-    @Override
-    public boolean isResolvingInherited() {
-        return query.isResolvingInherited();
-    }
-
     @Override
     public void orQualifier(Expression e) {
         query.orQualifier(e);
@@ -352,24 +330,6 @@
         query.setQualifier(qualifier);
     }
 
-    /**
-     * @deprecated since 3.0 as wrapped method is also deprecated.
-     */
-    @Deprecated
-    @Override
-    public void setRefreshingObjects(boolean flag) {
-        query.setRefreshingObjects(flag);
-    }
-
-    /**
-     * @deprecated since 3.0 as wrapped method is also deprecated.
-     */
-    @Deprecated
-    @Override
-    public void setResolvingInherited(boolean b) {
-        query.setResolvingInherited(b);
-    }
-
     @Override
     public void setRoot(Object value) {
         query.setRoot(value);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/RangeQuery.java Mon Nov 16 22:06:17 2009
@@ -91,14 +91,6 @@
             public int getFetchOffset() {
                 return fetchOffset;
             }
-            
-            /**
-             * @deprecated since 3.0
-             */
-            @Deprecated
-            public int getFetchStartIndex() {
-                return getFetchOffset();
-            }
 
             public int getFetchLimit() {
                 return fetchLimit;
@@ -142,7 +134,7 @@
             public Procedure getProcedure() {
                 throw new UnsupportedOperationException();
             }
-            
+
             public Map<String, String> getPathSplitAliases() {
                 throw new UnsupportedOperationException();
             }
@@ -151,10 +143,6 @@
                 throw new UnsupportedOperationException();
             }
 
-            public boolean isResolvingInherited() {
-                throw new UnsupportedOperationException();
-            }
-
             public int getStatementFetchSize() {
                 return 0;
             }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ResourceLocator.java Mon Nov 16 22:06:17 2009
@@ -20,7 +20,6 @@
 package org.apache.cayenne.util;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -36,7 +35,6 @@
 
 /**
  * Utility class to find resources (files, etc.), using a preconfigured strategy.
- * 
  */
 public class ResourceLocator implements ResourceFinder {
 
@@ -56,55 +54,6 @@
     protected ClassLoader classLoader;
 
     /**
-     * Returns a resource as InputStream if it is found in CLASSPATH or <code>null</code>
-     * otherwise. Lookup is normally performed in all JAR and ZIP files and directories
-     * available to the ClassLoader.
-     * 
-     * @deprecated since 3.0 unused.
-     */
-    public static InputStream findResourceInClasspath(String name) {
-        try {
-            URL url = findURLInClasspath(name);
-            if (url != null) {
-                logObj.debug("resource found in classpath: " + url);
-                return url.openStream();
-            }
-            else {
-                logObj.debug("resource not found in classpath: " + name);
-                return null;
-            }
-        }
-        catch (IOException ioex) {
-            return null;
-        }
-    }
-
-    /**
-     * Returns a resource as InputStream if it is found in the filesystem or
-     * <code>null</code> otherwise. Lookup is first performed relative to the user's
-     * home directory (as defined by "user.home" system property), and then relative to
-     * the current directory.
-     * 
-     * @deprecated since 3.0 unused
-     */
-    public static InputStream findResourceInFileSystem(String name) {
-        try {
-            File file = findFileInFileSystem(name);
-            if (file != null) {
-                logObj.debug("resource found in file system: " + file);
-                return new FileInputStream(file);
-            }
-            else {
-                logObj.debug("resource not found in file system: " + name);
-                return null;
-            }
-        }
-        catch (IOException ioex) {
-            return null;
-        }
-    }
-
-    /**
      * Looks up a file in the filesystem. First looks in the user home directory, then in
      * the current directory.
      * 
@@ -217,30 +166,6 @@
     }
 
     /**
-     * Returns a base URL as a String from which this class was loaded. This is normally a
-     * JAR or a file URL, but it is ClassLoader dependent.
-     * 
-     * @deprecated since 3.0 unused.
-     */
-    public static String classBaseUrl(Class<?> aClass) {
-        String pathToClass = aClass.getName().replace('.', '/') + ".class";
-        ClassLoader classLoader = aClass.getClassLoader();
-
-        if (classLoader == null) {
-            classLoader = ClassLoader.getSystemClassLoader();
-        }
-
-        URL selfUrl = classLoader.getResource(pathToClass);
-
-        if (selfUrl == null) {
-            return null;
-        }
-
-        String urlString = selfUrl.toExternalForm();
-        return urlString.substring(0, urlString.length() - pathToClass.length());
-    }
-
-    /**
      * Creates new ResourceLocator with default lookup policy including user home
      * directory, current directory and CLASSPATH.
      */
@@ -251,8 +176,8 @@
 
     /**
      * Returns an InputStream on the found resource using the lookup strategy configured
-     * for this ResourceLocator or <code>null</code> if no readable resource can be
-     * found for the given name.
+     * for this ResourceLocator or <code>null</code> if no readable resource can be found
+     * for the given name.
      */
     public InputStream findResourceStream(String name) {
         URL url = findResource(name);
@@ -514,8 +439,8 @@
      * Adds the given directory as a path for filesystem lookups. The directory is checked
      * for existence.
      * 
-     * @throws IllegalArgumentException if <code>path</code> is <code>null</code>,
-     *             not a directory or not readable.
+     * @throws IllegalArgumentException if <code>path</code> is <code>null</code>, not a
+     *             directory or not readable.
      */
     public void addFilesystemPath(File path) {
         if (path != null && path.isDirectory()) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOModelProcessor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOModelProcessor.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOModelProcessor.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOModelProcessor.java Mon Nov 16 22:06:17 2009
@@ -456,7 +456,7 @@
                 }
 
                 // set name instead of the actual attribute, as it may be inherited....
-                attr.setDbAttributeName(dbAttrName);
+                attr.setDbAttributePath(dbAttrName);
                 objEntity.addAttribute(attr);
             }
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjAttribute.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjAttribute.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjAttribute.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjAttribute.java Mon Nov 16 22:06:17 2009
@@ -23,7 +23,6 @@
 
 /**
  * An ObjAttribute extension that accomodates EOModel attributes.
- * 
  */
 public class EOObjAttribute extends ObjAttribute {
 
@@ -41,13 +40,6 @@
         super(name, type, parent);
     }
 
-    /**
-     * @deprecated since 2.0 use isReadOnly().
-     */
-    public boolean getReadOnly() {
-        return isReadOnly();
-    }
-
     public boolean isReadOnly() {
         return readOnly;
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjEntity.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjEntity.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjEntity.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOObjEntity.java Mon Nov 16 22:06:17 2009
@@ -37,7 +37,6 @@
 
 /**
  * An extension of ObjEntity used to accomodate extra EOModel entity properties.
- * 
  */
 public class EOObjEntity extends ObjEntity {
 
@@ -55,48 +54,6 @@
     }
 
     /**
-     * @deprecated since 2.0 use setSubclass()
-     */
-    public void setHasSuperClass(boolean value) {
-        setSubclass(value);
-    }
-
-    /**
-     * @deprecated since 2.0 use isSubclass()
-     */
-    public boolean getHasSuperClass() {
-        return isSubclass();
-    }
-
-    /**
-     * @deprecated since 2.0 use setServerOnly()
-     */
-    public void setIsClientEntity(boolean value) {
-        setServerOnly(!value);
-    }
-
-    /**
-     * @deprecated since 2.0 use !isServerOnly()
-     */
-    public boolean getIsClientEntity() {
-        return !isServerOnly();
-    }
-
-    /**
-     * @deprecated since 2.0 use setAbstractEntity()
-     */
-    public void setIsAbstractEntity(boolean value) {
-        setAbstractEntity(value);
-    }
-
-    /**
-     * @deprecated since 2.0 use isAbstractEntity()
-     */
-    public boolean getIsAbstractEntity() {
-        return isAbstractEntity();
-    }
-
-    /**
      * Returns stored EOQuery.
      * 
      * @since 1.1

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOQuery.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOQuery.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/EOQuery.java Mon Nov 16 22:06:17 2009
@@ -37,6 +37,7 @@
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 
 /**
  * A descriptor of SelectQuery loaded from EOModel. It is an informal "decorator" of
@@ -47,16 +48,16 @@
  */
 public class EOQuery extends SelectQuery {
 
-    protected Map<String,?> plistMap;
+    protected Map<String, ?> plistMap;
     protected Map bindings;
 
-    public EOQuery(ObjEntity root, Map<String,?> plistMap) {
+    public EOQuery(ObjEntity root, Map<String, ?> plistMap) {
         super(root);
         this.plistMap = plistMap;
         initFromPlist(plistMap);
     }
 
-    protected void initFromPlist(Map<String,?> plistMap) {
+    protected void initFromPlist(Map<String, ?> plistMap) {
 
         setDistinct("YES".equalsIgnoreCase((String) plistMap.get("usesDistinct")));
 
@@ -76,19 +77,20 @@
         }
 
         // sort orderings
-        List<Map<String,String>> orderings = (List<Map<String,String>>) plistMap.get("sortOrderings");
+        List<Map<String, String>> orderings = (List<Map<String, String>>) plistMap
+                .get("sortOrderings");
         if (orderings != null && !orderings.isEmpty()) {
-            for (Map<String,String> ordering : orderings) {
+            for (Map<String, String> ordering : orderings) {
                 boolean asc = !"compareDescending:".equals(ordering.get("selectorName"));
                 String key = ordering.get("key");
                 if (key != null) {
-                    addOrdering(key, asc);
+                    addOrdering(key, asc ? SortOrder.ASCENDING : SortOrder.DESCENDING);
                 }
             }
         }
 
         // qualifiers
-        Map<String,?> qualifierMap = (Map<String,?>) plistMap.get("qualifier");
+        Map<String, ?> qualifierMap = (Map<String, ?>) plistMap.get("qualifier");
         if (qualifierMap != null && !qualifierMap.isEmpty()) {
             this.setQualifier(makeQualifier(qualifierMap));
         }
@@ -104,7 +106,7 @@
 
         // data rows - note that we do not support fetching individual columns in the
         // modeler...
-        if(plistMap.containsKey("rawRowKeyPaths")) {
+        if (plistMap.containsKey("rawRowKeyPaths")) {
             setFetchingDataRows(true);
         }
     }
@@ -221,7 +223,7 @@
      * @param qualifierMap - FetchSpecification to translate
      * @return Expression equivalent to FetchSpecification
      */
-    public synchronized Expression makeQualifier(Map<String,?> qualifierMap) {
+    public synchronized Expression makeQualifier(Map<String, ?> qualifierMap) {
         if (qualifierMap == null) {
             return null;
         }
@@ -235,21 +237,21 @@
      * EOFetchSpecificationParser parses EOFetchSpecifications from a WebObjects-style
      * EOModel. It recursively builds Cayenne Expression objects and assembles them into
      * the final aggregate Expression.
-     * 
      */
     static class EOFetchSpecificationParser {
+
         // Xcode/EOModeler expressions have a colon at the end of the selector name
-        // (just like standard Objective-C syntax).  WOLips does not.  Add both
+        // (just like standard Objective-C syntax). WOLips does not. Add both
         // sets to the hash map to handle both types of models.
 
         // Selector strings (Java-base).
-        static final String IS_EQUAL_TO                 = "isEqualTo";
-        static final String IS_NOT_EQUAL_TO             = "isNotEqualTo";
-        static final String IS_LIKE                     = "isLike";
-        static final String CASE_INSENSITIVE_LIKE       = "isCaseInsensitiveLike";
-        static final String IS_LESS_THAN                = "isLessThan";
-        static final String IS_LESS_THAN_OR_EQUAL_TO    = "isLessThanOrEqualTo";
-        static final String IS_GREATER_THAN             = "isGreaterThan";
+        static final String IS_EQUAL_TO = "isEqualTo";
+        static final String IS_NOT_EQUAL_TO = "isNotEqualTo";
+        static final String IS_LIKE = "isLike";
+        static final String CASE_INSENSITIVE_LIKE = "isCaseInsensitiveLike";
+        static final String IS_LESS_THAN = "isLessThan";
+        static final String IS_LESS_THAN_OR_EQUAL_TO = "isLessThanOrEqualTo";
+        static final String IS_GREATER_THAN = "isGreaterThan";
         static final String IS_GREATER_THAN_OR_EQUAL_TO = "isGreaterThanOrEqualTo";
 
         private static final String OBJ_C = ":"; // Objective-C syntax addition.
@@ -271,25 +273,42 @@
                 selectorToExpressionBridge.put(IS_EQUAL_TO + OBJ_C, Expression.EQUAL_TO);
 
                 selectorToExpressionBridge.put(IS_NOT_EQUAL_TO, Expression.NOT_EQUAL_TO);
-                selectorToExpressionBridge.put(IS_NOT_EQUAL_TO + OBJ_C, Expression.NOT_EQUAL_TO);
+                selectorToExpressionBridge.put(
+                        IS_NOT_EQUAL_TO + OBJ_C,
+                        Expression.NOT_EQUAL_TO);
 
                 selectorToExpressionBridge.put(IS_LIKE, Expression.LIKE);
                 selectorToExpressionBridge.put(IS_LIKE + OBJ_C, Expression.LIKE);
 
-                selectorToExpressionBridge.put(CASE_INSENSITIVE_LIKE, Expression.LIKE_IGNORE_CASE);
-                selectorToExpressionBridge.put(CASE_INSENSITIVE_LIKE + OBJ_C, Expression.LIKE_IGNORE_CASE);
+                selectorToExpressionBridge.put(
+                        CASE_INSENSITIVE_LIKE,
+                        Expression.LIKE_IGNORE_CASE);
+                selectorToExpressionBridge.put(
+                        CASE_INSENSITIVE_LIKE + OBJ_C,
+                        Expression.LIKE_IGNORE_CASE);
 
                 selectorToExpressionBridge.put(IS_LESS_THAN, Expression.LESS_THAN);
-                selectorToExpressionBridge.put(IS_LESS_THAN + OBJ_C, Expression.LESS_THAN);
+                selectorToExpressionBridge
+                        .put(IS_LESS_THAN + OBJ_C, Expression.LESS_THAN);
 
-                selectorToExpressionBridge.put(IS_LESS_THAN_OR_EQUAL_TO, Expression.LESS_THAN_EQUAL_TO);
-                selectorToExpressionBridge.put(IS_LESS_THAN_OR_EQUAL_TO + OBJ_C, Expression.LESS_THAN_EQUAL_TO);
+                selectorToExpressionBridge.put(
+                        IS_LESS_THAN_OR_EQUAL_TO,
+                        Expression.LESS_THAN_EQUAL_TO);
+                selectorToExpressionBridge.put(
+                        IS_LESS_THAN_OR_EQUAL_TO + OBJ_C,
+                        Expression.LESS_THAN_EQUAL_TO);
 
                 selectorToExpressionBridge.put(IS_GREATER_THAN, Expression.GREATER_THAN);
-                selectorToExpressionBridge.put(IS_GREATER_THAN + OBJ_C, Expression.GREATER_THAN);
-
-                selectorToExpressionBridge.put(IS_GREATER_THAN_OR_EQUAL_TO, Expression.GREATER_THAN_EQUAL_TO);
-                selectorToExpressionBridge.put(IS_GREATER_THAN_OR_EQUAL_TO + OBJ_C, Expression.GREATER_THAN_EQUAL_TO);
+                selectorToExpressionBridge.put(
+                        IS_GREATER_THAN + OBJ_C,
+                        Expression.GREATER_THAN);
+
+                selectorToExpressionBridge.put(
+                        IS_GREATER_THAN_OR_EQUAL_TO,
+                        Expression.GREATER_THAN_EQUAL_TO);
+                selectorToExpressionBridge.put(
+                        IS_GREATER_THAN_OR_EQUAL_TO + OBJ_C,
+                        Expression.GREATER_THAN_EQUAL_TO);
             }
 
             return selectorToExpressionBridge;
@@ -437,7 +456,7 @@
                 Object value = qualifierMap.get("value");
 
                 if (value instanceof Map) {
-                    Map<String,String> valueMap = (Map<String,String>) value;
+                    Map<String, String> valueMap = (Map<String, String>) value;
                     String objClass = valueMap.get("class"); // can be a
                     // qualifier class
                     // or java type

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.java Mon Nov 16 22:06:17 2009
@@ -68,29 +68,6 @@
         }
     }
 
-    /**
-     * @deprecated since 3.0, use 'object(String)' instead.
-     */
-    public Object object() throws ParseException {
-        return object("");
-    }
-
-    /**
-     * @deprecated since 3.0, use 'map(String)' instead.
-     */
-    public final java.util.HashMap dictionary()
-                                   throws ParseException {
-            return (java.util.HashMap) map("");
-    }
-
-    /**
-     * @deprecated since 3.0, use 'collection(String)' instead.
-     */
-    public final java.util.ArrayList array()
-                                   throws ParseException {
-            return (java.util.ArrayList) collection("");
-    }
-
   final public Object object(String parentKeyPath) throws ParseException {
         Object node;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.jj
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.jj?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.jj (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/wocompat/parser/Parser.jj Mon Nov 16 22:06:17 2009
@@ -77,29 +77,6 @@
            return null;
         }
     }
-    
-    /**
-     * @deprecated since 3.0, use 'object(String)' instead.
-     */
-    public Object object() throws ParseException {
-        return object("");
-    }
-    
-    /**
-     * @deprecated since 3.0, use 'map(String)' instead.
-     */
-    public final java.util.HashMap dictionary()
-                                   throws ParseException {
-            return (java.util.HashMap) map("");                       
-    }
-    
-    /**
-     * @deprecated since 3.0, use 'collection(String)' instead.
-     */
-    public final java.util.ArrayList array()
-                                   throws ParseException {
-            return (java.util.ArrayList) collection("");                       
-    }
 }
 PARSER_END(Parser)
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/dotemplates/v1_2/subclass.vm
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/dotemplates/v1_2/subclass.vm?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/dotemplates/v1_2/subclass.vm (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/dotemplates/v1_2/subclass.vm Mon Nov 16 22:06:17 2009
@@ -27,12 +27,12 @@
 ##    importUtils - class for import statement management: See org.apache.cayenne.gen.ImportUtils
 ##
 ##
-${importUtils.setPackage($entityUtils.subPackageName)}##
-${importUtils.addReservedType("${entityUtils.subPackageName}.${entityUtils.subClassName}")}##
-${importUtils.addType("${entityUtils.superPackageName}.${entityUtils.superClassName}")}##
+${importUtils.setPackage($subPackageName)}##
+${importUtils.addReservedType("${subPackageName}.${subClassName}")}##
+${importUtils.addType("${superPackageName}.${superClassName}")}##
 ${importUtils.generate()}
 
-public#if("true" == "${object.getIsAbstract()}") abstract#end class ${entityUtils.subClassName} extends ${entityUtils.superClassName} {
+public#if("true" == "${object.getIsAbstract()}") abstract#end class ${subClassName} extends ${superClassName} {
 
 ##callbacks
 #foreach($cbname in ${entityUtils.callbackNames})

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java Mon Nov 16 22:06:17 2009
@@ -27,9 +27,9 @@
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.map.LifecycleEvent;
 import org.apache.cayenne.query.ObjectIdQuery;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.QueryCacheStrategy;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.reflect.LifecycleCallbackRegistry;
 import org.apache.cayenne.remote.ClientChannel;
 import org.apache.cayenne.remote.ClientConnection;
@@ -97,7 +97,7 @@
         CayenneContext clientContext = new CayenneContext(channel);
 
         SelectQuery query = new SelectQuery(ClientMtTableBool.class);
-        query.addOrdering("db:" + MtTableBool.ID_PK_COLUMN, true);
+        query.addOrdering("db:" + MtTableBool.ID_PK_COLUMN, SortOrder.ASCENDING);
 
         List<ClientMtTableBool> results = clientContext.performQuery(query);
         assertTrue(results.get(1).isBlablacheck());
@@ -471,7 +471,7 @@
         createTestData("testMeaningfulPK");
 
         SelectQuery query = new SelectQuery(ClientMtMeaningfulPk.class);
-        query.addOrdering(ClientMtMeaningfulPk.PK_PROPERTY, Ordering.DESC);
+        query.addOrdering(ClientMtMeaningfulPk.PK_PROPERTY, SortOrder.DESCENDING);
 
         UnitLocalConnection connection = new UnitLocalConnection(new ClientServerChannel(
                 getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
@@ -496,7 +496,7 @@
                 new Integer(1));
 
         SelectQuery q = new SelectQuery(ClientMtTable2.class);
-        q.addOrdering(ClientMtTable2.GLOBAL_ATTRIBUTE_PROPERTY, true);
+        q.addOrdering(ClientMtTable2.GLOBAL_ATTRIBUTE_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(ClientMtTable2.TABLE1_PROPERTY);
 
         List results = context.performQuery(q);
@@ -561,7 +561,7 @@
         CayenneContext context = new CayenneContext(channel);
 
         SelectQuery q = new SelectQuery(ClientMtTable1.class);
-        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, true);
+        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(ClientMtTable1.TABLE2ARRAY_PROPERTY);
 
         List results = context.performQuery(q);
@@ -616,7 +616,7 @@
         CayenneContext context = new CayenneContext(channel);
 
         SelectQuery q = new SelectQuery(ClientMtTable1.class);
-        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, true);
+        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(ClientMtTable1.TABLE2ARRAY_PROPERTY);
 
         List results = context.performQuery(q);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataRowTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataRowTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataRowTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataRowTest.java Mon Nov 16 22:06:17 2009
@@ -19,11 +19,7 @@
 
 package org.apache.cayenne;
 
-import org.apache.cayenne.map.DataMap;
-import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.EntityResolver;
-import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.remote.hessian.service.HessianUtil;
 import org.apache.cayenne.unit.CayenneCase;
 
@@ -62,62 +58,4 @@
         assertFalse(s3.getVersion() == s1.getVersion());
     }
 
-    /**
-     * @deprecated since 3.0 - unused.
-     */
-    public void testCreateObjectId() throws Exception {
-        // must provide a map container for the entities
-        DataMap entityContainer = new DataMap();
-
-        ObjEntity objEntity = new ObjEntity("456");
-        entityContainer.addObjEntity(objEntity);
-
-        DbEntity dbe = new DbEntity("123");
-        objEntity.setDbEntityName("123");
-        entityContainer.addDbEntity(dbe);
-
-        DbAttribute at = new DbAttribute("xyz");
-        at.setPrimaryKey(true);
-        dbe.addAttribute(at);
-
-        Class<?> entityClass = Number.class;
-        objEntity.setClassName(entityClass.getName());
-
-        // test same id created by different methods
-        DataRow map = new DataRow(10);
-        map.put(at.getName(), "123");
-
-        DataRow map2 = new DataRow(10);
-        map2.put(at.getName(), "123");
-
-        ObjectId ref = new ObjectId(objEntity.getName(), map);
-        ObjectId oid = map2.createObjectId(objEntity);
-
-        assertEquals(ref, oid);
-    }
-
-    /**
-     * @deprecated since 3.0 - unused.
-     */
-    public void testCreateObjectIdNulls() throws Exception {
-        // must provide a map container for the entities
-        DataMap entityContainer = new DataMap();
-
-        DbEntity dbe = new DbEntity("123");
-        entityContainer.addDbEntity(dbe);
-
-        DbAttribute at = new DbAttribute("xyz");
-        at.setPrimaryKey(true);
-        dbe.addAttribute(at);
-
-        // assert that data row is smart enough to throw on null ids...
-        DataRow map = new DataRow(10);
-        try {
-            map.createObjectId("T", dbe);
-            fail("Must have failed... Null pk");
-        }
-        catch (CayenneRuntimeException ex) {
-            // expected...
-        }
-    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java Mon Nov 16 22:06:17 2009
@@ -28,7 +28,6 @@
 
 /**
  * A noop ObjectContext used for unit testing.
- *
  */
 public class MockObjectContext implements ObjectContext {
 
@@ -100,13 +99,6 @@
     public void registerNewObject(Object object) {
     }
 
-    /**
-     * @deprecated since 3.0
-     */
-    @Deprecated
-    public void prepareForAccess(Persistent persistent, String property) {
-    }
-
     public void prepareForAccess(Persistent object, String property, boolean lazyFaulting) {
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/NestedCayenneContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/NestedCayenneContextTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/NestedCayenneContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/NestedCayenneContextTest.java Mon Nov 16 22:06:17 2009
@@ -26,6 +26,7 @@
 import org.apache.cayenne.graph.GraphDiff;
 import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.remote.RemoteCayenneCase;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
@@ -278,7 +279,7 @@
         ObjectContext child = context.createChildContext();
 
         SelectQuery q = new SelectQuery(ClientMtTable1.class);
-        q.addOrdering("globalAttribute1", true);
+        q.addOrdering("globalAttribute1", SortOrder.ASCENDING);
         q.addPrefetch(ClientMtTable1.TABLE2ARRAY_PROPERTY);
 
         List results = child.performQuery(q);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryTest.java Mon Nov 16 22:06:17 2009
@@ -27,8 +27,8 @@
 import org.apache.cayenne.cache.QueryCache;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.query.NamedQuery;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.remote.ClientChannel;
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
@@ -65,7 +65,7 @@
         createTestData("testPaginatedQueryServerCacheOverflow");
 
         SelectQuery query = new SelectQuery(ClientMtTable1.class);
-        query.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, Ordering.ASC);
+        query.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.ASCENDING);
         query.setPageSize(3);
 
         List<?> results = context.performQuery(query);
@@ -141,7 +141,7 @@
         createTestData("prepare");
 
         SelectQuery q = new SelectQuery("MtTable1");
-        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, true);
+        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.ASCENDING);
         List<?> results = context.performQuery(q);
 
         assertEquals(2, results.size());
@@ -154,7 +154,7 @@
         // result wasn't coincidental.
 
         q.clearOrderings();
-        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, false);
+        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.DESCENDING);
         List<?> results1 = context.performQuery(q);
 
         assertEquals(2, results1.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ClientServerChannelTest.java Mon Nov 16 22:06:17 2009
@@ -36,6 +36,7 @@
 import org.apache.cayenne.query.MockQuery;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.remote.QueryMessage;
 import org.apache.cayenne.remote.hessian.service.HessianUtil;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
@@ -217,7 +218,7 @@
         ClientServerChannel channel = new ClientServerChannel(context);
 
         SelectQuery q = new SelectQuery(ClientMtTable1.class);
-        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, true);
+        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(ClientMtTable1.TABLE2ARRAY_PROPERTY);
 
         // must pass through the serialization pipe before running query as
@@ -255,7 +256,7 @@
         ClientServerChannel channel = new ClientServerChannel(context);
 
         SelectQuery q = new SelectQuery(ClientMtTable1.class);
-        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, true);
+        q.addOrdering(ClientMtTable1.GLOBAL_ATTRIBUTE1_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(ClientMtTable1.TABLE2ARRAY_PROPERTY);
 
         // must pass through the serialization pipe before running query as

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextExtrasTest.java Mon Nov 16 22:06:17 2009
@@ -36,7 +36,6 @@
 import org.apache.cayenne.dba.JdbcPkGenerator;
 import org.apache.cayenne.dba.PkGenerator;
 import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.unit.CayenneCase;
@@ -175,19 +174,11 @@
 
         // setup mockup PK generator that will blow on PK request
         // to emulate an exception
-        PkGenerator newGenerator = new JdbcPkGenerator() {
-
-            @Override
-            public Object generatePkForDbEntity(DataNode node, DbEntity ent)
-                    throws Exception {
-                throw new CayenneRuntimeException("Synthetic error....");
-            }
-
-            @Override
-            public Object generatePk(DataNode node, DbAttribute pk)
-                    throws Exception {
-                throw new CayenneRuntimeException("Synthetic error....");
-            }
+        PkGenerator newGenerator = new JdbcPkGenerator(new JdbcAdapter()) {
+          @Override
+            public Object generatePk(DataNode node, DbAttribute pk) throws Exception {
+                throw new CayenneRuntimeException("Intentional");
+            }  
         };
 
         PkGenerator oldGenerator = getNode().getAdapter().getPkGenerator();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOrderingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOrderingTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOrderingTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOrderingTest.java Mon Nov 16 22:06:17 2009
@@ -25,8 +25,8 @@
 import org.apache.art.Artist;
 import org.apache.art.Painting;
 import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class DataContextOrderingTest extends CayenneCase {
@@ -59,8 +59,8 @@
         context.commitChanges();
 
         SelectQuery query = new SelectQuery(Artist.class);
-        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.DESC);
-        query.addOrdering(Artist.DATE_OF_BIRTH_PROPERTY, Ordering.DESC);
+        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.DESCENDING);
+        query.addOrdering(Artist.DATE_OF_BIRTH_PROPERTY, SortOrder.DESCENDING);
 
         List<Artist> list = context.performQuery(query);
         assertEquals(3, list.size());
@@ -106,8 +106,8 @@
         query1.andQualifier(ExpressionFactory.noMatchExp(
                 Artist.PAINTING_ARRAY_PROPERTY,
                 null));
-        query1.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.DESC);
-        query1.addOrdering(Artist.DATE_OF_BIRTH_PROPERTY, Ordering.DESC);
+        query1.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.DESCENDING);
+        query1.addOrdering(Artist.DATE_OF_BIRTH_PROPERTY, SortOrder.DESCENDING);
 
         List<Artist> list1 = context.performQuery(query1);
         assertEquals(2, list1.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java Mon Nov 16 22:06:17 2009
@@ -25,8 +25,8 @@
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.map.Entity;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class DataContextOuterJoinsTest extends CayenneCase {
@@ -44,7 +44,7 @@
         missingToManyQuery.andQualifier(ExpressionFactory.matchExp(
                 Artist.GROUP_ARRAY_PROPERTY + Entity.OUTER_JOIN_INDICATOR,
                 null));
-        missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         List<Artist> artists = createDataContext().performQuery(missingToManyQuery);
         assertEquals(1, artists.size());
@@ -59,7 +59,7 @@
         missingToManyQuery.andQualifier(ExpressionFactory.matchExp(
                 Artist.PAINTING_ARRAY_PROPERTY + Entity.OUTER_JOIN_INDICATOR,
                 null));
-        missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         List<Artist> artists = createDataContext().performQuery(missingToManyQuery);
         assertEquals(2, artists.size());
@@ -72,7 +72,7 @@
         mixedConditionQuery.orQualifier(ExpressionFactory.matchExp(
                 Artist.ARTIST_NAME_PROPERTY,
                 "AA1"));
-        mixedConditionQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        mixedConditionQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         artists = createDataContext().performQuery(mixedConditionQuery);
         assertEquals(3, artists.size());
@@ -87,7 +87,7 @@
 
         SelectQuery missingToManyQuery = new SelectQuery(Artist.class);
         missingToManyQuery.andQualifier(Expression.fromString("paintingArray+ = null"));
-        missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         List<Artist> artists = createDataContext().performQuery(missingToManyQuery);
         assertEquals(2, artists.size());
@@ -100,7 +100,7 @@
         mixedConditionQuery.orQualifier(ExpressionFactory.matchExp(
                 Artist.ARTIST_NAME_PROPERTY,
                 "AA1"));
-        mixedConditionQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        mixedConditionQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         artists = createDataContext().performQuery(mixedConditionQuery);
         assertEquals(3, artists.size());
@@ -115,7 +115,7 @@
 
         SelectQuery query = new SelectQuery(Painting.class);
 
-        query.addOrdering("toArtist+.artistName", Ordering.DESC);
+        query.addOrdering("toArtist+.artistName", SortOrder.DESCENDING);
 
         List<Artist> paintings = createDataContext().performQuery(query);
         assertEquals(3, paintings.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchExtrasTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchExtrasTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchExtrasTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchExtrasTest.java Mon Nov 16 22:06:17 2009
@@ -31,8 +31,8 @@
 import org.apache.cayenne.ValueHolder;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 /**
@@ -55,7 +55,7 @@
 
         SelectQuery q = new SelectQuery(CharPkTestEntity.class);
         q.addPrefetch("charFKs");
-        q.addOrdering(CharPkTestEntity.OTHER_COL_PROPERTY, Ordering.ASC);
+        q.addOrdering(CharPkTestEntity.OTHER_COL_PROPERTY, SortOrder.ASCENDING);
 
         List pks = context.performQuery(q);
         assertEquals(2, pks.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchQualifierOverlapTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchQualifierOverlapTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchQualifierOverlapTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchQualifierOverlapTest.java Mon Nov 16 22:06:17 2009
@@ -22,11 +22,11 @@
 
 import org.apache.art.Artist;
 import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.QueryChain;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class DataContextPrefetchQualifierOverlapTest extends CayenneCase {
@@ -140,7 +140,7 @@
                 PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
 
         query.orQualifier(ExpressionFactory.likeExp("artistName", "A%"));
-        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         List<Artist> result = createDataContext().performQuery(query);
         assertEquals(2, result.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPrefetchTest.java Mon Nov 16 22:06:17 2009
@@ -39,10 +39,10 @@
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.ObjRelationship;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.QueryCacheStrategy;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 
 /**
  */
@@ -138,7 +138,7 @@
         SelectQuery q = new SelectQuery(Artist.class);
         q.addPrefetch("artistExhibitArray").setSemantics(
                 PrefetchTreeNode.DISJOINT_PREFETCH_SEMANTICS);
-        q.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        q.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         List artists = context.performQuery(q);
 
@@ -176,7 +176,7 @@
         SelectQuery q = new SelectQuery(Artist.class);
         q.addPrefetch("artistExhibitArray").setSemantics(
                 PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
-        q.addOrdering(Artist.ARTIST_NAME_PROPERTY, Ordering.ASC);
+        q.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
 
         List artists = context.performQuery(q);
 
@@ -443,7 +443,7 @@
         Expression e = ExpressionFactory.likeExp("toArtist.artistName", "a%");
         SelectQuery q = new SelectQuery(Painting.class, e);
         q.addPrefetch(Painting.TO_PAINTING_INFO_PROPERTY);
-        q.addOrdering(Painting.PAINTING_TITLE_PROPERTY, true);
+        q.addOrdering(Painting.PAINTING_TITLE_PROPERTY, SortOrder.ASCENDING);
 
         List results = context.performQuery(q);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextRefreshQueryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextRefreshQueryTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextRefreshQueryTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextRefreshQueryTest.java Mon Nov 16 22:06:17 2009
@@ -88,7 +88,7 @@
         DataContext context = createDataContext();
 
         SelectQuery q = new SelectQuery(Painting.class);
-        q.addOrdering("db:PAINTING_ID", true);
+        q.addOrdering("db:PAINTING_ID", SortOrder.ASCENDING);
         List paints = context.performQuery(q);
 
         Painting p1 = (Painting) paints.get(0);
@@ -135,7 +135,7 @@
         DataContext context = createDataContext();
 
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering("db:ARTIST_ID", true);
+        q.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
         List artists = context.performQuery(q);
 
         Artist a1 = (Artist) artists.get(0);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java Mon Nov 16 22:06:17 2009
@@ -44,6 +44,7 @@
 import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 
 public class DataContextTest extends DataContextCase {
 
@@ -190,8 +191,7 @@
         // verify that the result is not messaged up
 
         SelectQuery query = new SelectQuery(Artist.class);
-        Ordering ordering = new Ordering("artistName", false);
-        ordering.setCaseInsensitive(true);
+        Ordering ordering = new Ordering("artistName", SortOrder.ASCENDING_INSENSITIVE);
         query.addOrdering(ordering);
         query.setDistinct(true);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/EmbeddingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/EmbeddingTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/EmbeddingTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/EmbeddingTest.java Mon Nov 16 22:06:17 2009
@@ -25,6 +25,7 @@
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.testdo.embeddable.EmbedEntity1;
 import org.apache.cayenne.testdo.embeddable.Embeddable1;
 import org.apache.cayenne.unit.AccessStack;
@@ -44,7 +45,7 @@
         createTestData("testSelect");
 
         SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.addOrdering(EmbedEntity1.NAME_PROPERTY, true);
+        query.addOrdering(EmbedEntity1.NAME_PROPERTY, SortOrder.ASCENDING);
 
         ObjectContext context = createDataContext();
 
@@ -115,7 +116,7 @@
         createTestData("testUpdate");
 
         SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.addOrdering(EmbedEntity1.NAME_PROPERTY, true);
+        query.addOrdering(EmbedEntity1.NAME_PROPERTY, SortOrder.ASCENDING);
 
         ObjectContext context = createDataContext();
         List results = context.performQuery(query);
@@ -138,7 +139,7 @@
         createTestData("testUpdate");
 
         SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.addOrdering(EmbedEntity1.NAME_PROPERTY, true);
+        query.addOrdering(EmbedEntity1.NAME_PROPERTY, SortOrder.ASCENDING);
 
         ObjectContext context = createDataContext();
         List results = context.performQuery(query);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/HorizontalInheritanceTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/HorizontalInheritanceTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/HorizontalInheritanceTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/HorizontalInheritanceTest.java Mon Nov 16 22:06:17 2009
@@ -24,6 +24,7 @@
 import org.apache.cayenne.query.QueryChain;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.testdo.horizontalinherit.SubEntity1;
 import org.apache.cayenne.unit.InheritanceCase;
 
@@ -87,7 +88,7 @@
         createDataContext().performGenericQuery(inserts);
 
         SelectQuery select = new SelectQuery(SubEntity1.class);
-        select.addOrdering(SubEntity1.SUB_ENTITY_STRING_ATTR_PROPERTY, true);
+        select.addOrdering(SubEntity1.SUB_ENTITY_STRING_ATTR_PROPERTY, SortOrder.ASCENDING);
 
         List<SubEntity1> result = createDataContext().performQuery(select);
         assertEquals(2, result.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/InheritanceTest.java Mon Nov 16 22:06:17 2009
@@ -24,10 +24,10 @@
 import java.util.List;
 
 import org.apache.cayenne.DataObjectUtils;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.testdo.inherit.AbstractPerson;
 import org.apache.cayenne.testdo.inherit.Address;
 import org.apache.cayenne.testdo.inherit.BaseEntity;
@@ -166,7 +166,7 @@
 
         SelectQuery query = new SelectQuery(PersonNotes.class);
         query.addPrefetch(PersonNotes.PERSON_PROPERTY);
-        query.addOrdering(PersonNotes.NOTES_PROPERTY, Ordering.ASC);
+        query.addOrdering(PersonNotes.NOTES_PROPERTY, SortOrder.ASCENDING);
 
         List<PersonNotes> notes = createDataContext().performQuery(query);
         assertEquals(2, notes.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/JointPrefetchTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/JointPrefetchTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/JointPrefetchTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/JointPrefetchTest.java Mon Nov 16 22:06:17 2009
@@ -43,6 +43,7 @@
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 /**
@@ -61,7 +62,7 @@
 
         // query with to-many joint prefetches
         SelectQuery q = new SelectQuery(Painting.class);
-        q.addOrdering("db:PAINTING_ID", true);
+        q.addOrdering("db:PAINTING_ID", SortOrder.ASCENDING);
         q.setFetchingDataRows(true);
         q.addPrefetch(Painting.TO_ARTIST_PROPERTY).setSemantics(
                 PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
@@ -163,7 +164,7 @@
 
         // query with to-many joint prefetches
         SelectQuery q = new SelectQuery(Painting.class);
-        q.addOrdering("db:PAINTING_ID", true);
+        q.addOrdering("db:PAINTING_ID", SortOrder.ASCENDING);
         q.addPrefetch(Painting.TO_ARTIST_PROPERTY).setSemantics(
                 PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java Mon Nov 16 22:06:17 2009
@@ -32,6 +32,7 @@
 import org.apache.cayenne.Persistent;
 import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class NestedDataContextReadTest extends CayenneCase {
@@ -346,7 +347,7 @@
 
         // run an ordered query, so we can address specific objects directly by index
         SelectQuery q = new SelectQuery(Painting.class);
-        q.addOrdering(Painting.PAINTING_TITLE_PROPERTY, true);
+        q.addOrdering(Painting.PAINTING_TITLE_PROPERTY, SortOrder.ASCENDING);
         List childSources = child.performQuery(q);
         assertEquals(5, childSources.size());
 
@@ -405,7 +406,7 @@
                 new Integer(33001));
 
         SelectQuery q = new SelectQuery(Painting.class);
-        q.addOrdering(Painting.PAINTING_TITLE_PROPERTY, true);
+        q.addOrdering(Painting.PAINTING_TITLE_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(Painting.TO_ARTIST_PROPERTY);
 
         List results = child.performQuery(q);
@@ -439,7 +440,7 @@
         ObjectContext child = parent.createChildContext();
 
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering(Artist.ARTIST_NAME_PROPERTY, true);
+        q.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
         q.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY);
 
         List results = child.performQuery(q);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java Mon Nov 16 22:06:17 2009
@@ -30,8 +30,8 @@
 import org.apache.cayenne.DataObjectUtils;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.PersistenceState;
-import org.apache.cayenne.Persistent;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class NestedDataContextWriteTest extends CayenneCase {
@@ -114,7 +114,7 @@
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Artist.class);
-        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, true);
+        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
         List objects = childContext.performQuery(query);
 
         assertEquals(4, objects.size());
@@ -186,7 +186,7 @@
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Artist.class);
-        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, true);
+        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
         List objects = childContext.performQuery(query);
 
         assertEquals(4, objects.size());
@@ -223,7 +223,7 @@
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Artist.class);
-        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, true);
+        query.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
         List objects = childContext.performQuery(query);
 
         assertEquals(4, objects.size());
@@ -290,7 +290,7 @@
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Painting.class);
-        query.addOrdering(Painting.PAINTING_TITLE_PROPERTY, true);
+        query.addOrdering(Painting.PAINTING_TITLE_PROPERTY, SortOrder.ASCENDING);
         List objects = childContext.performQuery(query);
 
         assertEquals(6, objects.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ObjectStoreTest.java Mon Nov 16 22:06:17 2009
@@ -19,10 +19,8 @@
 
 package org.apache.cayenne.access;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
-import java.util.List;
 
 import org.apache.art.Artist;
 import org.apache.art.Gallery;
@@ -60,42 +58,6 @@
         assertEquals(2, context.getObjectStore().registeredObjectsCount());
     }
 
-    /**
-     * @deprecated since 3.0
-     */
-    public void testCachedQueriesCount() throws Exception {
-        DataContext context = createDataContext();
-        assertEquals(0, context.getObjectStore().cachedQueriesCount());
-
-        context.getObjectStore().cacheQueryResult("result", new ArrayList());
-        assertEquals(1, context.getObjectStore().cachedQueriesCount());
-
-        // test refreshing the cache
-        context.getObjectStore().cacheQueryResult("result", new ArrayList());
-        assertEquals(1, context.getObjectStore().cachedQueriesCount());
-
-        // test new entry
-        context.getObjectStore().cacheQueryResult("result2", new ArrayList());
-        assertEquals(2, context.getObjectStore().cachedQueriesCount());
-    }
-
-    /**
-     * @deprecated since 3.0
-     */
-    public void testCachedQueryResult() throws Exception {
-        DataContext context = createDataContext();
-        assertNull(context.getObjectStore().getCachedQueryResult("result"));
-
-        List result = new ArrayList();
-        context.getObjectStore().cacheQueryResult("result", result);
-        assertSame(result, context.getObjectStore().getCachedQueryResult("result"));
-
-        // test refreshing the cache
-        List freshResult = new ArrayList();
-        context.getObjectStore().cacheQueryResult("result", freshResult);
-        assertSame(freshResult, context.getObjectStore().getCachedQueryResult("result"));
-    }
-
     public void testObjectsUnregistered() throws Exception {
         DataContext context = createDataContext();
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java Mon Nov 16 22:06:17 2009
@@ -25,6 +25,7 @@
 
 import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.testdo.locking.RelLockingTestEntity;
 import org.apache.cayenne.testdo.locking.SimpleLockingTestEntity;
 import org.apache.cayenne.unit.LockingCase;
@@ -311,7 +312,7 @@
     public void testSuccessLockingOnMixed() throws Exception {
         createTestData("testLockingOnMixed");
         SelectQuery query = new SelectQuery(SimpleLockingTestEntity.class);
-        query.addOrdering(new Ordering("db:LOCKING_TEST_ID", Ordering.ASC));
+        query.addOrdering(new Ordering("db:LOCKING_TEST_ID", SortOrder.ASCENDING));
 
         List allObjects = context.performQuery(query);
         assertEquals(3, allObjects.size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java Mon Nov 16 22:06:17 2009
@@ -27,9 +27,9 @@
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 /**
@@ -51,7 +51,7 @@
         SelectQuery q = new SelectQuery("Artist");
         q.setPageSize(6);
         q.setFetchingDataRows(true);
-        q.addOrdering("db:ARTIST_ID", Ordering.ASC);
+        q.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
 
         query = q;
         list = new SimpleIdIncrementalFaultList(super.createDataContext(), query);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java Mon Nov 16 22:06:17 2009
@@ -30,6 +30,7 @@
 import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 /**
@@ -76,7 +77,7 @@
         // make sure total number of objects is not divisable
         // by the page size, to test the last smaller page
         q.setPageSize(pageSize);
-        q.addOrdering("db:ARTIST_ID", Ordering.ASC);
+        q.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
         query = q;
         list = new SimpleIdIncrementalFaultList<Object>(createDataContext(), query);
     }
@@ -132,7 +133,7 @@
 
         SelectQuery q = new SelectQuery(Artist.class);
         q.setPageSize(6);
-        q.addOrdering("db:ARTIST_ID", Ordering.DESC);
+        q.addOrdering("db:ARTIST_ID", SortOrder.DESCENDING);
 
         SimpleIdIncrementalFaultList<?> list = new SimpleIdIncrementalFaultList<Object>(
                 context,
@@ -167,7 +168,7 @@
     public void testSort() throws Exception {
         prepareList(6);
 
-        new Ordering(Artist.ARTIST_NAME_PROPERTY, Ordering.DESC).orderList(list);
+        new Ordering(Artist.ARTIST_NAME_PROPERTY, SortOrder.DESCENDING).orderList(list);
 
         Iterator it = list.iterator();
         Artist previousArtist = null;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SingleTableInheritanceTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SingleTableInheritanceTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SingleTableInheritanceTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SingleTableInheritanceTest.java Mon Nov 16 22:06:17 2009
@@ -24,6 +24,7 @@
 import org.apache.cayenne.query.QueryChain;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.testdo.inherit.AbstractPerson;
 import org.apache.cayenne.testdo.inherit.Employee;
 import org.apache.cayenne.testdo.inherit.Manager;
@@ -106,7 +107,7 @@
         createDataContext().performGenericQuery(insert);
 
         SelectQuery select = new SelectQuery(AbstractPerson.class);
-        select.addOrdering("db:" + AbstractPerson.PERSON_ID_PK_COLUMN, true);
+        select.addOrdering("db:" + AbstractPerson.PERSON_ID_PK_COLUMN, SortOrder.ASCENDING);
         select.setPageSize(3);
 
         List<AbstractPerson> results = createDataContext().performQuery(select);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionTest.java Mon Nov 16 22:06:17 2009
@@ -36,6 +36,7 @@
 import org.apache.cayenne.query.SQLAction;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 /**
@@ -316,7 +317,7 @@
 
         MockOperationObserver observer = new MockOperationObserver();
         SelectQuery query = new SelectQuery(Artist.class);
-        query.addOrdering("db:ARTIST_ID", true);
+        query.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
         getDomain().performQueries(Collections.singletonList(query), observer);
 
         List data = observer.rowsForQuery(query);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java Mon Nov 16 22:06:17 2009
@@ -21,8 +21,8 @@
 
 import org.apache.art.Artist;
 import org.apache.cayenne.TranslationCase;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class OrderingTranslatorTest extends CayenneCase {
@@ -32,7 +32,7 @@
      */
     public void testDoTranslation1() throws Exception {
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering("artistName", Ordering.ASC);
+        q.addOrdering("artistName", SortOrder.ASCENDING);
 
         TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
 
@@ -58,7 +58,7 @@
      */
     public void testDoTranslation2() throws Exception {
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering("artistName", Ordering.DESC);
+        q.addOrdering("artistName", SortOrder.DESCENDING);
 
         TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
 
@@ -80,11 +80,11 @@
     }
 
     /**
-     * Tests ascending caese-insensitive ordering on string attribute.
+     * Tests ascending case-insensitive ordering on string attribute.
      */
     public void testDoTranslation4() throws Exception {
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering("artistName", Ordering.ASC, true);
+        q.addOrdering("artistName", SortOrder.ASCENDING_INSENSITIVE);
 
         TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
 
@@ -109,8 +109,8 @@
 
     public void testDoTranslation5() throws Exception {
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering("artistName", Ordering.DESC, true);
-        q.addOrdering("paintingArray.estimatedPrice", Ordering.ASC);
+        q.addOrdering("artistName", SortOrder.DESCENDING_INSENSITIVE);
+        q.addOrdering("paintingArray.estimatedPrice", SortOrder.ASCENDING);
 
         TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
 
@@ -141,8 +141,8 @@
 
     public void testDoTranslation6() throws Exception {
         SelectQuery q = new SelectQuery(Artist.class);
-        q.addOrdering("artistName", Ordering.ASC, true);
-        q.addOrdering("paintingArray.estimatedPrice", Ordering.ASC, true);
+        q.addOrdering("artistName", SortOrder.ASCENDING_INSENSITIVE);
+        q.addOrdering("paintingArray.estimatedPrice", SortOrder.ASCENDING_INSENSITIVE);
 
         TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
 
@@ -175,8 +175,8 @@
     public void testDoTranslation3() throws Exception {
         SelectQuery q = new SelectQuery(Artist.class);
 
-        q.addOrdering("artistName", Ordering.DESC);
-        q.addOrdering("paintingArray.estimatedPrice", Ordering.ASC);
+        q.addOrdering("artistName", SortOrder.DESCENDING);
+        q.addOrdering("paintingArray.estimatedPrice", SortOrder.ASCENDING);
 
         TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/SelectTranslatorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/SelectTranslatorTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/SelectTranslatorTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/SelectTranslatorTest.java Mon Nov 16 22:06:17 2009
@@ -36,10 +36,10 @@
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class SelectTranslatorTest extends CayenneCase {
@@ -52,7 +52,7 @@
         SelectQuery q = new SelectQuery(Artist.class, ExpressionFactory.likeExp(
                 "artistName",
                 "a%"));
-        q.addOrdering("dateOfBirth", Ordering.ASC);
+        q.addOrdering("dateOfBirth", SortOrder.ASCENDING);
 
         Template test = new Template() {
 
@@ -110,7 +110,7 @@
             
             //testing outer join!!
             q = new SelectQuery(Painting.class);
-            q.addOrdering("toArtist+.artistName", true);
+            q.addOrdering("toArtist+.artistName", SortOrder.ASCENDING);
             test.test(q);
             context.performQuery(q);
             
@@ -491,7 +491,7 @@
             SelectQuery q = new SelectQuery(Artist.class);
             DbEntity entity = getDbEntity("ARTIST");
             entity.getDataMap().setQuotingSQLIdentifiers(true);
-            q.addOrdering("dateOfBirth", Ordering.ASC);
+            q.addOrdering("dateOfBirth", SortOrder.ASCENDING);
 
             Template test = new Template() {
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/PkGeneratorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/PkGeneratorTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/PkGeneratorTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/PkGeneratorTest.java Mon Nov 16 22:06:17 2009
@@ -71,28 +71,4 @@
             pkList.add(pk);
         }
     }
-
-    /**
-     * @deprecated since 3.0
-     */
-    public void testBinaryPK1() throws Exception {
-        if (!(pkGen instanceof JdbcPkGenerator)) {
-            return;
-        }
-
-        DbEntity artistEntity = getDbEntity("ARTIST");
-        assertNull(((JdbcPkGenerator) pkGen).binaryPK(artistEntity));
-    }
-
-    /**
-     * @deprecated since 3.0
-     */
-    public void testBinaryPK2() throws Exception {
-        if (!(pkGen instanceof JdbcPkGenerator)) {
-            return;
-        }
-
-        DbEntity binPKEntity = getDbEntity("BINARY_PK_TEST1");
-        assertNotNull(((JdbcPkGenerator) pkGen).binaryPK(binPKEntity));
-    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/oracle/Oracle8AdapterTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/oracle/Oracle8AdapterTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/oracle/Oracle8AdapterTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/oracle/Oracle8AdapterTest.java Mon Nov 16 22:06:17 2009
@@ -36,7 +36,7 @@
 
     public void testFindAdapterResource() throws Exception {
 
-        URL typesURL = new Oracle8Adapter().findAdapterResource("/types.xml");
+        URL typesURL = new Oracle8Adapter().findResource("/types.xml");
         assertNotNull(typesURL);
         assertTrue("Unexpected url:" + typesURL, typesURL.toExternalForm().endsWith(
                 "types-oracle8.xml"));

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java?rev=880993&r1=880992&r2=880993&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java Mon Nov 16 22:06:17 2009
@@ -29,6 +29,7 @@
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.Persistent;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.unit.CayenneCase;
 
 public class ExpressionFactoryTest extends CayenneCase {
@@ -268,7 +269,7 @@
         assertTrue(query.getQualifier().match(res));
         
         query.setQualifier(ExpressionFactory.matchAnyExp(a1, a3));
-        query.addOrdering("artistName", true);
+        query.addOrdering("artistName", SortOrder.ASCENDING);
         List<Persistent> list = dc.performQuery(query);
         assertEquals(list.size(), 2);
         assertSame(list.get(0), a1);



Mime
View raw message