cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1425944 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Property.java
Date Wed, 26 Dec 2012 15:13:11 GMT
Author: aadamchik
Date: Wed Dec 26 15:13:10 2012
New Revision: 1425944

URL: http://svn.apache.org/viewvc?rev=1425944&view=rev
Log:
CAY-1784 Improving 'Property' class to handle a few extra common cases

notlike

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Property.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Property.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Property.java?rev=1425944&r1=1425943&r2=1425944&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Property.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Property.java
Wed Dec 26 15:13:10 2012
@@ -119,6 +119,20 @@ public class Property<E> {
     public Expression likeInsensitive(E value) {
         return ExpressionFactory.likeIgnoreCaseExp(getName(), value);
     }
+    
+    /**
+     * @return An expression for a Database "NOT LIKE" query.
+     */
+    public Expression nlike(E value) {
+        return ExpressionFactory.notLikeExp(getName(), value);
+    }
+
+    /**
+     * @return An expression for a case insensitive "NOT LIKE" query.
+     */
+    public Expression nlikeInsensitive(E value) {
+        return ExpressionFactory.notLikeIgnoreCaseExp(getName(), value);
+    }
 
     /**
      * @return An expression checking for objects between a lower and upper



Mime
View raw message