| java.lang.Object org.geotools.arcsde.data.ArcSDEQuery
ArcSDEQuery | class ArcSDEQuery (Code) | | Wrapper class for SeQuery to hold a SeConnection until close() is called and
provide utility methods.
author: Gabriel Roldan, Axios Engineering version: $Id: ArcSDEQuery.java 27863 2007-11-12 20:34:34Z desruisseaux $ |
Inner Class :public static class FilterSet | |
Method Summary | |
public static Envelope | calculateQueryExtent(ArcSDEDataStore ds, Query query) Convenient method to just calculate the resulting bound box of a given
query. | public Envelope | calculateQueryExtent() Returns the envelope for all features within the layer that pass any SQL
construct, state, or spatial constraints for the stream. | public static int | calculateResultCount(ArcSDEDataStore ds, Query query) Convenient method to just calculate the result count of a given query. | public int | calculateResultCount() if the query has been parsed as just a where clause filter, or has no
filter at all, the result count calculation is optimized by selecting a
count() single row. | public void | cancel(boolean reset) Cancels the current operation on the stream. | public void | close() Closes the query and releases the holded connection back to the
connection pool. | public static ArcSDEQuery.FilterSet | createFilters(SeLayer layer, FeatureType schema, Filter filter, SeQueryInfo qInfo, PlainSelect viewSelect, FIDReader fidReader) | public static ArcSDEQuery | createQuery(ArcSDEDataStore store, Query query) | public static ArcSDEQuery | createQuery(ArcSDEDataStore store, FeatureType schema, Query query) | public void | execute() Tells the server to execute a stream operation. | public SdeRow | fetch() Fetches an SeRow of data. | public void | flushBufferedWrites() Flushes any outstanding insert/update buffers. | public FIDReader | getFidReader() | public ArcSDEQuery.FilterSet | getFilters() | public FeatureType | getSchema() | public void | prepareQuery() Initializes a stream with a query using a selected set of columns and an
SeSqlConstruct object for the where clause. | public void | setRowLocking(int lockActions) Sets the row locking environment for a stream.
The row locking environment remains in effect until the stream is closed
with reset TRUE or the stream is freed. | public void | setSpatialConstraints(SeFilter[] filters) | public String | toString() |
connection | ArcSDEPooledConnection connection(Code) | | The connection to the ArcSDE server obtained when first created the
SeQuery in getSeQuery . It is retained until
close() is called. Do not use it directly, but through
getConnection() .
NOTE: this member is package visible only for unit test pourposes
|
calculateQueryExtent | public static Envelope calculateQueryExtent(ArcSDEDataStore ds, Query query) throws IOException(Code) | | Convenient method to just calculate the resulting bound box of a given
query.
Parameters: ds - DOCUMENT ME! Parameters: query - DOCUMENT ME! DOCUMENT ME! throws: IOException - DOCUMENT ME! |
calculateQueryExtent | public Envelope calculateQueryExtent() throws IOException(Code) | | Returns the envelope for all features within the layer that pass any SQL
construct, state, or spatial constraints for the stream.
DOCUMENT ME! throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
calculateResultCount | public static int calculateResultCount(ArcSDEDataStore ds, Query query) throws IOException(Code) | | Convenient method to just calculate the result count of a given query.
Parameters: ds - Parameters: query - throws: IOException - |
calculateResultCount | public int calculateResultCount() throws IOException(Code) | | if the query has been parsed as just a where clause filter, or has no
filter at all, the result count calculation is optimized by selecting a
count() single row. If the filter involves any kind of
spatial filter, such as BBOX, the calculation can't be optimized by
this way, because the ArcSDE Java API throws a "DATABASE LEVEL
ERROR OCURRED" exception. So, in this case, a query over the
shape field is made and the result is traversed counting the number of
rows inside a while loop
DOCUMENT ME! throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
cancel | public void cancel(boolean reset) throws IOException(Code) | | Cancels the current operation on the stream. If reset is
TRUE, the query status is set to INACTIVE. If reset is FALSE the query
status is set to CLOSED.
Parameters: reset - if true the Query is closed, else it is resetted to bereused throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
close | public void close()(Code) | | Closes the query and releases the holded connection back to the
connection pool. If reset is TRUE, the query status is set to INACTIVE;
also releases the SeConnection back to the SeConnectionPool
|
getFidReader | public FIDReader getFidReader()(Code) | | Returns the FID strategy used
DOCUMENT ME! |
getSchema | public FeatureType getSchema()(Code) | | Returns the schema of the originating Query
the schema of the originating Query |
prepareQuery | public void prepareQuery() throws IOException(Code) | | Initializes a stream with a query using a selected set of columns and an
SeSqlConstruct object for the where clause. The where clause can?t
contain any ORDER BY or GROUP BY clauses.
throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
setRowLocking | public void setRowLocking(int lockActions) throws IOException(Code) | | Sets the row locking environment for a stream.
The row locking environment remains in effect until the stream is closed
with reset TRUE or the stream is freed. The row lock types are:
-
SE_ROWLOCKING_LOCK_ON_QUERY - Rows selected by a query are locked.
-
SE_ROWLOCKING_LOCK_ON_INSERT - New rows are locked when inserted.
-
SE_ROWLOCKING_LOCK_ON_UPDATE - Updated rows are locked.
-
SE_ROWLOCKING_UNLOCK_ON_QUERY - Locks are removed upon query.
-
SE_ROWLOCKING_UNLOCK_ON_UPDATE - Modified rows are unlocked.
-
SE_ROWLOCKING_FILTER_MY_LOCKS - Only rows locked by the user are
returned on query.
-
SE_ROWLOCKING_FILTER_OTHER_LOCKS - Only rows locked by other users are
returned on query.
-
SE_ROWLOCKING_FILTER_UNLOCKED - Only unlocked rows are returned.
-
SE_ROWLOCKING_LOCK_ONLY - Query operations lock but don't return rows.
Parameters: lockActions - DOCUMENT ME! throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
setSpatialConstraints | public void setSpatialConstraints(SeFilter[] filters) throws IOException(Code) | | Sets the spatial filters on the query using SE_OPTIMIZE as the policy
for spatial index search
Parameters: filters - a set of spatial constraints to filter upon throws: IOException - DOCUMENT ME! throws: DataSourceException - DOCUMENT ME! |
toString | public String toString()(Code) | | DOCUMENT ME!
DOCUMENT ME! |
|
|