Package com.mchange.v2.c3p0.cfg
Class C3P0ConfigUtils
- java.lang.Object
-
- com.mchange.v2.c3p0.cfg.C3P0ConfigUtils
-
public final class C3P0ConfigUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPS_FILE_PROP_PFX
static int
PROPS_FILE_PROP_PFX_LEN
static java.lang.String
PROPS_FILE_RSRC_PATH
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static C3P0Config
configFromFlatDefaults(java.util.HashMap flatDefaults)
static java.lang.Boolean
extractBooleanUserOverride(java.lang.String propName, java.lang.String userName, java.util.Map userOverrides)
static java.util.HashMap
extractC3P0PropertiesResources()
static java.util.HashMap
extractHardcodedC3P0Defaults()
static java.util.HashMap
extractHardcodedC3P0Defaults(boolean stringify_coercibles)
static java.lang.Integer
extractIntUserOverride(java.lang.String propName, java.lang.String userName, java.util.Map userOverrides)
static java.lang.Object
extractUserOverride(java.lang.String propName, java.lang.String userName, java.util.Map userOverrides)
static java.util.Properties
findResourceProperties()
static java.lang.String
getPropsFileConfigProperty(java.lang.String prop)
-
-
-
Field Detail
-
PROPS_FILE_RSRC_PATH
public static final java.lang.String PROPS_FILE_RSRC_PATH
- See Also:
- Constant Field Values
-
PROPS_FILE_PROP_PFX
public static final java.lang.String PROPS_FILE_PROP_PFX
- See Also:
- Constant Field Values
-
PROPS_FILE_PROP_PFX_LEN
public static final int PROPS_FILE_PROP_PFX_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
extractHardcodedC3P0Defaults
public static java.util.HashMap extractHardcodedC3P0Defaults(boolean stringify_coercibles)
- Parameters:
stringify_coercibles
- these properties may eventually be used to initialize bean properties reflectively. to avoid having to get types exactly right (e.g. is it a Double or a double or an int?), it can be convenient to just represent these values as Strings and coerce those to the appropriate type when needed using com.mchange.v2.lang.Coerce. If true, we convert all coercible values into Strings. Non-coercible values are always left alone.
-
extractHardcodedC3P0Defaults
public static java.util.HashMap extractHardcodedC3P0Defaults()
-
extractC3P0PropertiesResources
public static java.util.HashMap extractC3P0PropertiesResources()
-
configFromFlatDefaults
public static C3P0Config configFromFlatDefaults(java.util.HashMap flatDefaults)
-
getPropsFileConfigProperty
public static java.lang.String getPropsFileConfigProperty(java.lang.String prop)
-
findResourceProperties
public static java.util.Properties findResourceProperties()
-
extractUserOverride
public static java.lang.Object extractUserOverride(java.lang.String propName, java.lang.String userName, java.util.Map userOverrides)
- Returns:
- null if no per-user override is found
-
extractBooleanUserOverride
public static java.lang.Boolean extractBooleanUserOverride(java.lang.String propName, java.lang.String userName, java.util.Map userOverrides)
-
extractIntUserOverride
public static java.lang.Integer extractIntUserOverride(java.lang.String propName, java.lang.String userName, java.util.Map userOverrides)
-
-