Class C3P0ConfigUtils


  • public final class C3P0ConfigUtils
    extends java.lang.Object
    • 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)