com.esri.sde.sdk.client
Class SeStreamOp

java.lang.Object
  extended by com.esri.sde.sdk.client.SeStreamOp
Direct Known Subclasses:
SeDelete, SeInsert, SeQuery, SeUpdate

public abstract class SeStreamOp
extends java.lang.Object

Parent class for ArcSDE Insert, Update, Query and Delete streams.


Method Summary
 void cancel(boolean reset)
          Cancels the current operation on the stream.
 void close()
          Closes this stream object and releases it back to the stream pool.
 SeColumnDefinition describeColumn(int columnNum)
          Describes a given column by returning the SeColumnDefinition.
 void equivalenceRows(java.lang.String table, SeObjectId[] rowIdList, boolean reciprocal)
          Declares a set of rows in the source state to be equivalent to the version of those rows in the difference state.
 void execute()
          Tells the server to execute a stream operation.
 void flushBufferedWrites()
          Flushes any outstanding insert/update buffers.
 boolean inProgress()
          Determines if the stream operation is in use.
 void setDynamicParameters(SeParameterInfo parameters)
          Used to set the parameters for dynamically bound where clause constraints in Query and Delete streams.
 void setLogfile(SeLog log, boolean logfileOnly)
          Sets a logfile for auto-logging.
 void setRowLocking(int lockActions)
          Sets the row locking environment for a stream.
 void setState(SeObjectId sourceId, SeObjectId differencesId, int differencesType)
          Sets state constraints for input and output stream operations.
 void unequivalenceRows(java.lang.String table, SeObjectId[] rowIdList, boolean reciprocal)
          Declares a set of rows in a source state to be no longer equivalent to the version of those rows in the difference state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

describeColumn

public SeColumnDefinition describeColumn(int columnNum)
                                  throws SeException
Describes a given column by returning the SeColumnDefinition. Column numbers are sequential left to right, starting at zero. Get an array of SeColumnDefinitions resulting from an executed query through the SeRow.getColumns() method.

Parameters:
columnNum - column position 0-n
Returns:
SeColumnDefinition the definition of the column at position columnNum.
Throws:
SeException

inProgress

public boolean inProgress()
                   throws SeException
Determines if the stream operation is in use.

Throws:
SeException

execute

public void execute()
             throws SeException
Tells the server to execute a stream operation.

Throws:
SeException

flushBufferedWrites

public void flushBufferedWrites()
                         throws SeException
Flushes any outstanding insert/update buffers.

Throws:
SeException

cancel

public void cancel(boolean reset)
            throws SeException
Cancels the current operation on the stream. If reset is TRUE, the query status is set to INACTIVE and the stream is reset as if it were just created. If reset is FALSE the query status is set to CLOSED and the query stream is cancelled but retains the list of spatial constraints, buffered write mode and destination logfile values if these properties had been previously set.

Throws:
SeException

close

public void close()
           throws SeException
Closes this stream object and releases it back to the stream pool.

Throws:
SeException

setState

public void setState(SeObjectId sourceId,
                     SeObjectId differencesId,
                     int differencesType)
              throws SeException
Sets state constraints for input and output stream operations. If a differenct type is specified, then only features different in the way supplied are returned.

differencesType:

SeState.SE_STATE_DIFF_NOCHECK Returns all features in the source state. It doesn't check the differences between source state and differences state.

SeState.SE_STATE_DIFF_NOCHANGE_UPDATE Returns all features that haven't changed in the source state, but have been updated in the differences state.

SeState.SE_STATE_DIFF_NOCHANGE_DELETE Returns all features that haven't changed in the source state, but have been deleted in the differences state.

SeState.SE_STATE_DIFF_UPDATE_NOCHANGE Returns all features that have been updated in the source state, but unchanged in the differences state.

SeState.SE_STATE_DIFF_UPDATE_UPDATE Returns all features that have been updated in both the source and difference states.

SeState.SE_STATE_DIFF_UPDATE_DELETE Returns all features that have been updated in the source state but deleted in the difference states.

SeState.SE_STATE_DIFF_INSERT Returns all features that were inserted into the source state and that never existed in the differences state.

Parameters:
sourceId - The id of the state to direct input into and take output from.
differencesId - The id of the second state to take differing output from.
differencesType - The type of difference detection requested.
Throws:
SeException

setLogfile

public void setLogfile(SeLog log,
                       boolean logfileOnly)
                throws SeException
Sets a logfile for auto-logging. If The logfileOnly parameter is set to TRUE - results go to the logfile only. The entire query will be processed at execute time with the feature ids being logged. FALSE - results go to both the logfile and the client. The individual feature ids from each fetched row will be added to the logfile as they are fetched on demand by the client. Note that logfileOnly must be set to FALSE for insert/update operations. In these operations, we don't have ids to log if we don't store the feature in the database. So, logfileOnly will automatically be set to FALSE for insert or update operations.

Parameters:
log - the logfile on the server to log results to.
logfileOnly - set to true to send results to logfile only.
Throws:
SeException

setRowLocking

public void setRowLocking(int lockActions)
                   throws SeException
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.

Throws:
SeException

equivalenceRows

public void equivalenceRows(java.lang.String table,
                            SeObjectId[] rowIdList,
                            boolean reciprocal)
                     throws SeException
Declares a set of rows in the source state to be equivalent to the version of those rows in the difference state. The declaration may be reciprocal. Both a source state and a differences state must be set by setState().

Parameters:
table - The table name.
rowIdList - The unique ids of the rows to be declared equivalent.
reciprocal - If true, then not only are the rows specified in the source state declared equivalent to the difference state, but the specified rows in the difference state are also declared equivalent to the source state.
Throws:
SeException

setDynamicParameters

public void setDynamicParameters(SeParameterInfo parameters)
                          throws SeException
Used to set the parameters for dynamically bound where clause constraints in Query and Delete streams.

Throws:
SeException

unequivalenceRows

public void unequivalenceRows(java.lang.String table,
                              SeObjectId[] rowIdList,
                              boolean reciprocal)
                       throws SeException
Declares a set of rows in a source state to be no longer equivalent to the version of those rows in the difference state. The declaration may be reciprocal. Both a source state and a difference state must be set by setState().

Parameters:
table - The table name.
rowIdList - The unique ids of the rows to be declared equivalent.
reciprocal - If true, then not only are the rows specified in the source state declared unequivalent to the difference state, but the specified rows in the difference state are also declared unequivalent to the source state.
Throws:
SeException