|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.database.DatabaseOptions
public final class DatabaseOptions
Defines general database options.
Currently there is one supported option:
foreign_key_constraints
- Can be on
or off
. This
option specifies whether foreign key constraints are enforced. The default is off
.
The foreign-key constraint enforcement state is not stored in the database file, and thus,
it can be set to a different state each time the database is opened. So for example, if a
database is created with foreign-key constraints on, it can then be closed and re-opened with
foreign-key constraints off. See http://www.sqlite.org/foreignkeys.html for more details on
foreign-key support in SQLite.
Constructor Summary | ||
---|---|---|
|
DatabaseOptions()
Creates database options with default values. |
Method Summary | ||
---|---|---|
|
boolean |
foreignKeyConstraintsOn()
Returns whether foreign key constraint is turned ON |
|
void |
set(String key,
String value)
Sets a new key-value pair. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseOptions()
Method Detail |
---|
public void set(String key, String value) throws DatabaseOptionsSetInvalidKeyException, DatabaseOptionsSetInvalidValueException
key
- The key to be set; for example, foreign_key_constraints
.value
- The value to be set; for example, on
or off
.
DatabaseOptionsSetInvalidKeyException
- If an invalid key was specified.
DatabaseOptionsSetInvalidValueException
- If an invalid value for a key was specified.public boolean foreignKeyConstraintsOn()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal