public class DatabaseConfig extends Object
DatabaseConnection
.Modifier and Type | Class and Description |
---|---|
static class |
DatabaseConfig.ConfigProperty |
Modifier and Type | Field and Description |
---|---|
static String[] |
ALL_FEATURES
A list of all features as strings
|
static DatabaseConfig.ConfigProperty[] |
ALL_PROPERTIES
A list of all properties as
DatabaseConfig.ConfigProperty objects. |
static String |
FEATURE_BATCHED_STATEMENTS |
static String |
FEATURE_CASE_SENSITIVE_TABLE_NAMES |
static String |
FEATURE_DATATYPE_WARNING |
static String |
FEATURE_QUALIFIED_TABLE_NAMES |
static String |
FEATURE_SKIP_ORACLE_RECYCLEBIN_TABLES |
static String |
PROPERTY_BATCH_SIZE |
static String |
PROPERTY_DATATYPE_FACTORY |
static String |
PROPERTY_ESCAPE_PATTERN |
static String |
PROPERTY_FETCH_SIZE |
static String |
PROPERTY_PRIMARY_KEY_FILTER |
static String |
PROPERTY_RESULTSET_TABLE_FACTORY |
static String |
PROPERTY_STATEMENT_FACTORY |
static String |
PROPERTY_TABLE_TYPE |
Constructor and Description |
---|
DatabaseConfig() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkObjectAllowed(String property,
Object value)
Checks whether the given value has the correct java type for the given property.
|
static DatabaseConfig.ConfigProperty |
findByName(String property)
Searches the
DatabaseConfig.ConfigProperty object for the property with the given name |
boolean |
getFeature(String name)
Look up the value of a feature flag.
|
Object |
getProperty(String name)
Look up the value of a property.
|
void |
setFeature(String name,
boolean value)
Set the value of a feature flag.
|
void |
setProperty(String name,
Object value)
Set the value of a property.
|
String |
toString() |
public static final String PROPERTY_STATEMENT_FACTORY
public static final String PROPERTY_RESULTSET_TABLE_FACTORY
public static final String PROPERTY_DATATYPE_FACTORY
public static final String PROPERTY_ESCAPE_PATTERN
public static final String PROPERTY_TABLE_TYPE
public static final String PROPERTY_PRIMARY_KEY_FILTER
public static final String PROPERTY_BATCH_SIZE
public static final String PROPERTY_FETCH_SIZE
public static final DatabaseConfig.ConfigProperty[] ALL_PROPERTIES
DatabaseConfig.ConfigProperty
objects.
The objects contain the allowed java type and whether or not a property is nullable.public static final String FEATURE_CASE_SENSITIVE_TABLE_NAMES
public static final String FEATURE_QUALIFIED_TABLE_NAMES
public static final String FEATURE_BATCHED_STATEMENTS
public static final String FEATURE_DATATYPE_WARNING
public static final String FEATURE_SKIP_ORACLE_RECYCLEBIN_TABLES
public static final String[] ALL_FEATURES
public void setFeature(String name, boolean value)
name
- the feature idvalue
- the feature statuspublic boolean getFeature(String name)
name
- the feature idpublic void setProperty(String name, Object value)
name
- the property idvalue
- the property valuepublic Object getProperty(String name)
name
- the property idprotected void checkObjectAllowed(String property, Object value)
IllegalArgumentException
is thrown.property
- The property to be setvalue
- The value to which the property should be setpublic static final DatabaseConfig.ConfigProperty findByName(String property)
DatabaseConfig.ConfigProperty
object for the property with the given nameproperty
- The property for which the enumerated object should be resolvednull
if it was not found.Copyright © 2002-2012. All Rights Reserved.