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

## org.apache.cayenne.conf
Class ConnectionProperties

    java.lang.Object
      org.apache.cayenne.conf.ConnectionProperties

    public class ConnectionProperties

extends java.lang.Object

ConnectionProperties handles a set of DataSourceInfo objects using information stored in $HOME/.cayenne/connection.properties. As of now this is purely a utility class. Its features are not used in deployment.

Author:
  Andrei Adamchik

Field Summary
`static java.lang.String` | `ADAPTER_KEY`
`protected java.util.Map` | `connectionInfos`
`static java.lang.String` | `DRIVER_KEY`
`static java.lang.String` | `EMBEDDED_DATASOURCE`
`static java.lang.String` | `EMBEDDED_DATASOURCE_DBADAPTER`
`static java.lang.String` | `EMBEDDED_DATASOURCE_JDBC_DRIVER`
`static java.lang.String` | `EMBEDDED_DATASOURCE_PASSWORD`
`static java.lang.String` | `EMBEDDED_DATASOURCE_URL`
`static java.lang.String` | `EMBEDDED_DATASOURCE_USERNAME`
`static java.lang.String` | `PASSWORD_KEY`
`static java.lang.String` | `PROPERTIES_FILE`
`protected static ConnectionProperties` | `sharedInstance`
`static java.lang.String` | `URL_KEY`
`static java.lang.String` | `USER_NAME_KEY`

Constructor Summary
`ConnectionProperties(org.apache.commons.collections.ExtendedProperties props)` Constructor for ConnectionProperties.

Method Summary
`protected DataSourceInfo` | `buildDataSourceInfo(org.apache.commons.collections.ExtendedProperties props)` Creates a DataSourceInfo object from a set of properties.
`protected static void` | `createSamplePropertiesFile(java.io.File f)`
`protected java.util.List` | `extractNames(org.apache.commons.collections.ExtendedProperties props)` Returns a list of connection names configured in the properties object.
`DataSourceInfo` | `getConnectionInfo(java.lang.String name)` Returns DataSourceInfo object for a symbolic name.
`static ConnectionProperties` | `getInstance()` Returns ConnectionProperties singleton.
`protected static ConnectionProperties` | `loadDefaultProperties()` Loads connection properties from $HOME/.cayenne/connection.properties.

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

Field Detail

### EMBEDDED_DATASOURCE

    public static final java.lang.String EMBEDDED_DATASOURCE

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_DBADAPTER

    public static final java.lang.String EMBEDDED_DATASOURCE_DBADAPTER

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_USERNAME

    public static final java.lang.String EMBEDDED_DATASOURCE_USERNAME

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_PASSWORD

    public static final java.lang.String EMBEDDED_DATASOURCE_PASSWORD

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_URL

    public static final java.lang.String EMBEDDED_DATASOURCE_URL

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_JDBC_DRIVER

    public static final java.lang.String EMBEDDED_DATASOURCE_JDBC_DRIVER

See Also:
  Constant Field Values

### PROPERTIES_FILE

    public static final java.lang.String PROPERTIES_FILE

See Also:
  Constant Field Values

### ADAPTER_KEY

    public static final java.lang.String ADAPTER_KEY

See Also:
  Constant Field Values

### USER_NAME_KEY

    public static final java.lang.String USER_NAME_KEY

See Also:
  Constant Field Values

### PASSWORD_KEY

    public static final java.lang.String PASSWORD_KEY

See Also:
  Constant Field Values

### URL_KEY

    public static final java.lang.String URL_KEY

See Also:
  Constant Field Values

### DRIVER_KEY

    public static final java.lang.String DRIVER_KEY

See Also:
  Constant Field Values

### sharedInstance

    protected static ConnectionProperties sharedInstance

### connectionInfos

    protected java.util.Map connectionInfos

Constructor Detail

### ConnectionProperties

    public ConnectionProperties(org.apache.commons.collections.ExtendedProperties props)

  Constructor for ConnectionProperties.

Method Detail

### getInstance

    public static ConnectionProperties getInstance()

  Returns ConnectionProperties singleton.

### loadDefaultProperties

    protected static ConnectionProperties loadDefaultProperties()

  Loads connection properties from $HOME/.cayenne/connection.properties.

### createSamplePropertiesFile

    protected static void createSamplePropertiesFile(java.io.File f)
                                              throws java.io.IOException

  Throws:
    `java.io.IOException`

### getConnectionInfo

    public DataSourceInfo getConnectionInfo(java.lang.String name)

  Returns DataSourceInfo object for a symbolic name. If name does not match an existing object, returns null.

### buildDataSourceInfo

    protected DataSourceInfo buildDataSourceInfo(org.apache.commons.collections.ExtendedProperties props)

  Creates a DataSourceInfo object from a set of properties.

### extractNames

    protected java.util.List extractNames(org.apache.commons.collections.ExtendedProperties props)

  Returns a list of connection names configured in the properties object.

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

Copyright © 2001-2006 Apache.org All Rights Reserved.