Search in sources :

Example 1 with ConstraintField

use of com.sun.jdo.spi.persistence.support.sqlstore.sql.constraint.ConstraintField in project Payara by payara.

the class SelectStatement method processRootConstraint.

/**
 * Processes Order By constraints and calls the super class
 * method for all other constrains.
 */
protected void processRootConstraint(ConstraintOperation opNode, List stack, StringBuffer whereText) {
    int op = opNode.operation;
    int opInfo = operationFormat(op);
    if ((opInfo & OP_ORDERBY_MASK) > 0) {
        stack.remove(stack.size() - 1);
        ConstraintNode node = (ConstraintNode) stack.get(stack.size() - 1);
        if (!(node instanceof ConstraintField)) {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages, // NOI18N
            "core.constraint.needfieldnode"));
        } else {
            processOrderByField((ConstraintFieldDesc) node, op);
            stack.remove(stack.size() - 1);
        }
    } else {
        super.processRootConstraint(opNode, stack, whereText);
    }
}
Also used : JDOFatalInternalException(com.sun.jdo.api.persistence.support.JDOFatalInternalException) ConstraintNode(com.sun.jdo.spi.persistence.support.sqlstore.sql.constraint.ConstraintNode) ConstraintField(com.sun.jdo.spi.persistence.support.sqlstore.sql.constraint.ConstraintField)

Aggregations

JDOFatalInternalException (com.sun.jdo.api.persistence.support.JDOFatalInternalException)1 ConstraintField (com.sun.jdo.spi.persistence.support.sqlstore.sql.constraint.ConstraintField)1 ConstraintNode (com.sun.jdo.spi.persistence.support.sqlstore.sql.constraint.ConstraintNode)1