org.hisp.dhis.query.Order Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dhis2-java-client Show documentation
Show all versions of dhis2-java-client Show documentation
DHIS 2 API client for Java.
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