Now that JDO 3.2 standardises the “typed query” mechanism that we prototyped in DataNucleus v3.x and v4.0/v4.1 it is worth mentioning the additions to the API that are present in the JDO 3.2 variant.
This has gained the following methods to providing JDOQL “matches” operation capability
BooleanExpression matches(StringExpression expr);
BooleanExpression matches(String str);
The following methods are added, for bitwise operations support
NumericExpression bAnd(NumericExpression bitExpr);
NumericExpression bOr(NumericExpression bitExpr);
NumericExpression bXor(NumericExpression bitExpr);
In addition it also gains these methods to match the equivalent JDOQL string based operators (-, ~)
This also gains the JDOQL string based operators (-, ~)
This gains the JDOQL string based operator (-)
In addition to the above you can now also make use of Java8 Time types in JDOQLTypedQuery, whereas this was not possible in the previous DataNucleus extension.
The JDOQLTypedQuery class has some slight changes to make it more consistent with the JDOQL standard API.
- Added method result(…) rather than specifying result clauses in the execute call.
- Changed addExtension/setExtensions methods to extension(…)/extensions(…).
- Added unmodifiable, serializeRead, datastoreReadTimeout, datastoreWriteTimeout, ignoreCache, saveAsNamedQuery.