Provides static methods to obtain basic configurations, create a new database, and connect to an existing database.
public class DatabaseManager
All members of DatabaseManager class, including all inherited members.
Name | Description |
---|---|
Connects to an existing database based on a Configuration and returns the Connection. | |
Creates a Configuration with a file on a Java ME device file system as the physical store and returns a ConfigFileME. | |
Creates a Configuration without a persistent store and returns a ConfigNonPersist object. | |
createConfigurationObjectStore method (Java ME BlackBerry only) |
Creates a Configuration with a RIM object store as the physical store and returns a ConfigObjectStore. |
Creates a new database based on a Configuration and returns the Connection. | |
Creates a FileTransfer object for transfering files to or from MobiLink. | |
Creates a FileTransfer object for transfering UltraLiteJ database files to or from MobiLink, and storing them into the RIM object store. | |
Creates an HTTP SISListener for server-initiated synchronizations. | |
Closes the DatabaseManager to release all connections and to shutdown all databases. | |
Sets the language to use for error messages. |
The following example demonstrates how to open an existing database, and create a new one if it does not exist.
// Java SE Sample Connection conn; ConfigFile config = DatabaseManager.createConfigurationFile( "test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } // BlackBerry Sample Connection conn; ConfigObjectStore config = DatabaseManager.createConfigurationObjectStore( "test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } // BlackBerry media card Sample Connection conn; ConfigFileME config = DatabaseManager.createConfigurationFileME( "file:///SDCard/ulj/test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } // Java ME Sample Connection conn; ConfigRecordStore config = DatabaseManager.createConfigurationRecordStore( "test.ulj" ); try { conn = DatabaseManager.connect(config); } catch(ULjException ex) { conn = DatabaseManager.createDatabase(config); // Create the schema here. } |
connect method
createConfigurationFileME method (BlackBerry only)
createConfigurationNonPersistent method
createConfigurationObjectStore method (Java ME BlackBerry only)
createDatabase method
createFileTransfer method
createObjectStoreTransfer method (Java ME BlackBerry only)
createSISHTTPListener method (Java ME BlackBerry only)
release method
setErrorLanguage method
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |