140 Queries with JDOQL 8.5.3.2. Equality The equality

140 Queries with JDOQL 8.5.3.2. Equality The equality operator == can be used between primitives and instances of the corresponding wrapper types. Thus, if an identifier (field or parameter) called intPrimitive is of type int, and identifier intWrapper is of type Integer, the following comparison is legal in JDOQL (but would be illegal in Java): intPrimitive == intWrapper This is also extended to equality of String and Date objects. Note that equality comparisons (== and !=) between floating point values are inherently inexact and should be used with caution. The results of such com parisons may vary across different JDO implementations. 8.5.3.3 Ordering As with equality, the ordering operators (>, <, >=, <=) can be used between primitives and instances of the corresponding wrapper types. With the identifiers defined above, the following comparison is legal in JDOQL (but would be illegal in Java): intPrimitive > intWrapper This is again extended to ordering of String and Date objects. 8.5.3.4 Assignment A query filter may not do anything that might change the value of a persistent field. Specifically the assignment operators (=, +=, /=, etc.) and the pre/post increment/decrement operators (++ and –) are illegal. Implementations may optionally permit the invocation of methods, on persistence-capable or system classes, as long as these methods are themselves non-mutating. 8.5.3.5 Navigation JDOQL explicitly supports navigation from one instance to another, by use of the de-reference operator (the period). Queries can navigate from one instance to another through a singleton (non-collection) reference. Queries can also navigate through multivalued Collection fields by using the Collection.contains() method. Attempted navigation through a null reference causes that subexpression to evaluate to false. Other subexpression evaluations, combined with the logical operators, may still cause the instance to be included in the query s result.
Note: If you are looking for cheapest and affordable webspace to host and run your servlet application check Astra servlet hosting services

Comments are closed.