|
|||||||||
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 java.lang.String |
FALSE
String representation of boolean false . |
static java.lang.String |
TRUE
String representation of boolean true . |
Constructor Summary | |
---|---|
Configuration()
Constructor for Configuration. |
Method Summary | |
---|---|
void |
addProperties(java.util.Properties props)
add properties (key, value) for configuration, the existed item will be overwrited. |
void |
addProperties(java.lang.String filename)
add properties (key, value) for configuration, the existed item will be overwrited. |
boolean |
getBoolValue(java.lang.String key)
get boolean value associated with key in the configuration files. |
boolean |
getBoolValue(java.lang.String key,
boolean defaultValue)
get boolean value associated with key in the configuration files. |
java.lang.Integer |
getInteger(java.lang.String name)
Get property with given name as Integer value. |
java.lang.String |
getStringValue(java.lang.String key)
get String value associated with key in the configuration files. |
java.lang.String |
getStringValue(java.lang.String key,
java.lang.String defaultValue)
get String value associated with key in the configuration files. |
void |
setProperty(java.lang.String key,
java.lang.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 java.lang.String TRUE
true
.
public static final java.lang.String FALSE
false
.
Constructor Detail |
---|
public Configuration()
Method Detail |
---|
public final boolean getBoolValue(java.lang.String key) throws WrongFormatException, KeyNotFoundException
key
- key
WrongFormatException
- format error
KeyNotFoundException
- key errorpublic final boolean getBoolValue(java.lang.String key, boolean defaultValue)
key
- keydefaultValue
- default value
public final java.lang.Integer getInteger(java.lang.String name)
name
- Name of the property.
public final java.lang.String getStringValue(java.lang.String key) throws KeyNotFoundException
key
- key
KeyNotFoundException
- key errorpublic final java.lang.String getStringValue(java.lang.String key, java.lang.String defaultValue)
key
- keydefaultValue
- default value
public final void addProperties(java.util.Properties props)
props
- propertiespublic final void addProperties(java.lang.String filename) throws GeneratorException
filename
- a properties file
GeneratorException
- generator errorpublic final void setProperty(java.lang.String key, java.lang.String value)
key
- keyvalue
- value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |