Overview | Package | Class | Use | 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 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.

Field Summary
`static String` | `ADAPTER_KEY`
`protected Map<String,DataSourceInfo>` | `connectionInfos`
`static String` | `DRIVER_KEY`
`static String` | `EMBEDDED_DATASOURCE`
`static String` | `EMBEDDED_DATASOURCE_DBADAPTER`
`static String` | `EMBEDDED_DATASOURCE_JDBC_DRIVER`
`static String` | `EMBEDDED_DATASOURCE_PASSWORD`
`static String` | `EMBEDDED_DATASOURCE_URL`
`static String` | `EMBEDDED_DATASOURCE_USERNAME`
`static String` | `PASSWORD_KEY`
`static String` | `PROPERTIES_FILE`
`protected static ConnectionProperties` | `sharedInstance`
`static String` | `URL_KEY`
`static String` | `USER_NAME_KEY`

Constructor Summary
`ConnectionProperties(ExtendedProperties props)` Constructor for ConnectionProperties.

Method Summary
`protected DataSourceInfo` | `buildDataSourceInfo(ExtendedProperties props)` Creates a DataSourceInfo object from a set of properties.
`protected static void` | `createSamplePropertiesFile(File f)`
`protected List<String>` | `extractNames(ExtendedProperties props)` Returns a list of connection names configured in the properties object.
`DataSourceInfo` | `getConnectionInfo(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 String EMBEDDED_DATASOURCE

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_DBADAPTER

    public static final String EMBEDDED_DATASOURCE_DBADAPTER

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_USERNAME

    public static final String EMBEDDED_DATASOURCE_USERNAME

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_PASSWORD

    public static final String EMBEDDED_DATASOURCE_PASSWORD

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_URL

    public static final String EMBEDDED_DATASOURCE_URL

See Also:
  Constant Field Values

### EMBEDDED_DATASOURCE_JDBC_DRIVER

    public static final String EMBEDDED_DATASOURCE_JDBC_DRIVER

See Also:
  Constant Field Values

### PROPERTIES_FILE

    public static final String PROPERTIES_FILE

See Also:
  Constant Field Values

### ADAPTER_KEY

    public static final String ADAPTER_KEY

See Also:
  Constant Field Values

### USER_NAME_KEY

    public static final String USER_NAME_KEY

See Also:
  Constant Field Values

### PASSWORD_KEY

    public static final String PASSWORD_KEY

See Also:
  Constant Field Values

### URL_KEY

    public static final String URL_KEY

See Also:
  Constant Field Values

### DRIVER_KEY

    public static final String DRIVER_KEY

See Also:
  Constant Field Values

### sharedInstance

    protected static ConnectionProperties sharedInstance

### connectionInfos

    protected Map<String,DataSourceInfo> connectionInfos

Constructor Detail

### ConnectionProperties

    public ConnectionProperties(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(File f)
                                              throws IOException

  Throws:
    `IOException`

### getConnectionInfo

    public DataSourceInfo getConnectionInfo(String name)

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

### buildDataSourceInfo

    protected DataSourceInfo buildDataSourceInfo(ExtendedProperties props)

  Creates a DataSourceInfo object from a set of properties.

### extractNames

    protected List<String> extractNames(ExtendedProperties props)

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

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

Copyright © 2001-2010 Apache Cayenne. All Rights Reserved.