| java.lang.Object org.mandarax.jdbc.server.ServerFacade
All known Subclasses: org.mandarax.jdbc.server.DefaultServerFacade,
ServerFacade | abstract public class ServerFacade implements LogCategories(Code) | | Facade for a knowledge base jdbc server. Tis class is abstract.
A typical implementation could use servlets (in particular sessions).
author: Jens Dietrich version: 3.3.2 <29 December 2004> since: 3.0 |
Method Summary | |
abstract public void | Close(String id) Close an object (connection, statement or result set). | abstract public String | Connection_createStatement(String connectionId) Create a statement.
Parameters: connectionId - a connection id a statement id. | abstract public String | Connection_getMetaData_getColumns(String connectionId, String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Get the column info. | abstract public String | Connection_getMetaData_getTables(String connectionId, String catalog, String schemaPattern, String tableNamePattern, String[] types) Retrieves a description of the tables available in the given catalog. | abstract public String | Connection_prepareStatement(String connectionId, String sql) Prepare a statement.
Parameters: connectionId - a connection id Parameters: sql - a sql statement (with ? as parameter placeholders) a statement id. | abstract public String | CreateConnection(String serverId, String url) Create a connection.
Parameters: serverId - .. | abstract public void | PreparedStatement_clearParameters(String statementId) Clear the parameters. | abstract public String | PreparedStatement_executeQuery(String statementId) Perform a query. | abstract public void | PreparedStatement_setObject(String statementId, int parameterIndex, Object x) Set the object on a certain index. | abstract public ResultSetMetaData | ResultSet_getMetaData(String resultsetId) Return the result set meta data. | abstract public Record | ResultSet_next(String id) Fetch the next row from a result set. | abstract public List | ResultSet_nextRows(String id, int rows) Fetch the next rows from a result set.
This is usually more effective than fetching a single row (but can also
be dangerous, e.g. | abstract public void | Statement_execute(String statementId) Perform a query. | abstract public String | Statement_executeQuery(String statementId, String sql) Perform a query. | abstract public String | Statement_getResultSet(String statementId) Get the current result set. | public String | convertToLocalUrl(String url) Convert a db url to a local url. | abstract public CallResult | perform(Call call) Invoke a call. | abstract public void | release() Release all resources. |
PREPARED_STATEMENT | final public static String PREPARED_STATEMENT(Code) | | |
Close | abstract public void Close(String id) throws Exception(Code) | | Close an object (connection, statement or result set).
Parameters: id - the id of the object to be closed |
Connection_createStatement | abstract public String Connection_createStatement(String connectionId) throws Exception(Code) | | Create a statement.
Parameters: connectionId - a connection id a statement id. |
Connection_getMetaData_getColumns | abstract public String Connection_getMetaData_getColumns(String connectionId, String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws Exception(Code) | | Get the column info. Only the result set id is returned,
rows are returned using next(), and the result set is assembled
on the client side.
Parameters: connectionId - a connection id Parameters: sql - an sql SELECT command Parameters: catalog - Parameters: schemaPattern - Parameters: tableNamePattern - Parameters: columnNamePattern - a result set id. |
Connection_getMetaData_getTables | abstract public String Connection_getMetaData_getTables(String connectionId, String catalog, String schemaPattern, String tableNamePattern, String[] types) throws Exception(Code) | | Retrieves a description of the tables available in the given catalog.
Only the result set id is returned, rows are returned using next(), and
the result set is assembled on the client side.
Parameters: connectionId - a connection id Parameters: sql - an sql SELECT command Parameters: catalog - Parameters: schemaPattern - Parameters: tableNamePattern - Parameters: types - a result set id. |
Connection_prepareStatement | abstract public String Connection_prepareStatement(String connectionId, String sql) throws Exception(Code) | | Prepare a statement.
Parameters: connectionId - a connection id Parameters: sql - a sql statement (with ? as parameter placeholders) a statement id. |
CreateConnection | abstract public String CreateConnection(String serverId, String url) throws Exception(Code) | | Create a connection.
Parameters: serverId - .. currently ignored (but expected - do not remove) Parameters: url - the local database url a connection id. |
PreparedStatement_clearParameters | abstract public void PreparedStatement_clearParameters(String statementId) throws Exception(Code) | | Clear the parameters.
Parameters: statementId - a statement id |
PreparedStatement_executeQuery | abstract public String PreparedStatement_executeQuery(String statementId) throws Exception(Code) | | Perform a query. Only the result set id is returned,
rows are returned using next(), and the result set is assembled
on the client side.
Parameters: statementId - a statement id a result set id. |
PreparedStatement_setObject | abstract public void PreparedStatement_setObject(String statementId, int parameterIndex, Object x) throws SQLException(Code) | | Set the object on a certain index.
Parameters: statementId - a statement id Parameters: parameterIndex - the index Parameters: x - the object |
ResultSet_getMetaData | abstract public ResultSetMetaData ResultSet_getMetaData(String resultsetId) throws Exception(Code) | | Return the result set meta data.
Parameters: resultsetId - a result set id result set meta data |
ResultSet_next | abstract public Record ResultSet_next(String id) throws Exception(Code) | | Fetch the next row from a result set.
Parameters: id - the result set id a record or null indicating that there is no (more) row |
ResultSet_nextRows | abstract public List ResultSet_nextRows(String id, int rows) throws Exception(Code) | | Fetch the next rows from a result set.
This is usually more effective than fetching a single row (but can also
be dangerous, e.g. in case the computation of the second result is slow).
Parameters: id - the result set id Parameters: rows - the number of rows a list of records |
Statement_execute | abstract public void Statement_execute(String statementId) throws Exception(Code) | | Perform a query.
Parameters: statementId - a statement id |
Statement_executeQuery | abstract public String Statement_executeQuery(String statementId, String sql) throws Exception(Code) | | Perform a query. Only the result set id is returned,
rows are returned using next(), and the result set is assembled
on the client side.
Parameters: statementId - a statement id Parameters: sql - an sql SELECT command a result set id. |
Statement_getResultSet | abstract public String Statement_getResultSet(String statementId) throws Exception(Code) | | Get the current result set. Only the result set id is returned,
rows are returned using next(), and the result set is assembled
on the client side.
Parameters: statementId - a statement id a result set id. |
convertToLocalUrl | public String convertToLocalUrl(String url)(Code) | | Convert a db url to a local url.
Parameters: a - db url a local db url (to be used by the local driver) |
perform | abstract public CallResult perform(Call call)(Code) | | Invoke a call. No exception is thrown. Instead, all exception are
caught and an ExceptionResult is returned.
Parameters: call - a call a value |
release | abstract public void release() throws Exception(Code) | | Release all resources.
|
|
|