Package net.sf.basedb.opengrid.json
Class JSONOptions
Options for converting other information to
JSON data.
- Since:
- 1.0
- Author:
- nicklas
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DbControl
static final JSONOptions
Use default options.private final Set<JSONOption>
-
Constructor Summary
ConstructorDescriptionCreate a new options instance.JSONOptions
(DbControl dc) Create a new options instance with the possibility to access the BASE database. -
Method Summary
Modifier and TypeMethodDescriptionvoid
disable
(JSONOption option) Disable the given option.void
enable
(JSONOption option) Enable the given option.Get a DbControl which can be used to retreive information from the BASE database.boolean
isEnabled
(JSONOption option) Checks if the given option has been enabled.Methods inherited from class net.sf.basedb.opengrid.config.AbstractLockable
checkLocked, checkValid, isLocked, isValid, lock
-
Field Details
-
DEFAULT
Use default options. -
dc
-
options
-
-
Constructor Details
-
JSONOptions
public JSONOptions()Create a new options instance. -
JSONOptions
Create a new options instance with the possibility to access the BASE database.
-
-
Method Details
-
getDbControl
Get a DbControl which can be used to retreive information from the BASE database. Can be null. -
isEnabled
Checks if the given option has been enabled. -
enable
Enable the given option.- Throws:
IllegalStateException
- If this instance has been locked
-
disable
Disable the given option.- Throws:
IllegalStateException
- If this instance has been locked
-