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

org.hisp.dhis.query.Order Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package org.hisp.dhis.query;

/**
 * Query response ordering.
 *
 * @author Lars Helge Overland
 */
public class Order
{
    private final String property;

    private final Direction direction;

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

    public static Order asc( String property )
    {
        return new Order( property, Direction.ASC );
    }

    public static Order desc( String property )
    {
        return new Order( property, Direction.DESC );
    }

    public String getProperty()
    {
        return property;
    }

    public Direction getDirection()
    {
        return direction;
    }

    public boolean hasOrder()
    {
        return property != null && direction != null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy