All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ibatis.persist.impl.OrderImpl Maven / Gradle / Ivy

Go to download

The jBATIS persistence framework will help you to significantly reduce the amount of Java code that you normally need to access a relational database. iBATIS simply maps JavaBeans to SQL statements using a very simple XML descriptor.

The newest version!
package org.ibatis.persist.impl;

import org.ibatis.persist.criteria.Expression;
import org.ibatis.persist.criteria.Order;

/**
 * Represents an ORDER BY fragment.
 */
public class OrderImpl implements Order {
    private final Expression expression;
    private boolean ascending;

    public OrderImpl(Expression expression) {
        this(expression, true);
    }

    public OrderImpl(Expression expression, boolean ascending) {
        this.expression = expression;
        this.ascending = ascending;
    }

    public Order reverse() {
        ascending = !ascending;
        return this;
    }

    public boolean isAscending() {
        return ascending;
    }

    public Expression getExpression() {
        return expression;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy