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

cz.encircled.joiner.query.QueryOrder Maven / Gradle / Ivy

package cz.encircled.joiner.query;

import com.querydsl.core.types.Expression;

import java.util.Objects;

/**
 * Definition of result set order
 *
 * @author Vlad on 15-Oct-16.
 */
public class QueryOrder {

    private final boolean isAsc;

    private final Expression target;

    public QueryOrder(boolean isAsc, Expression target) {
        this.isAsc = isAsc;
        this.target = target;
    }

    public boolean isAsc() {
        return isAsc;
    }

    public Expression getTarget() {
        return target;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof QueryOrder)) return false;
        QueryOrder that = (QueryOrder) o;
        return isAsc == that.isAsc &&
                Objects.equals(target, that.target);
    }

    @Override
    public int hashCode() {

        return Objects.hash(isAsc, target);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy