: Class DriverConfig

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ModSQL
Class DriverConfig

    java.lang.Object
      |
      +--ModSQL.DriverConfig

public final class DriverConfig
extends Object

Configuration data for ModSQL.

Having this data in a seperate class simplifies package recompiles.

Author:
  chris.studholme@utoronto.ca

Field Summary
`protected static int` | `debugLevel` Debug level (0 for no debug messages).
`static int` | `DEFAULT_HASHTABLE_SIZE` Default size for internal hash tables (if not set in config file).
`private static String[]` | `functions` Cached array of functions.
`static int` | `majorVersion` Major version number.
`static int` | `minorVersion` Minor version number.
`private static Properties` | `props` Properties read from configuration file.
`static String` | `version` Text representation of version.

Constructor Summary
`protected` | `DriverConfig()` Constructor.

Method Summary
`(package private) static void` | `()` Read configuration file.
`static Properties` | `getDatabaseProperties(String database)` This method can be used by database modules to obtain properties from the ModSQL properties file.
`protected static String[]` | `getFunctionClasses()` Get array of function classes to check when parsing expressions.
`protected static int` | `getHashTableSize()` Get default size of hash tables used interally.
`protected static String` | `getIndexPath()` Get path to index files.
`static String[]` | `makeArray(String colonstring)` This convenience method can be used to break a color-separated list of strings into an array of String objects.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### majorVersion

    public static final int majorVersion

  Major version number.

### minorVersion

    public static final int minorVersion

  Minor version number.

### version

    public static final String version

  Text representation of version.

### DEFAULT_HASHTABLE_SIZE

    public static final int DEFAULT_HASHTABLE_SIZE

  Default size for internal hash tables (if not set in config file).

### props

    private static Properties props

  Properties read from configuration file.

### debugLevel

    protected static int debugLevel

  Debug level (0 for no debug messages).

### functions

    private static String[] functions

  Cached array of functions.

Constructor Detail

### DriverConfig

    protected DriverConfig()

  Constructor.

Method Detail

###

    static void ()

  Read configuration file.

### makeArray

    public static String[] makeArray(String colonstring)

  This convenience method can be used to break a color-separated list of strings into an array of String objects.

  Parameters:
    `colonstring` - colon-separated list
  Returns:
    an array of strings

### getFunctionClasses

    protected static String[] getFunctionClasses()

  Get array of function classes to check when parsing expressions.
  Returns:
    array of function classes

### getIndexPath

    protected static String getIndexPath()

  Get path to index files.
  Returns:
    path to index files

### getHashTableSize

    protected static int getHashTableSize()

  Get default size of hash tables used interally. Reads value from config file but uses constant in source if the config file has not value set.
  Returns:
    default hash table size

### getDatabaseProperties

    public static Properties getDatabaseProperties(String database)

  This method can be used by database modules to obtain properties from the ModSQL properties file. The database module named, say, Module will have properties of the form:

  > Module.property1=value1
  > Module.property2=value2
  > etc.

  This method will seek out such properties, strip the leading database name, and create a new Properties object containing the properties that apply to the particular database. If there are no properties for the database stored in the ModSQL properties file, an empty Properties object will be returned.

  Parameters:
    `database` - name of calling database (typically, the package name)
  Returns:
    a Properties object (possibly empty)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD