|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.ddlgen.Configuration
public class Configuration
Handle the configuration for DDL generator including load configuration files, manage configuration values.
| Field Summary | |
|---|---|
static String |
FALSE
String representation of boolean false. |
static String |
TRUE
String representation of boolean true. |
| Constructor Summary | |
|---|---|
Configuration()
Constructor for Configuration. |
|
| Method Summary | |
|---|---|
void |
addProperties(Properties props)
add properties (key, value) for configuration, the existed item will be overwrited. |
void |
addProperties(String filename)
add properties (key, value) for configuration, the existed item will be overwrited. |
boolean |
getBoolValue(String key)
get boolean value associated with key in the configuration files. |
boolean |
getBoolValue(String key,
boolean defaultValue)
get boolean value associated with key in the configuration files. |
Integer |
getInteger(String name)
Get property with given name as Integer value. |
String |
getStringValue(String key)
get String value associated with key in the configuration files. |
String |
getStringValue(String key,
String defaultValue)
get String value associated with key in the configuration files. |
void |
setProperty(String key,
String value)
set property value, this will overwrite the loaded value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TRUE
true.
public static final String FALSE
false.
| Constructor Detail |
|---|
public Configuration()
| Method Detail |
|---|
public final boolean getBoolValue(String key)
throws WrongFormatException,
KeyNotFoundException
key - key
WrongFormatException - format error
KeyNotFoundException - key error
public final boolean getBoolValue(String key,
boolean defaultValue)
key - keydefaultValue - default value
public final Integer getInteger(String name)
name - Name of the property.
public final String getStringValue(String key)
throws KeyNotFoundException
key - key
KeyNotFoundException - key error
public final String getStringValue(String key,
String defaultValue)
key - keydefaultValue - default value
public final void addProperties(Properties props)
props - properties
public final void addProperties(String filename)
throws GeneratorException
filename - a properties file
GeneratorException - generator error
public final void setProperty(String key,
String value)
key - keyvalue - value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||