| java.lang.Object net.sourceforge.orbroker.Broker
Broker | public Broker(DataSource dataSource, String username, String password)(Code) | | Create Broker without a configuration.
Parameters: dataSource - A data source Parameters: username - Username to use that is different than on data source Parameters: password - Password for username See Also: Broker.addStatement(String,String) |
Broker | public Broker(InputStream configuration, DataSource dataSource, String username, String password) throws BrokerException(Code) | | The Broker is configured by passing an
InputStream containing an
XML file and a data source with username and password.
Parameters: configuration - The XML configuration Parameters: dataSource - A data source Parameters: username - Username to use that is different than on data source Parameters: password - Password for username throws: BrokerException - |
addLoggingHandler | public static void addLoggingHandler(Handler handler)(Code) | | Add logging handler. When adding a logging handler, the default console
log handler is automatically removed. Previously added handlers remain.
Parameters: handler - Logging handler. See Also: Handler See Also: Broker.addLoggingHandler(Handler,boolean) |
addLoggingHandler | public static void addLoggingHandler(Handler handler, boolean keepDefaultHandler)(Code) | | Add logging handler. Previously added handlers remain.
Parameters: handler - Logging handler. Parameters: keepDefaultHandler - true, if default console log handler should remain See Also: Handler See Also: Broker.addLoggingHandler(Handler) |
getDataSource | public DataSource getDataSource()(Code) | | Get the data source used by Broker.
The datasource used. |
getFreshConnection | Connection getFreshConnection(Integer isolationLevel)(Code) | | Get fresh connection from data source.
Parameters: isolationLevel - Fresh connection |
getName | public String getName()(Code) | | Get brokerName of Broker.
Name of broker |
getResultSetType | static int getResultSetType(boolean scrollableSupport)(Code) | | Parameters: scrollableSupport - result set type |
getTransactionIsolationLevel | static String getTransactionIsolationLevel(int isolationLevel)(Code) | | |
log | public static void log(Level level, String message)(Code) | | Log a message.
Parameters: level - Log level Parameters: message - Log message |
releaseExecutable | public void releaseExecutable(Executable executable)(Code) | | Release Executable. This will drop the internal Connection and prevent
other processes, which may hold a reference to the Executable, from
executing statements on a Connection that may have been returned to a
DataSource connection pool.
Releasing the Executable will not close the connection.
Parameters: executable - The Executable to release throws: BrokerException - if the Executable was not obtained from this Broker See Also: Broker.obtainExecutable(Connection) |
setCatalog | public void setCatalog(String catalog)(Code) | | Set the catalog.
Parameters: catalog - The catalog name |
setDataSource | public void setDataSource(DataSource dataSource)(Code) | | Set the data source. Uses default username and password.
Parameters: dataSource - The data source |
setDataSource | public void setDataSource(DataSource dataSource, String username, String password)(Code) | | Set data source and username/password.
Parameters: dataSource - The data source Parameters: username - Username to use that is different than on data source Parameters: password - Password for username |
setExceptionEvaluator | public void setExceptionEvaluator(ExceptionEvaluator evaluator)(Code) | | Set a new exception evaluator.
Parameters: evaluator - The exception evaluator instance |
setLoggingLevel | public static void setLoggingLevel(Level level)(Code) | | Set the logging level. Log level definitions:
- WARNING: Used for internally caught exceptions not considered severe.
- INFO: Shows transaction boundaries and SQL statements executed.
- CONFIG: Information about driver support and configuration setup
- FINE: Shows dynamic SQL statement after parsing.
Parameters: level - Logging level |
setTextReplacement | public void setTextReplacement(String key, String value)(Code) | | Set a text replacement value. This will replace a {{key}}
string with the specific parameter value.
Parameters: key - Text replacement key Parameters: value - Text replacement value See Also: Broker.setTextReplacements(Properties) |
setTextReplacements | public void setTextReplacements(Properties textReplacements)(Code) | | Set text replacement values. This will replace all {{key}}
type properties in an sql-statement with the values.
Parameters: textReplacements - The replacement values to set. See Also: Broker.setTextReplacement(String,String) |
startQuery | public Query startQuery()(Code) | | Start a read-only query.
Query |
startQuery | public Query startQuery(int isolationLevel)(Code) | | Start a read-only query with a given transaction isolation level.
JDBC transaction isolation levels:
Parameters: isolationLevel - The isolation level Query |
startTransaction | public Transaction startTransaction(int isolationLevel) throws BrokerException(Code) | | Start a new transaction with a given transaction isolation level.
JDBC transaction isolation levels:
Parameters: isolationLevel - The isolation level Transaction throws: BrokerException - |
supportsBatch | boolean supportsBatch()(Code) | | |
supportsScrollable | boolean supportsScrollable()(Code) | | Returns scrollable support. |
|
|