| Modifier and Type | Field and Description |
|---|---|
static String |
EMBEDDED_DRIVER |
static String |
NETWORK_SERVER_DRIVER |
static String |
PROTOCOL |
| Constructor and Description |
|---|
DerbyDatabase(String directory)
Constructor
|
DerbyDatabase(String directory,
boolean networkServer) |
| Modifier and Type | Method and Description |
|---|---|
void |
create()
Creates this database
|
Connection |
getConnection()
Retrieves a connection to this database
|
boolean |
hasTable(String tableName)
Checks whether the specified table is created within this database (does not check schema)
|
boolean |
hasTable(String schemaName,
String tableName)
Checks whether the specified table is created within this database
|
void |
shutdown()
Shuts down this database
|
public static final String EMBEDDED_DRIVER
public static final String NETWORK_SERVER_DRIVER
public static final String PROTOCOL
public DerbyDatabase(String directory) throws DerbyDatabaseException
directory - the directory where the database should be placedDerbyDatabaseException - if the database engine can not be load for some reasonspublic DerbyDatabase(String directory, boolean networkServer) throws DerbyDatabaseException
DerbyDatabaseExceptionpublic void create()
throws SQLException
Databasecreate in interface DatabaseSQLException - if any errors occurpublic void shutdown()
Databasepublic Connection getConnection() throws SQLException
DatabasegetConnection in interface DatabaseSQLException - if any errors occurpublic boolean hasTable(String tableName) throws SQLException
DatabasehasTable in interface DatabasetableName - the name of the table to checkSQLException - if any I/O errors occurpublic boolean hasTable(String schemaName, String tableName) throws SQLException
DatabasehasTable in interface DatabaseschemaName - the database schema nametableName - the name of the table to checkSQLException - if any I/O errors occurCopyright © 2023 The Apache Software Foundation. All rights reserved.