org.sqlite.auth
Class Authorizer

java.lang.Object
  extended by org.sqlite.callback.Callback
      extended by org.sqlite.auth.Authorizer

public abstract class Authorizer
extends Callback

Compile-Time Authorization class.

See Also:
Compile-Time Authorization Callbacks, JdbcConnection.setAuthorizer(Authorizer), JdbcConnection.clearAuthorizer()

Constructor Summary
Authorizer()
           
 
Method Summary
 void register(SWIGTYPE_p_sqlite3 db)
          invoke sqlite3_set_authorizer() 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 xAuth(int action, java.lang.String str1, java.lang.String str2, java.lang.String database, java.lang.String triggerOrView)
          Called from the sqlite3_prepare(), sqlite3_prepare_v2() function.
 
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

Authorizer

public Authorizer()
Method Detail

register

public final void register(SWIGTYPE_p_sqlite3 db)
                    throws java.sql.SQLException
invoke sqlite3_set_authorizer() 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.
Throws:
java.sql.SQLException - When the return value of the sqlite3_set_authorizer() function is not SQLITE_OK.
See Also:
Database.setAuthorizer(Authorizer)

unregister

public final void unregister(SWIGTYPE_p_sqlite3 db)
                      throws java.sql.SQLException
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.
Throws:
java.sql.SQLException - When the return value of the sqlite3_set_authorizer() function is not SQLITE_OK.
See Also:
Database.clearAuthorizer()

xAuth

protected abstract int xAuth(int action,
                             java.lang.String str1,
                             java.lang.String str2,
                             java.lang.String database,
                             java.lang.String triggerOrView)
Called from the sqlite3_prepare(), sqlite3_prepare_v2() function.

Parameters:
action - action code
str1 - see alto 'Authorizer Action Codes' page
str2 - see alto 'Authorizer Action Codes' page
database - database name
triggerOrView - trigger or view name
Returns:
SQLITE_OK or SQLITE_DENY or SQLITE_IGNORE
See Also:
Compile-Time Authorization Callbacks, Authorizer Action Codes, Authorizer Return Codes