* Translates from the criteria query to a EclipseLink Database Query.
*/
public DatabaseQuery translate() {
DatabaseQuery query = getDatabaseQuery();
for (ParameterExpression<?> parameter : getParameters()) {
query.addArgument(parameter.getName(), parameter.getJavaType());
}
if (this.where != null) {
if (((InternalExpression) this.where).isPredicate() && ((InternalSelection) this.where).getCurrentNode() == null) {
if (((PredicateImpl) this.where).getOperator() == BooleanOperator.OR) {
query.setSelectionCriteria(new ConstantExpression(1, getBaseExpression()).equal(0));