db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1840429 - in /db/jdo/trunk/api/src/main/java/javax/jdo/query: MapExpression.java OrderExpression.java StringExpression.java
Date Sun, 09 Sep 2018 18:51:33 GMT
Author: mbo
Date: Sun Sep  9 18:51:33 2018
New Revision: 1840429

URL: http://svn.apache.org/viewvc?rev=1840429&view=rev
Log:
JDO-652: extension MapExpression method get, StringExpression method startsWith(expr, index),
OrderExpression null position

Modified:
    db/jdo/trunk/api/src/main/java/javax/jdo/query/MapExpression.java
    db/jdo/trunk/api/src/main/java/javax/jdo/query/OrderExpression.java
    db/jdo/trunk/api/src/main/java/javax/jdo/query/StringExpression.java

Modified: db/jdo/trunk/api/src/main/java/javax/jdo/query/MapExpression.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/main/java/javax/jdo/query/MapExpression.java?rev=1840429&r1=1840428&r2=1840429&view=diff
==============================================================================
--- db/jdo/trunk/api/src/main/java/javax/jdo/query/MapExpression.java (original)
+++ db/jdo/trunk/api/src/main/java/javax/jdo/query/MapExpression.java Sun Sep  9 18:51:33
2018
@@ -28,6 +28,20 @@ import java.util.Map;
 public interface MapExpression<T extends Map<K, V>, K, V> extends Expression<T>
 {
     /**
+     * Method returning an expression for the value of the specified key in the map.
+     * @param key The key expression
+     * @return the value for the specified key
+     */
+    Expression<V> get(Expression<K> key);
+
+    /**
+     * Method returning an expression for the value of the specified key in the map.
+     * @param key The key expression
+     * @return the value for the specified key
+     */
+    Expression<V> get(K key);
+
+    /**
      * Method returning whether the specified key expression is contained in this map.
      * @param expr The key expression
      * @return Whether it is contained here

Modified: db/jdo/trunk/api/src/main/java/javax/jdo/query/OrderExpression.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/main/java/javax/jdo/query/OrderExpression.java?rev=1840429&r1=1840428&r2=1840429&view=diff
==============================================================================
--- db/jdo/trunk/api/src/main/java/javax/jdo/query/OrderExpression.java (original)
+++ db/jdo/trunk/api/src/main/java/javax/jdo/query/OrderExpression.java Sun Sep  9 18:51:33
2018
@@ -29,6 +29,12 @@ public interface OrderExpression<T>
         DESC
     }
 
+    public enum OrderNullsPosition
+    {
+        FIRST,
+        LAST
+    }
+
     /**
      * Accessor for the direction of the ordering with this expression.
      * @return The direction
@@ -40,4 +46,22 @@ public interface OrderExpression<T>
      * @return Ordering expression
      */
     Expression<T> getExpression();
-}
\ No newline at end of file
+
+    /**
+     * Accessor for the position of nulls with this expression.
+     * @return The nulls position (or null if not defined)
+     */
+    OrderNullsPosition getNullsPosition();
+
+    /**
+     * Method to set nulls to be ordered BEFORE non-nulls.
+     * @return The order expression
+     */
+    OrderExpression<T> nullsFirst();
+
+    /**
+     * Method to set nulls to be ordered AFTER non-nulls.
+     * @return The order expression
+     */
+    OrderExpression<T> nullsLast();
+}

Modified: db/jdo/trunk/api/src/main/java/javax/jdo/query/StringExpression.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/main/java/javax/jdo/query/StringExpression.java?rev=1840429&r1=1840428&r2=1840429&view=diff
==============================================================================
--- db/jdo/trunk/api/src/main/java/javax/jdo/query/StringExpression.java (original)
+++ db/jdo/trunk/api/src/main/java/javax/jdo/query/StringExpression.java Sun Sep  9 18:51:33
2018
@@ -160,6 +160,24 @@ public interface StringExpression extend
     BooleanExpression startsWith(String str);
 
     /**
+     * Method returning an expression for whether the substring of this string beginning
at the specified
+     * index starts with the passed string expression.
+     * @param expr The expression that it starts with.
+     * @param index where to begin looking in this string
+     * @return Whether it starts with the other string
+     */
+    BooleanExpression startsWith(StringExpression expr, int index);
+
+    /**
+     * Method returning an expression for whether the substring of this string beginning
at the specified
+     * index starts with the passed string.
+     * @param str The string that it starts with.
+     * @param index where to begin looking in this string
+     * @return Whether it starts with the other string
+     */
+    BooleanExpression startsWith(String str, int index);
+
+    /**
      * Method to return an expression for the substring of this string expression.
      * @param pos The position of the start point of the substring
      * @return Expression for the substring



Mime
View raw message