public class JDBCParametersParser
extends java.lang.Object
DatabaseProvider.PARAMETERS_CLASS_REFTYPE
value for
a database connection.
The algorithm uses a semicolon ";" to separate entries and equals "=" to match the key to value. It therefore assumes that no parameter name or value will contain either of these characters.
Constructor and Description |
---|
JDBCParametersParser() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createParameterString(java.util.Properties jdbcParams)
Takes the given Properties mappings and create a String that contains
all the key/value pairs, comma separated.
|
static void |
parseParameterString(java.lang.String paramString,
java.util.Properties jdbcParams)
Parses a String that was created by
createParameterString and
populates the given Properties map with the properties in the String. |
public static java.lang.String createParameterString(java.util.Properties jdbcParams)
jdbcParams
- the parameters to put in to a StringparseParameterString(java.lang.String, java.util.Properties)
public static void parseParameterString(java.lang.String paramString, java.util.Properties jdbcParams)
createParameterString
and
populates the given Properties map with the properties in the String.params
- the String to parse.jdbcParams
- the map to populate with the properties parsed from
the params String.createParameterString(java.util.Properties)