org.apache.jackrabbit.spi.commons.query
Class OrderQueryNode.OrderSpec

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.query.OrderQueryNode.OrderSpec
Enclosing class:
OrderQueryNode

public static final class OrderQueryNode.OrderSpec
extends Object

Implements a single order specification. Contains a property name and whether it is ordered ascending or descending.


Constructor Summary
OrderQueryNode.OrderSpec(org.apache.jackrabbit.spi.Name property, boolean ascending)
          Deprecated. use OrderSpec#OrderSpec(Path, boolean) instead.
OrderQueryNode.OrderSpec(org.apache.jackrabbit.spi.Path property, boolean ascending)
          Creates a new OrderSpec for property.
 
Method Summary
 boolean equals(Object obj)
          Returns true if this order spec is equal to obj
 String getFunction()
           
 org.apache.jackrabbit.spi.Name getProperty()
          Deprecated. use getPropertyPath() instead.
 org.apache.jackrabbit.spi.Path getPropertyPath()
          Returns the relative path of the property.
 boolean isAscending()
          If true the property is ordered ascending, otherwise descending.
 void setAscending(boolean ascending)
          Sets the new value for the ascending property.
 void setFunction(String name)
          Set a new value for a function
 void setPath(org.apache.jackrabbit.spi.Path path)
          Set a new value for the path
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderQueryNode.OrderSpec

public OrderQueryNode.OrderSpec(org.apache.jackrabbit.spi.Name property,
                                boolean ascending)
Deprecated. use OrderSpec#OrderSpec(Path, boolean) instead.

Creates a new OrderSpec for property.

Parameters:
property - the name of the property.
ascending - if true the property is ordered ascending, otherwise descending.

OrderQueryNode.OrderSpec

public OrderQueryNode.OrderSpec(org.apache.jackrabbit.spi.Path property,
                                boolean ascending)
Creates a new OrderSpec for property.

Parameters:
property - the relative path of the property.
ascending - if true the property is ordered ascending, otherwise descending.
Method Detail

getProperty

public org.apache.jackrabbit.spi.Name getProperty()
Deprecated. use getPropertyPath() instead.

Returns the name of the property.

Returns:
the name of the property.

getPropertyPath

public org.apache.jackrabbit.spi.Path getPropertyPath()
Returns the relative path of the property.

Returns:
the relative path of the property.

isAscending

public boolean isAscending()
If true the property is ordered ascending, otherwise descending.

Returns:
true for ascending; false for descending.

setAscending

public void setAscending(boolean ascending)
Sets the new value for the ascending property.

Parameters:
ascending - true for ascending; false for descending.

setPath

public void setPath(org.apache.jackrabbit.spi.Path path)
Set a new value for the path

Parameters:
path - a path

setFunction

public void setFunction(String name)
Set a new value for a function

Parameters:
name - a function name

getFunction

public String getFunction()
Returns:
name of the function

equals

public boolean equals(Object obj)
Returns true if this order spec is equal to obj

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this order spec is equal to obj; false otherwise.


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.