org.sqlite.event
Class CommitHook

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

public abstract class CommitHook
extends Callback

COMMIT TRANSACTION hook class.

See Also:
Commit And Rollback Notification Callbacks, JdbcConnection.setCommitHook(CommitHook), JdbcConnection.clearCommitHook()

Constructor Summary
CommitHook()
           
 
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_commit_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  int xCommit()
          invoked whenever a transaction is committed.
 
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

CommitHook

public CommitHook()
Method Detail

register

public final void register(SWIGTYPE_p_sqlite3 db)
invoke sqlite3_commit_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.setCommitHook(CommitHook)

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.clearCommitHook()

xCommit

protected abstract int xCommit()
invoked whenever a transaction is committed.

Returns:
0 if the transaction is commited. non-zero if the transaction is rollbacked.