public class StoreConnection
extends Object
| Constructor and Description |
|---|
StoreConnection(Connection connection,
boolean shared)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the actual Connection.
|
void |
commit()
Commits.
|
Statement |
createStatement()
Creates a statement.
|
DatabaseMetaData |
getDatabaseMetaData()
Gets the database metadata.
|
boolean |
hasTable(Optional<String> catalogName,
String schemaName,
String tableName)
Asks if the connected database has the specified table.
|
void |
lock()
Locks.
|
PreparedStatement |
prepareStatement(CharSequence sql)
Prepares a SQL statement.
|
void |
rollback()
Rolls back.
|
void |
tearDown()
Tears down the connection.
|
void |
unlock()
Unlocks.
|
public StoreConnection(@Nonnull
Connection connection,
boolean shared)
connection - The actual Connection.shared - True if this connection is shared.public final void close()
public final void commit()
@Nonnull @CheckReturnValue public final Statement createStatement()
@Nonnull @CheckReturnValue public final DatabaseMetaData getDatabaseMetaData()
@CheckReturnValue
public final boolean hasTable(@Nonnull
Optional<String> catalogName,
@Nonnull
String schemaName,
@Nonnull
String tableName)
catalogName - The catalog name.schemaName - The schema name.tableName - The table name.public void lock()
@Nonnull
@CheckReturnValue
public final PreparedStatement prepareStatement(@Nonnull
CharSequence sql)
sql - The SQL for the statement.public final void rollback()
public void tearDown()
public void unlock()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.