JDOQL defines support for some methods within its syntax. The following are supported
for in-memory evaluation currently.
|
Java Type
|
Method
|
Description
|
|
java.lang.
String
|
startsWith(String)
|
Returns if the string starts with the passed string
|
|
java.lang.
String
|
endsWith(String)
|
Returns if the string ends with the passed string
|
|
java.lang.
String
|
indexOf(String)
|
Returns the first position of the passed string
|
|
java.lang.
String
|
indexOf(String, int)
|
Returns the position of the passed string, after the passed position
|
|
java.lang.
String
|
length()
|
Returns the length of the passed string
|
|
java.lang.
String
|
substring(int)
|
Returns the substring starting from the passed position
|
|
java.lang.
String
|
substring(int, int)
|
Returns the substring between the passed positions
|
|
java.lang.
String
|
toLowerCase()
|
Returns the string in lowercase
|
|
java.lang.
String
|
toUpperCase()
|
Retuns the string in UPPERCASE
|
|
java.lang.
String
|
matches(String pattern)
|
Returns whether string matches the passed expression. The pattern argument
follows the rules of java.lang.String.matches method.
|
|
java.lang.
String
|
trim()
|
Trims leading and trailing whitespace from the string
|
|
java.lang.
Enum
|
toString()
|
Returns the string form of the enum
|
|
java.lang.
Enum
|
ordinal()
|
Returns the ordinal form of the enum
|
|
java.util.
Collection
|
isEmpty()
|
Returns whether the collection is empty
|
|
java.util.
Collection
|
contains(value)
|
Returns whether the collection contains the passed element
|
|
java.util.
Collection
|
size()
|
Returns the number of elements in the collection
|
|
java.util.
List
|
get(position)
|
Returns the List element at this position
|
|
java.util.
Map
|
isEmpty()
|
Returns whether the map is empty
|
|
java.util.
Map
|
containsKey(key)
|
Returns whether the map contains the passed key
|
|
java.util.
Map
|
containsValue(value)
|
Returns whether the map contains the passed value
|
|
java.util.
Map
|
get(key)
|
Returns the value from the map with the passed key
|
|
java.util.
Map
|
size()
|
Returns the number of entries in the map
|
|
java.util.
Date
|
getTime()
|
Returns the millisecs of the passed date
|
|
java.util.
Date
|
getDay()
|
Returns the day (of the month) of the passed date
|
|
java.util.
Date
|
getMonth()
|
Returns the month (of the year) of the passed date
|
|
java.util.
Date
|
getYear()
|
Returns the year of the passed date
|
|
java.util.
Date
|
getHour()
|
Returns the hour (of the day) of the passed date
|
|
java.util.
Date
|
getMinute()
|
Returns the minute (of the hour) of the passed date
|
|
java.util.
Date
|
getSecond()
|
Returns the second (of the minute) of the passed date
|
|
java.lang.
Math
|
abs(number)
|
Returns the absolute value of the passed number
|
|
java.lang.
Math
|
sqrt(number)
|
Returns the square root of the passed number
|
|
javax.jdo.
JDOHelper
|
getObjectId(object)
|
Returns the object identity of the passed persistent object
|
|
javax.jdo.
JDOHelper
|
getVersion(object)
|
Returns the current version of the passed persistent object
|
Support for in-memory evaluation of query methods is provided via a
plugin-point so can be
extended easily.