Package net.sf.basedb.opengrid.json
Class JSONOptions
public class JSONOptions extends AbstractLockable<JSONOptions>
Options for converting other information to
JSON data.
- Since:
- 1.0
- Author:
- nicklas
-
Field Summary
Fields Modifier and Type Field Description private DbControl
dc
static JSONOptions
DEFAULT
Use default options.private Set<JSONOption>
options
-
Constructor Summary
Constructors Constructor Description JSONOptions()
Create a new options instance.JSONOptions(DbControl dc)
Create a new options instance with the possibility to access the BASE database. -
Method Summary
Modifier and Type Method Description void
disable(JSONOption option)
Disable the given option.void
enable(JSONOption option)
Enable the given option.DbControl
getDbControl()
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
-