| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.internal.util.config.ConfigurationHelper
public final class ConfigurationHelper
Collection of helper methods for dealing with configuration settings.
| Method Summary | |
|---|---|
| static Map | clone(Map<?,?> configurationValues)Make a clone of the configuration values. | 
| static String | extractPropertyValue(String propertyName,
                     Properties properties)Extract a property value by name from the given properties object. | 
| static boolean | getBoolean(String name,
           Map values)Get the config value as a boolean (default of false) | 
| static boolean | getBoolean(String name,
           Map values,
           boolean defaultValue)Get the config value as a boolean. | 
| static int | getInt(String name,
       Map values,
       int defaultValue)Get the config value as an int | 
| static Integer | getInteger(String name,
           Map values)Get the config value as an Integer | 
| static String | getString(String name,
          Map values)Get the config value as a String | 
| static String | getString(String name,
          Map values,
          String defaultValue)Get the config value as a String | 
| static Properties | maskOut(Properties props,
        String key)replace a property by a starred version | 
| static String | resolvePlaceHolder(String property)Handles interpolation processing for a single property. | 
| static void | resolvePlaceHolders(Map<?,?> configurationValues)Handles interpolation processing for all entries in a properties object. | 
| static Map | toMap(String propertyName,
      String delim,
      Properties properties)Constructs a map from a property value. | 
| static String[] | toStringArray(String stringForm,
              String delim)Convert a string to an array of strings. | 
| static String[] | toStringArray(String propertyName,
              String delim,
              Properties properties)Get a property value as a string array. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static String getString(String name,
                               Map values)
String
name - The config setting name.values - The map of config values
public static String getString(String name,
                               Map values,
                               String defaultValue)
String
name - The config setting name.values - The map of config valuesdefaultValue - The default value to use if not found
public static boolean getBoolean(String name,
                                 Map values)
name - The config setting name.values - The map of config values
public static boolean getBoolean(String name,
                                 Map values,
                                 boolean defaultValue)
name - The config setting name.values - The map of config valuesdefaultValue - The default value to use if not found
public static int getInt(String name,
                         Map values,
                         int defaultValue)
name - The config setting name.values - The map of config valuesdefaultValue - The default value to use if not found
public static Integer getInteger(String name,
                                 Map values)
Integer
name - The config setting name.values - The map of config values
public static Map clone(Map<?,?> configurationValues)
configurationValues - The config values to clone
public static Properties maskOut(Properties props,
                                 String key)
props - properties to checkkey - proeprty to mask
public static String extractPropertyValue(String propertyName,
                                          Properties properties)
propertyName - The name of the property for which to extract valueproperties - The properties object
public static Map toMap(String propertyName,
                        String delim,
                        Properties properties)
propertyName - The name of the property for which to retrieve valuedelim - The string defining tokens used as both entry and key/value delimiters.properties - The properties object
extractPropertyValue(String, java.util.Properties)
public static String[] toStringArray(String propertyName,
                                     String delim,
                                     Properties properties)
propertyName - The name of the property for which to retrieve valuedelim - The delimiter used to separate individual array elements.properties - The properties object
extractPropertyValue(String, java.util.Properties), 
toStringArray(String, String)
public static String[] toStringArray(String stringForm,
                                     String delim)
stringForm - The string form of the string array.delim - The delimiter used to separate individual array elements.
public static void resolvePlaceHolders(Map<?,?> configurationValues)
configurationValues - The configuration map.public static String resolvePlaceHolder(String property)
property - The property value to be processed for interpolation.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||