Both fix columns (the ones which have "cd_" prefix in their
names) and additional columns can be set using the class.

WARNING!
For optimization reasons logs are buffered in UpdateHandler from JChem 5.4.
When you use transactions saveUpdateLogs() must be called in order
to flush buffers before you commit!
(close() method performs a call to saveUpdateLogs(), no
extra calls are needed.)

setDuplicateFiltering

If set to DUPLICATE_FILTERING_ON does not
import molecules that already exist in the table with the same
topology. Forces switching ON duplicate filtering regardless
of table setting. This checking may slow down the import
progress.

If set to DUPLICATE_FILTERING_OFF duplicates
are allowed. Forces switching OFF duplicate filtering
regardless of table setting.

execute

Executes the update or insert operation.
Stays in the same transaction if Connection.getAutoCommit()==false

Parameters:

returnLastId - if true, then gets the last inserted ID and
returns it.NOTE: works with ORACLE, DB2, MySQL, MSSQLServer, InterBase,
PostgreSQL and MSAccess

Returns:

the last inserted id, or zero if returnLastId is
false or the operation is update. If
duplicateFiltering is on, returns the cd_id of the
already existing structure in the database as a negative value.
(regardless of returnLastId).

Throws:

java.sql.SQLException - if an error occurs

close

public void close()
throws java.sql.SQLException

Closes the handler (required to call). Closes the prepared statements
applied and writes the changes to the log table (required for correct
cache update).

Throws:

java.sql.SQLException - if an error occurs

saveUpdateLogs

public void saveUpdateLogs()
throws java.sql.SQLException

Saves the current - possibly buffered - update log(s). Must be called
before committing updates in transaction!

Throws:

java.sql.SQLException - if an error occurs

deleteRows

Deletes the specified rows from a structure table. Also deletes the
appropriate rows from the corresponding Molecular Descriptor tables, if
present and needed. (Referential integrity is used to take care of that
for most RDBMSs). This method is best suited to delete large number of
rows. The IDs of the deleted structures will not be logged individually,
therefore the cache update may take some time after the operation. For
deleting a small amount of records using
deleteRow(chemaxon.util.ConnectionHandler, String, int) is
recommended.

Parameters:

conh - connection to the database

tableName - name of structure table to be modified

where - the WHERE part of the SQL statement deleting the
rows. E.g. "WHERE cd_id IN (23, 247, 786)
". If null or empty string all rows will be
deleted.

deleteRows

Deletes the specified rows from a structure table. Also deletes the
appropriate rows from the corresponding Molecular Descriptor tables, if
present and needed. (Referential integrity is used to take care of that
for most RDBMSs). This method is best suited to delete large number of
rows. The IDs of the deleted structures will not be logged individually,
therefore the cache update may take some time after the operation. For
deleting a small amount of records using
deleteRow(chemaxon.util.ConnectionHandler, String, int) is
recommended.

Parameters:

conh - connection to the database

tableName - name of structure table to be modified

where - the WHERE part of the SQL statement deleting the
rows. E.g. "WHERE cd_id IN (23, 247, 786)
". If null or empty string all rows will be
deleted.

deleteRow

Deletes the specified rows from a structure table. Also deletes the
appropriate rows from the corresponding Molecular Descriptor tables, if
present and needed. (Referential integrity is used to take care of that
for most RDBMSs). Use this method to delete relatively small amount of
records. The ID of each structure is logged in the update log table
providing efficient cache update after the operation. For deleting a
large amount of records using
deleteRows(chemaxon.util.ConnectionHandler, String, String) is
recommended.

deleteRow

Deletes the specified rows from a structure table. Also deletes the
appropriate rows from the corresponding Molecular Descriptor tables, if
present and needed. (Referential integrity is used to take care of that
for most RDBMSs). Use this method to delete relatively small amount of
records. if enableLoggingThe ID of each structure is logged in the update
log table providing efficient cache update after the operation. For
deleting a large amount of records using
deleteRows(chemaxon.util.ConnectionHandler, String, String) is
recommended.