public class EmbeddedDatabase
extends java.lang.Object
Currently the engine used is Hypersonic SQL (HSQLDB). This may change in the future, so shouldn't be depended on.
Copyright 2006 Partner Softare, Inc.
| Constructor and Description |
|---|
EmbeddedDatabase(Path path)
Creates a new embedded database for the given path.
|
EmbeddedDatabase(java.lang.String pathDescription)
Creates a new embedded database for the given path description.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the database connection and database.
|
SqlConnection |
getConnection()
Returns the database connection to the database.
|
Path |
getPath()
Returns the path to the database.
|
boolean |
isOpen()
Returns true if the database is open (connected).
|
void |
open()
Opens the database for reading and writing.
|
void |
openReadOnly()
Opens the database for reading only.
|
void |
openReadWrite()
Opens the database for reading and writing.
|
void |
remove()
Removes the database, including all data and all associated files.
|
java.lang.String |
toString() |
public EmbeddedDatabase(java.lang.String pathDescription)
public EmbeddedDatabase(Path path)
public void open()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void openReadWrite()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void openReadOnly()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void remove()
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionpublic SqlConnection getConnection()
open().public Path getPath()
public boolean isOpen()
public java.lang.String toString()
toString in class java.lang.Object