public class DatabaseFactory
extends java.lang.Object
Constructor and Description |
---|
DatabaseFactory() |
Modifier and Type | Method and Description |
---|---|
static DatabaseType[] |
getAllDatabaseTypes()
Returns all available database types which can be used on this plattform.
|
static Database |
openOrCreate(java.lang.String path)
creates new or open existing instance of database.
|
public static Database openOrCreate(java.lang.String path) throws DatabaseException
path
- - relative path to the databse file. The absolute path depends on specific platform.
platform specific defaults values are:
- Android - /data/data/${android.package}.${project.jar.name}/databases/
- Blackberry - file:///store/home/user/${project.java.midlet.name}/databases/
- on other sandboxed platforms the database is stored where appropriately determined by the operating system
if path is empty or null an in-memory-database will be opened.DatabaseException
- if Database could not be opened.public static DatabaseType[] getAllDatabaseTypes()