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

org.fingertip.simpledao.bean.Order Maven / Gradle / Ivy

The newest version!
package org.fingertip.simpledao.bean;

public class Order {
    private String property;
    private Direction direction;

    public Order(String property) {
        this.property = property;
    }

    public Order(String property, Direction direction) {
        this.property = property;
        this.direction = direction;
    }

    public static Order by(String property){
        return new Order(property);
    }

    public Order asc(){
        this.direction = Direction.asc;
        return this;
    }

    public Order desc(){
        this.direction = Direction.desc;
        return this;
    }

    public static Order asc(String property){
        Order order = new Order(property);
        order.direction = Direction.asc;
        return order;
    }

    public static Order desc(String property){
        Order order = new Order(property);
        order.direction = Direction.desc;
        return order;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public Direction getDirection() {
        return direction;
    }

    public void setDirection(Direction direction) {
        this.direction = direction;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy