| java.lang.Object org.castor.ddlgen.Configuration
All known Subclasses: org.castor.ddlgen.DDLGenConfiguration,
Configuration | public class Configuration (Code) | | Handle the configuration for DDL generator including load configuration files,
manage configuration values.
author: Le Duc Bao author: Ralf Joachim version: $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $ since: 1.1 |
Field Summary | |
final public static String | FALSE String representation of boolean false . | final public static String | TRUE String representation of boolean true . |
Constructor Summary | |
public | Configuration() Constructor for Configuration. |
Method Summary | |
final public void | addProperties(Properties props) add properties (key, value) for configuration, the existed item will
be overwrited. | final public void | addProperties(String filename) add properties (key, value) for configuration, the existed item will
be overwrited. | final public boolean | getBoolValue(String key) get boolean value associated with key in the configuration files.
Parameters: key - key return value associated with key. | final public boolean | getBoolValue(String key, boolean defaultValue) get boolean value associated with key in the configuration files.
Parameters: key - key Parameters: defaultValue - default value return value associated with key. | final public Integer | getInteger(String name) Get property with given name as Integer value. | final public String | getStringValue(String key) get String value associated with key in the configuration files.
Parameters: key - key return value associated with key. | final public String | getStringValue(String key, String defaultValue) get String value associated with key in the configuration files.
Parameters: key - key Parameters: defaultValue - default value return value associated with key. | final public void | setProperty(String key, String value) set property value, this will overwrite the loaded value. |
FALSE | final public static String FALSE(Code) | | String representation of boolean false .
|
TRUE | final public static String TRUE(Code) | | String representation of boolean true .
|
Configuration | public Configuration()(Code) | | Constructor for Configuration.
|
addProperties | final public void addProperties(Properties props)(Code) | | add properties (key, value) for configuration, the existed item will
be overwrited.
Parameters: props - properties |
addProperties | final public void addProperties(String filename) throws GeneratorException(Code) | | add properties (key, value) for configuration, the existed item will
be overwrited.
Parameters: filename - a properties file throws: GeneratorException - generator error |
getBoolValue | final public boolean getBoolValue(String key, boolean defaultValue)(Code) | | get boolean value associated with key in the configuration files.
Parameters: key - key Parameters: defaultValue - default value return value associated with key. If not exists, return the default value |
getInteger | final public Integer getInteger(String name)(Code) | | Get property with given name as Integer value. If property is not
available or can not be interpreted as integer null will be returned.
Parameters: name - Name of the property. The configured Integer property or null if property is notavailable or can not be interpreted as integer. |
getStringValue | final public String getStringValue(String key, String defaultValue)(Code) | | get String value associated with key in the configuration files.
Parameters: key - key Parameters: defaultValue - default value return value associated with key. If not exists, return defaultvalue |
setProperty | final public void setProperty(String key, String value)(Code) | | set property value, this will overwrite the loaded value.
Parameters: key - key Parameters: value - value |
|
|