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

## org.objectstyle.cayenne.conf
Class RuntimeLoadDelegate

    java.lang.Object
      org.objectstyle.cayenne.conf.RuntimeLoadDelegate

All Implemented Interfaces:
  ConfigLoaderDelegate

    public class RuntimeLoadDelegate

extends java.lang.Object
implements ConfigLoaderDelegate

Implementation of ConfigLoaderDelegate that creates Cayenne access objects stack.

Author:
  Andrei Adamchik

Field Summary
`protected Configuration` | `config`
`protected java.util.Map` | `domains`
`protected long` | `startTime`
`protected ConfigStatus` | `status`
`protected java.util.Map` | `views`

Constructor Summary
`RuntimeLoadDelegate(Configuration config, ConfigStatus status)`
`RuntimeLoadDelegate(Configuration config, ConfigStatus status, org.apache.log4j.Level logLevel)` Deprecated. since 1.2

Method Summary
`protected DataNode` | `createDataNode(java.lang.String nodeName)` Creates a new DataNode.
`protected DataDomain` | `findDomain(java.lang.String name)`
`protected DataMap` | `findMap(java.lang.String domainName, java.lang.String mapName)`
`protected DataNode` | `findNode(java.lang.String domainName, java.lang.String nodeName)`
`void` | `finishedLoading()` Callback methods invoked at the end of the configuration processing.
`Configuration` | `getConfig()` Returns the config.
`java.util.Map` | `getDomains()` Returns the domains.
`org.apache.log4j.Level` | `getLogLevel()` Deprecated. since 1.2
`ConfigStatus` | `getStatus()` Returns the status.
`protected void` | `initAdapter(DataNode node, java.lang.String adapterName)` Intializes DataNode adapter.
`protected DataMap` | `loadDataMap(DataDomain domain, java.lang.String mapName, java.util.Map locations)` Returns DataMap for the name and location information.
`boolean` | `loadError(java.lang.Throwable th)` Gives delegate an opportunity to process the error.
`void` | `setConfig(Configuration config)` Sets the config.
`void` | `setLogLevel(org.apache.log4j.Level logLevel)` Deprecated. since 1.2
`void` | `shouldLinkDataMap(java.lang.String domainName, java.lang.String nodeName, java.lang.String mapName)`
`void` | `shouldLoadDataDomain(java.lang.String domainName)` Callback method invoked when a domain is encountered in the configuration file.
`void` | `shouldLoadDataDomainProperties(java.lang.String domainName, java.util.Map properties)`
`void` | `shouldLoadDataMaps(java.lang.String domainName, java.util.Map locations)`
`void` | `shouldLoadDataNode(java.lang.String domainName, java.lang.String nodeName, java.lang.String dataSource, java.lang.String adapter, java.lang.String factory)`
`void` | `shouldLoadProjectVersion(java.lang.String version)` Callback method invoked when a project version is read.
`void` | `shouldRegisterDataView(java.lang.String name, java.lang.String location)` Callback method invoked when a DataView reference is encountered in the configuration file.
`void` | `startedLoading()` Callback methods invoked in the beginning of the configuration processing.

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

Field Detail

### domains

    protected java.util.Map domains

### views

    protected java.util.Map views

### status

    protected ConfigStatus status

### config

    protected Configuration config

### startTime

    protected long startTime

Constructor Detail

### RuntimeLoadDelegate

    public RuntimeLoadDelegate(Configuration config,
                               ConfigStatus status,
                               org.apache.log4j.Level logLevel)

  Deprecated. since 1.2

### RuntimeLoadDelegate

    public RuntimeLoadDelegate(Configuration config,
                               ConfigStatus status)

Method Detail

### findDomain

    protected DataDomain findDomain(java.lang.String name)
                             throws org.objectstyle.cayenne.conf.RuntimeLoadDelegate.FindException

  Throws:
    `org.objectstyle.cayenne.conf.RuntimeLoadDelegate.FindException`

### findMap

    protected DataMap findMap(java.lang.String domainName,
                              java.lang.String mapName)
                       throws org.objectstyle.cayenne.conf.RuntimeLoadDelegate.FindException

  Throws:
    `org.objectstyle.cayenne.conf.RuntimeLoadDelegate.FindException`

### findNode

    protected DataNode findNode(java.lang.String domainName,
                                java.lang.String nodeName)
                         throws org.objectstyle.cayenne.conf.RuntimeLoadDelegate.FindException

  Throws:
    `org.objectstyle.cayenne.conf.RuntimeLoadDelegate.FindException`

### loadError

    public boolean loadError(java.lang.Throwable th)

  Description copied from interface: `ConfigLoaderDelegate`
  Gives delegate an opportunity to process the error.

  Specified by:
    `loadError` in interface `ConfigLoaderDelegate`
  Returns:
    boolean indicating whether ConfigLoader should proceed with further processing. Ultimately it is up to the ConfigLoader to make this decision.

### shouldLoadProjectVersion

    public void shouldLoadProjectVersion(java.lang.String version)

  Description copied from interface: `ConfigLoaderDelegate`
  Callback method invoked when a project version is read.

  Specified by:
    `shouldLoadProjectVersion` in interface `ConfigLoaderDelegate`
  Since:
    1.1

### shouldRegisterDataView

    public void shouldRegisterDataView(java.lang.String name,
                                       java.lang.String location)

  Description copied from interface: `ConfigLoaderDelegate`
  Callback method invoked when a DataView reference is encountered in the configuration file.

  Specified by:
    `shouldRegisterDataView` in interface `ConfigLoaderDelegate`
  Since:
    1.1

### shouldLoadDataDomainProperties

    public void shouldLoadDataDomainProperties(java.lang.String domainName,
                                               java.util.Map properties)

  Specified by:
    `shouldLoadDataDomainProperties` in interface `ConfigLoaderDelegate`

### shouldLoadDataDomain

    public void shouldLoadDataDomain(java.lang.String domainName)

  Description copied from interface: `ConfigLoaderDelegate`
  Callback method invoked when a domain is encountered in the configuration file.

  Specified by:
    `shouldLoadDataDomain` in interface `ConfigLoaderDelegate`
  Parameters:
    `domainName` - domain name.

### shouldLoadDataMaps

    public void shouldLoadDataMaps(java.lang.String domainName,
                                   java.util.Map locations)

  Specified by:
    `shouldLoadDataMaps` in interface `ConfigLoaderDelegate`

### loadDataMap

    protected DataMap loadDataMap(DataDomain domain,
                                  java.lang.String mapName,
                                  java.util.Map locations)

  Returns DataMap for the name and location information. If a DataMap is already loaded within a given domain, such loaded map is returned, otherwise the map is loaded and linked with the DataDomain.

### createDataNode

    protected DataNode createDataNode(java.lang.String nodeName)

  Creates a new DataNode. Subclasses may override this method to provide a custom node class.

  Since:
    1.

### shouldLoadDataNode

    public void shouldLoadDataNode(java.lang.String domainName,
                                   java.lang.String nodeName,
                                   java.lang.String dataSource,
                                   java.lang.String adapter,
                                   java.lang.String factory)

  Specified by:
    `shouldLoadDataNode` in interface `ConfigLoaderDelegate`

### initAdapter

    protected void initAdapter(DataNode node,
                               java.lang.String adapterName)

  Intializes DataNode adapter.

  Since:
    1.2

### shouldLinkDataMap

    public void shouldLinkDataMap(java.lang.String domainName,
                                  java.lang.String nodeName,
                                  java.lang.String mapName)

  Specified by:
    `shouldLinkDataMap` in interface `ConfigLoaderDelegate`

### getDomains

    public java.util.Map getDomains()

  Returns the domains.

  Returns:
    List

### getStatus

    public ConfigStatus getStatus()

  Returns the status.

  Specified by:
    `getStatus` in interface `ConfigLoaderDelegate`
  Returns:
    ConfigStatus

### getConfig

    public Configuration getConfig()

  Returns the config.

  Returns:
    Configuration

### setConfig

    public void setConfig(Configuration config)

  Sets the config.

  Parameters:
    `config` - The config to set

### getLogLevel

    public org.apache.log4j.Level getLogLevel()

  Deprecated. since 1.2

  Returns the logLevel.

### setLogLevel

    public void setLogLevel(org.apache.log4j.Level logLevel)

  Deprecated. since 1.2

  Sets the logLevel.

### finishedLoading

    public void finishedLoading()

  Description copied from interface: `ConfigLoaderDelegate`
  Callback methods invoked at the end of the configuration processing.

  Specified by:
    `finishedLoading` in interface `ConfigLoaderDelegate`
  See Also:
    `ConfigLoaderDelegate.finishedLoading()`

### startedLoading

    public void startedLoading()

  Description copied from interface: `ConfigLoaderDelegate`
  Callback methods invoked in the beginning of the configuration processing.

  Specified by:
    `startedLoading` in interface `ConfigLoaderDelegate`
  See Also:
    `ConfigLoaderDelegate.startedLoading()`

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 ObjectStyle.org All Rights Reserved.