com.esri.sde.sdk.client
Class SeInsert

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

public class SeInsert
extends SeStreamOp

Used to insert data into tables/layers and rows in an ArcSDE instance.

A typical SeInsert operation sequence is:

1) Create a new SeInsert object.
2) Initialize an insert operation into a table.
3) Call getRowToSet() and set the column values of the returned SeRow object.
4) Execute the insert operation for each new row.
5) If stream buffering is enabled, call SeStreamOp.flushBufferedWrites() to flush the stream and transmit the data to the ArcSDE server.
6) Close the insert object to release the resources held on the ArcSDE server and client.

See Also:
SeRow

Constructor Summary
SeInsert(SeConnection conn)
          Creates an SeInsert object given an SeConnection.
 
Method Summary
 void cancel(boolean reset)
          Cancels the current insert operation.
 void close()
          Closes this insert object and releases it back to the stream pool.
 int getNumColumns()
          Returns the number of columns on the query.
 SeRow getRowToSet()
          Returns a row object to set for this write operation.
 void intoTable(java.lang.String table, java.lang.String[] columns)
          Prepares the SeInsert object to insert data into the specified ArcSDE table or layer.
 SeObjectId lastInsertedRasterId()
          Returns the most recently inserted Raster_ID.
 SeObjectId lastInsertedRowId()
          Returns the row id for the row most recently having an INSERT executed on this stream operation.
 void setWriteMode(boolean buffered)
          Turns buffering on or off for insert operations.
 
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

SeInsert

public SeInsert(SeConnection conn)
         throws SeException
Creates an SeInsert 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

intoTable

public void intoTable(java.lang.String table,
                      java.lang.String[] columns)
               throws SeException
Prepares the SeInsert object to insert data into the specified ArcSDE table or layer.

Throws:
SeException

getNumColumns

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

Throws:
SeException

getRowToSet

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


lastInsertedRasterId

public SeObjectId lastInsertedRasterId()
                                throws SeException
Returns the most recently inserted Raster_ID.

Throws:
SeException

lastInsertedRowId

public SeObjectId lastInsertedRowId()
                             throws SeException
Returns the row id for the row most recently having an INSERT executed on this stream operation. The table the INSERT is operating on must be a registered table, with ArcSDE maintained rowIds.

Throws:
SeException

setWriteMode

public void setWriteMode(boolean buffered)
                  throws SeException
Turns buffering on or off for insert operations.

Throws:
SeException

cancel

public void cancel(boolean reset)
            throws SeException
Cancels the current insert operation. If reset is TRUE, the insert status is set to INACTIVE and the insert stream is reset as if it were just created. If reset is FALSE the insert status is set to CLOSED and the insert 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 insert object and releases it back to the stream pool.

Overrides:
close in class SeStreamOp
Throws:
SeException