com.esri.sde.sdk.client
Class SeUpdate

java.lang.Object
  extended by com.esri.sde.sdk.client.SeStreamOp
      extended by com.esri.sde.sdk.client.SeUpdate

public class SeUpdate
extends SeStreamOp

Used to submit an update to an ArcSDE instance.

See Also:
SeRow

Constructor Summary
SeUpdate(SeConnection conn)
          Creates a new SeUpdate object, given an SeConnection.
 
Method Summary
 void cancel(boolean reset)
          Cancels the current update operation.
 void close()
          Closes this update object and releases it back to the stream pool.
 void copyStateRows(java.lang.String tableName, SeObjectId[] rowIdList)
          Copies rows from the differences state to the source state.
 int getNumColumns()
          Returns the number of columns on the update.
 SeRow getRowToSet()
          Returns a row object to set for this write operation.
 void restoreRows(java.lang.String table, SeObjectId[] rowIdList)
          Restores a set of rows in a miltiversion table to the values they held at the creation of the currently set version.
 void restoreRowsFromLineageByRowId(java.lang.String table, SeObjectId[] rowIdList)
          Restores a set of rows in a miltiversion table to the values they held at the creation of the currently set version.
 void setWriteMode(boolean buffered)
          Deprecated. at ArcSDE version 9.1, SeUpdate streams cannot be buffered.
 SeRow singleRow(SeObjectId rowId, java.lang.String table, java.lang.String[] columns)
          Initializes the update operation on the server with the given row.
 void toSdoDimTable(java.lang.String table)
          Updated the lower and upper bounds of the SDODIM table if necessary.
 void toTable(java.lang.String table, java.lang.String[] columns, java.lang.String where)
          Prepares to update rows in a DBMS table.
 
Methods inherited from class com.esri.sde.sdk.client.SeStreamOp
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
 

Constructor Detail

SeUpdate

public SeUpdate(SeConnection conn)
         throws SeException
Creates a new SeUpdate object, given an SeConnection. This creates a stream between the ArcSDE client and server, which is used to transmit features and/or attribute data.

Throws:
SeException
Method Detail

copyStateRows

public void copyStateRows(java.lang.String tableName,
                          SeObjectId[] rowIdList)
                   throws SeException
Copies rows from the differences state to the source state. The rowId is not changed. Both a source state and a differences state must be set using setState().

Parameters:
tableName - the table that contains the differences.
rowIdList - the list of ROWIDs to copy from differences states to the source state.
Throws:
SeException

toSdoDimTable

public void toSdoDimTable(java.lang.String table)
                   throws SeException
Updated the lower and upper bounds of the SDODIM table if necessary.

Parameters:
table - The business table name.
Throws:
SeException

toTable

public void toTable(java.lang.String table,
                    java.lang.String[] columns,
                    java.lang.String where)
             throws SeException
Prepares to update rows in a DBMS table. If the where clause is null or empty, all rows will be updated. If a spatial column is specified, all features in the table/layer will be updated to the specified feature, duplicating that featuer N times.

Parameters:
table - The name of the table with the row.
columns - The names of the columns whose values will be updated.
where - The where clause specifying which rows to update.
Throws:
SeException

restoreRows

public void restoreRows(java.lang.String table,
                        SeObjectId[] rowIdList)
                 throws SeException
Restores a set of rows in a miltiversion table to the values they held at the creation of the currently set version.

Throws:
SeException

restoreRowsFromLineageByRowId

public void restoreRowsFromLineageByRowId(java.lang.String table,
                                          SeObjectId[] rowIdList)
                                   throws SeException
Restores a set of rows in a miltiversion table to the values they held at the creation of the currently set version.

Throws:
SeException

getNumColumns

public int getNumColumns()
                  throws SeException
Returns the number of columns on the update.

Throws:
SeException

getRowToSet

public SeRow getRowToSet()
                  throws SeException
Returns a row object to set for this write operation.

Throws:
SeException

singleRow

public SeRow singleRow(SeObjectId rowId,
                       java.lang.String table,
                       java.lang.String[] columns)
                throws SeException
Initializes the update operation on the server with the given row. This method is useful when updating a single row. This operation can only be used on registered tables.

Parameters:
rowId - The id of the row to be updated.
table - The name of the table with the row.
columns - The names of the columns whose values will be updated.
Returns:
SeRow The row object to set the column values in.
Throws:
SeException

setWriteMode

public void setWriteMode(boolean buffered)
                  throws SeException
Deprecated. at ArcSDE version 9.1, SeUpdate streams cannot be buffered.

Turns buffering on or off.

Throws:
SeException

cancel

public void cancel(boolean reset)
            throws SeException
Cancels the current update operation. If reset is TRUE, the update status is set to INACTIVE and the update stream is reset as if it were just created. If reset is FALSE the update status is set to CLOSED and the update stream is cancelled but the buffered write mode property value is retained.

Overrides:
cancel in class SeStreamOp
Throws:
SeException

close

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

Overrides:
close in class SeStreamOp
Throws:
SeException