org.geotools.data
Class QueryCapabilities

Object
  extended by QueryCapabilities
Direct Known Subclasses:
JDBCFeatureSource.JDBCQueryCapabilities

public class QueryCapabilities
extends Object

Describes the query capabilities for a specific FeatureType, so client code can request which features are nativelly supported by a FeatureSource.

This is the minimal Query capabilities we could come up in order to reliably support paging. Yet, the need for a more complete set of capabilities is well known and a new proposal should be done in order to define the complete set of capabilities a FeatureSource should advertise.

Since:
2.5.x
Author:
Gabriel Roldan (TOPP)
Module:
modules/library/api (gt-api.jar)

Constructor Summary
QueryCapabilities()
           
 
Method Summary
 boolean isOffsetSupported()
          Is offset supported.
 boolean isReliableFIDSupported()
          Returns whether the feature source is capable of producing "reliable" fids.
 boolean supportsSorting(SortBy[] sortAttributes)
          Returns whether a list of properties can be used as SortBy keys.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryCapabilities

public QueryCapabilities()
Method Detail

isOffsetSupported

public boolean isOffsetSupported()
Is offset supported. A value of true implies ability to have a consistent sort order. At least SortBy.NATURAL_ORDER shall be supported, and be the default order if a Query with offset but no SortBy is issued.


supportsSorting

public boolean supportsSorting(SortBy[] sortAttributes)
Returns whether a list of properties can be used as SortBy keys.

May include current feature type properties as well as "@id" for sorting on the Feature ID. Note, however, that ability to sort by the fature id does not necessarily implies the same ordering than SortBy.NATURAL_ORDER, though its probable they match for datastores where the feature id is built up from a primary key.

Returns true if passed a null or empty array, otherwise the actual attributes are checked. When the array is not null and not empty, by default returns false. FeatureSource implementations should override as needed.

Returns:
whether the FeatureType this query capabilities refers to can be natively sorted by the provided list of attribtue/order pairs

isReliableFIDSupported

public boolean isReliableFIDSupported()
Returns whether the feature source is capable of producing "reliable" fids.

In this content the term "reliable" refers to the ability to read the same feature twice (with no transactions against the feature source in the interim) and get the same feature id back both times.

Returns:
True to indicate reliable fids are supported, otherwise false.


Copyright © 1996-2009 Geotools. All Rights Reserved.