schemacrawler.schemacrawler
Class Config

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by schemacrawler.schemacrawler.Config
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>, Options

public final class Config
extends java.util.HashMap<java.lang.String,java.lang.String>
implements Options

Configuration properties.

Author:
Sualeh Fatehi
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
Config()
          Creates an empty config.
Config(java.util.Map<java.lang.String,java.lang.String> config)
          Clones a config.
Config(java.util.Properties properties)
          Copies properties into a map.
 
Method Summary
 boolean getBooleanValue(java.lang.String propertyName)
          Gets the value of a property as a boolean.
 int getIntegerValue(java.lang.String propertyName)
          Gets the value of a property as an integer.
 java.lang.String getStringValue(java.lang.String propertyName, java.lang.String defaultValue)
          Gets the value of a property as a string.
static Config load(java.io.InputStream configStream)
          Loads the SchemaCrawler configuration, from a properties file stream.
static Config load(java.lang.String... configFilenames)
          Loads the SchemaCrawler configuration, and override configuration, from properties files.
 java.lang.String toString()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

Config

public Config()
Creates an empty config.


Config

public Config(java.util.Map<java.lang.String,java.lang.String> config)
Clones a config.

Parameters:
config - Config to clone

Config

public Config(java.util.Properties properties)
Copies properties into a map.

Parameters:
properties - Properties to copy
Method Detail

load

public static Config load(java.io.InputStream configStream)
Loads the SchemaCrawler configuration, from a properties file stream.

Parameters:
configStream - Configuration stream.
Returns:
Configuration properties.

load

public static Config load(java.lang.String... configFilenames)
Loads the SchemaCrawler configuration, and override configuration, from properties files.

Parameters:
configFilenames - Configuration file name.
Returns:
Configuration properties.

getBooleanValue

public boolean getBooleanValue(java.lang.String propertyName)
Gets the value of a property as a boolean.

Parameters:
propertyName - Property name
Returns:
Boolean value

getIntegerValue

public int getIntegerValue(java.lang.String propertyName)
Gets the value of a property as an integer.

Parameters:
propertyName - Property name
Returns:
Integer value

getStringValue

public java.lang.String getStringValue(java.lang.String propertyName,
                                       java.lang.String defaultValue)
Gets the value of a property as a string.

Parameters:
propertyName - Property name
defaultValue - Default value
Returns:
String value

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractMap<java.lang.String,java.lang.String>


Copyright © 2003-2009 Sualeh Fatehi. All Rights Reserved.