Package com.mckoi.database
Class InternalJDBCHelper.InternalDatabaseInterface
- java.lang.Object
-
- com.mckoi.database.jdbcserver.AbstractJDBCDatabaseInterface
-
- com.mckoi.database.InternalJDBCHelper.InternalDatabaseInterface
-
- All Implemented Interfaces:
DatabaseInterface
- Enclosing class:
- InternalJDBCHelper
private static class InternalJDBCHelper.InternalDatabaseInterface extends AbstractJDBCDatabaseInterface
An implementation of DatabaseInterface used to execute queries on the DatabaseConnection and return results to the JDBC client.This is a thin implementation of jdbcserver.AbstractJDBCDatabaseInterface.
-
-
Field Summary
Fields Modifier and Type Field Description private DatabaseConnection
database
The internal connection to the database.
-
Constructor Summary
Constructors Constructor Description InternalDatabaseInterface(User user, DatabaseConnection db)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Called when the connection is disposed.boolean
login(java.lang.String default_schema, java.lang.String username, java.lang.String password, DatabaseCallBack call_back)
Attempts to log in to the database as the given username with the given password.-
Methods inherited from class com.mckoi.database.jdbcserver.AbstractJDBCDatabaseInterface
checkNotDisposed, clearResultSetMap, Debug, disposeResult, disposeStreamableObject, execQuery, finalize, getDatabase, getDatabaseConnection, getResultPart, getStreamableObjectPart, getUser, handleExecuteThrowable, init, internalDispose, pushStreamableObjectPart
-
-
-
-
Field Detail
-
database
private DatabaseConnection database
The internal connection to the database.
-
-
Constructor Detail
-
InternalDatabaseInterface
public InternalDatabaseInterface(User user, DatabaseConnection db)
Constructor.
-
-
Method Detail
-
login
public boolean login(java.lang.String default_schema, java.lang.String username, java.lang.String password, DatabaseCallBack call_back) throws java.sql.SQLException
Description copied from interface:DatabaseInterface
Attempts to log in to the database as the given username with the given password. Only one user may be authenticated per connection. This must be called before the other methods are used.A DatabaseCallBack implementation must be given here that is notified of all events from the database. Events are only received if the login was successful.
- Throws:
java.sql.SQLException
-
dispose
public void dispose() throws java.sql.SQLException
Description copied from interface:DatabaseInterface
Called when the connection is disposed. This will terminate the connection if there is any connection to terminate.- Throws:
java.sql.SQLException
-
-