org.sqlite.event
Class UpdateHook

java.lang.Object
  extended by org.sqlite.callback.Callback
      extended by org.sqlite.event.UpdateHook

public abstract class UpdateHook
extends Callback

INSERT, UPDATE, DELETE hook class.

See Also:
Data Change Notification Callbacks, JdbcConnection.setUpdateHook(UpdateHook), JdbcConnection.clearUpdateHook()

Constructor Summary
UpdateHook()
           
 
Method Summary
static void clear(SWIGTYPE_p_sqlite3 db)
          Unregister this object from the database.
WARNING! Do not use this method because it is called internally.
 void register(SWIGTYPE_p_sqlite3 db)
          invoke sqlite3_update_hook() function and this object is registered in the database.
WARNING! Do not use this method because it is called internally.
 void unregister(SWIGTYPE_p_sqlite3 db)
          Unregister this object from the database.
WARNING! Do not use this method because it is called internally.
protected abstract  void xUpdate(int action, java.lang.String dbName, java.lang.String tableName, long rowId)
          invoke when a row is updated, inserted or deleted.
 
Methods inherited from class org.sqlite.callback.Callback
delete, isRegistered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateHook

public UpdateHook()
Method Detail

register

public final void register(SWIGTYPE_p_sqlite3 db)
invoke sqlite3_update_hook() function and this object is registered in the database.
WARNING! Do not use this method because it is called internally.

Specified by:
register in class Callback
Parameters:
db - the database handle.
See Also:
Database.setUpdateHook(UpdateHook)

unregister

public final void unregister(SWIGTYPE_p_sqlite3 db)
Unregister this object from the database.
WARNING! Do not use this method because it is called internally.

Specified by:
unregister in class Callback
Parameters:
db - the database handle.
See Also:
clear(org.sqlite.swig.SWIGTYPE_p_sqlite3)

clear

public static final void clear(SWIGTYPE_p_sqlite3 db)
Unregister this object from the database.
WARNING! Do not use this method because it is called internally.

Parameters:
db - the database handle.
See Also:
Database.clearUpdateHook()

xUpdate

protected abstract void xUpdate(int action,
                                java.lang.String dbName,
                                java.lang.String tableName,
                                long rowId)
invoke when a row is updated, inserted or deleted.

Parameters:
action - SQLITE_INSERT or SQLITE_DELETE or SQLITE_UPDATE
dbName - database name
tableName - table name
rowId - rowid
See Also:
Authorizer Action Codes