|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.sde.sdk.client.SeStreamOp com.esri.sde.sdk.client.SeQuery
public class SeQuery
Used to submit a query to an ArcSDE instance.
A typical SeQuery operation sequence is:
1) Create an SeQuery.
2) Prepare the query.
3) Execute a statement or spatial query.
4) Fetch a single SeRow from the SeQuery.
5) Retrieve column values and feature geometry from the fetched SeRow.
6) Close the SeQuery at the end of a series of fetches.
SeRow
Field Summary | |
---|---|
static short |
SE_ATTRIBUTE_FIRST
|
static short |
SE_OPTIMIZE
|
static short |
SE_SPATIAL_FIRST
|
static int |
STREAM_CLOSED
|
static int |
STREAM_EXECUTE
|
static int |
STREAM_FETCH
|
static int |
STREAM_FILE_QUERY
|
static int |
STREAM_FINISHED
|
static int |
STREAM_INACTIVE
|
static int |
STREAM_INITIALIZE
|
static int |
STREAM_LAYER_QUERY
|
static int |
STREAM_LOG_QUERY
|
static int |
STREAM_NONE
|
static int |
STREAM_PREPARE_SQL
|
Constructor Summary | |
---|---|
SeQuery(SeConnection conn)
Creates an SeQuery object given an SeConnection. |
|
SeQuery(SeConnection conn,
java.lang.String[] columns,
SeSqlConstruct construct)
Creates an SeQuery object given an SeConnection, an array of column names, and an SeSqlConstruct. |
Method Summary | |
---|---|
SeExtent |
calculateLayerExtent(SeQueryInfo qInfo)
Returns the envelope for all features within the layer that pass any SQL construct, state, or spatial constraints for the stream. |
SeLayer.SeLayerStats |
calculateLayerStatistics(SeQueryInfo qInfo)
Returns a set of statistics for a layer. |
SeTable.SeTableStats |
calculateTableStatistics(java.lang.String column,
int mask,
SeQueryInfo qInfo,
int maxDistinct)
Returns a set of statistics for a column in a table. |
SeRow |
fetch()
Fetches an SeRow of data. |
SeRow |
fetchRow(java.lang.String table,
SeObjectId seRowId,
java.lang.String[] columns)
Fetches a single row based on the feature id. |
boolean |
getInvalidShapeMode()
Returns true if fetching invalid shape is allowed. |
int |
getNumColumns()
Returns the number of columns on the query. |
void |
prepareQuery()
Initializes a stream with a query using a selected set of columns and an SeSqlConstruct object for the where clause. |
void |
prepareQuery(java.lang.String[] columns,
SeSqlConstruct construct)
Initializes a stream with a query using a selected set of columns and an SeSqlConstruct object for the where clause. |
void |
prepareQueryInfo(SeQueryInfo qInfo)
Initializes a stream with a query using an SeQueryInfo object.The SE_QUERYINFO structure includes parameters to define tables, columns, where clause, query type, ORDER BY clauses and DBMS hints. |
void |
prepareQueryLogfile(java.lang.String logfile)
Initializes a stream with a query using a selected set of columns and an SeSqlConstruct object for the where clause. |
java.util.Vector |
prepareQueryRowIdByUuid(java.lang.String table,
java.lang.String uuidColumn,
java.lang.String[] uuids)
Initializes a stream with a query using a selected set of columns and an SeSqlConstruct object for the where clause. |
void |
prepareSql(java.lang.String sqlStatement)
Tells the server to prepare the sql statement for execution. |
void |
queryRasterTile(SeRasterConstraint rasterConstraint)
Prepares raster tile query. |
void |
setInvalidShapeMode(boolean fetchInvalidShape)
Sets the truth for fetching invalid shape. |
void |
setRasterConstraint(SeRasterConstraint rasterConstraint)
Sets raster constraint query. |
void |
setSpatialConstraints(short searchOrder,
boolean calcMasks,
SeFilter[] filters)
Sets the spatial filters on the query. |
Methods inherited from class com.esri.sde.sdk.client.SeStreamOp |
---|
cancel, close, describeColumn, equivalenceRows, execute, flushBufferedWrites, inProgress, setDynamicParameters, setLogfile, setRowLocking, setState, unequivalenceRows |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STREAM_FILE_QUERY
public static final int STREAM_LAYER_QUERY
public static final int STREAM_LOG_QUERY
public static final int STREAM_NONE
public static final int STREAM_PREPARE_SQL
public static final int STREAM_CLOSED
public static final int STREAM_INACTIVE
public static final int STREAM_INITIALIZE
public static final int STREAM_EXECUTE
public static final int STREAM_FETCH
public static final int STREAM_FINISHED
public static final short SE_ATTRIBUTE_FIRST
public static final short SE_SPATIAL_FIRST
public static final short SE_OPTIMIZE
Constructor Detail |
---|
public SeQuery(SeConnection conn) throws SeException
SeException
public SeQuery(SeConnection conn, java.lang.String[] columns, SeSqlConstruct construct) throws SeException
SeException
Method Detail |
---|
public void prepareQuery() throws SeException
SeException
public void prepareQuery(java.lang.String[] columns, SeSqlConstruct construct) throws SeException
SeException
public java.util.Vector prepareQueryRowIdByUuid(java.lang.String table, java.lang.String uuidColumn, java.lang.String[] uuids) throws SeException
SeException
public void prepareQueryLogfile(java.lang.String logfile) throws SeException
logfile
- the logfile name.
SeException
public void prepareQueryInfo(SeQueryInfo qInfo) throws SeException
qInfo
- the SeQueryInfo object handle.
SeException
public int getNumColumns() throws SeException
SeException
public void prepareSql(java.lang.String sqlStatement) throws SeException
sqlStatement
- any SQL statement supported by the
underlying DBMS.
SeException
public SeRow fetch() throws SeException
SeException
public SeRow fetchRow(java.lang.String table, SeObjectId seRowId, java.lang.String[] columns) throws SeException
table
- the name of the table to fetch data from.seRowId
- the feature or row id of the row to be fetched.columns
- the list of columns to be retrieved from the table.
SeException
public SeLayer.SeLayerStats calculateLayerStatistics(SeQueryInfo qInfo) throws SeException
qInfo
- SeQueryInfo object handle.
SeException
public SeTable.SeTableStats calculateTableStatistics(java.lang.String column, int mask, SeQueryInfo qInfo, int maxDistinct) throws SeException
The mask parameter uses a bit-mask to determine which statistics to calculate. The possible values are
SeTable.SeTableStats.SE_MIN_STATS
SeTable.SeTableStats.SE_AVERAGE_STATS
SeTable.SeTableStats.SE_MAX_STATS
SeTable.SeTableStats.SE_STD_DEV_STATS
SeTable.SeTableStats.SE_COUNT_STATS
SeTable.SeTableStats.SE_DISTINCT_STATS
SeTable.SeTableStats.SE_BASIC_STATS
SeTable.SeTableStats.SE_ALL_STATS
When computing statistics, in order for any spatial constraint set on the stream to be used, the spatial constraint must have the mask paramter set to true. If this parameter is set to false, the spatial constraint is just ignored. The calculate statistics function then returns the statistics for the entire table.
If the max_distinct parameter is zero, the MAXDISTINCT value from the giomgr.defs file is used to limit the number of values. If that value is zero, the number of distinct values is unlimited.
column
- the column name.mask
- the statistics bit mask.qInfo
- SeQueryInfo object handle.maxDistinct
- the maximum number of distinct values.
SeTable.SeTableStats
SeException
setSpatialConstraints(short, boolean, com.esri.sde.sdk.client.SeFilter[])
public SeExtent calculateLayerExtent(SeQueryInfo qInfo) throws SeException
qInfo
- SeQueryInfo object handle.
SeException
public boolean getInvalidShapeMode() throws SeException
SeException
public void setInvalidShapeMode(boolean fetchInvalidShape) throws SeException
SeException
public void setSpatialConstraints(short searchOrder, boolean calcMasks, SeFilter[] filters) throws SeException
SEARCH ORDERS:
SE_ATTRIBUTE_FIRST - do not use spatial index.
SE_SPATIAL_FIRST - use spatial index.
SE_OPTIMIZE - let SDE decide.
searchOrder
- the search order.calcMasks
- if true, uses the spatial query to calculate statistics.filters
- the array of filters to be applied as spatial constraints.
SeException
public void setRasterConstraint(SeRasterConstraint rasterConstraint) throws SeException
rasterConstraint
- SeRasterConstraint object handle.
SeException
- if an error occurspublic void queryRasterTile(SeRasterConstraint rasterConstraint) throws SeException
rasterConstraint
- SeRasterConstraint object handle.
SeException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |