Package org.apache.cayenne.configuration

## Class DataNodeDescriptor

- java.lang.Object
- - org.apache.cayenne.configuration.DataNodeDescriptor

- All Implemented Interfaces:
    `Serializable`, `Comparable<DataNodeDescriptor>`, `ConfigurationNode`, `XMLSerializable`

      public class DataNodeDescriptor
      extends Object
      implements ConfigurationNode, XMLSerializable, Serializable, Comparable<DataNodeDescriptor>

  A descriptor of `DataNode` configuration.
  Since:
    3.1
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected String` | `adapterType` |
    `protected Resource` | `configurationSource` |
    `protected DataChannelDescriptor` | `dataChannelDescriptor` |
    `protected Collection<String>` | `dataMapNames` |
    `protected DataSourceInfo` | `dataSourceDescriptor` |
    `protected String` | `dataSourceFactoryType` |
    `protected String` | `name` |
    `protected String` | `parameters` |
    `protected String` | `schemaUpdateStrategyType` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DataNodeDescriptor()` |
    `DataNodeDescriptor​(String name)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `<T> T` | `acceptVisitor​(ConfigurationNodeVisitor<T> visitor)` |
    `int` | `compareTo​(DataNodeDescriptor o)` |
    `void` | `encodeAsXML​(XMLEncoder encoder, ConfigurationNodeVisitor delegate)` | Prints itself as XML to the provided XMLEncoder.
    `String` | `getAdapterType()` |
    `Resource` | `getConfigurationSource()` | Returns configuration resource for this descriptor.
    `DataChannelDescriptor` | `getDataChannelDescriptor()` |
    `Collection<String>` | `getDataMapNames()` |
    `DataSourceInfo` | `getDataSourceDescriptor()` |
    `String` | `getDataSourceFactoryType()` |
    `String` | `getName()` |
    `String` | `getParameters()` | Returns extra DataNodeDescriptor parameters.
    `String` | `getSchemaUpdateStrategyType()` |
    `void` | `setAdapterType​(String adapter)` |
    `void` | `setConfigurationSource​(Resource configurationResource)` | Sets configuration resource for this descriptor.
    `void` | `setDataChannelDescriptor​(DataChannelDescriptor dataChannelDescriptor)` |
    `void` | `setDataSourceDescriptor​(DataSourceInfo dataSourceDescriptor)` |
    `void` | `setDataSourceFactoryType​(String dataSourceFactory)` |
    `void` | `setName​(String name)` |
    `void` | `setParameters​(String parameters)` | Sets extra DataNodeDescriptor parameters.
    `void` | `setSchemaUpdateStrategyType​(String schemaUpdateStrategyClass)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### name

          protected String name

    - #### dataMapNames

          protected Collection<String> dataMapNames

    - #### parameters

          protected String parameters

    - #### adapterType

          protected String adapterType

    - #### dataSourceFactoryType

          protected String dataSourceFactoryType

    - #### schemaUpdateStrategyType

          protected String schemaUpdateStrategyType

    - #### dataSourceDescriptor

          protected DataSourceInfo dataSourceDescriptor

    - #### configurationSource

          protected transient Resource configurationSource

    - #### dataChannelDescriptor

          protected DataChannelDescriptor dataChannelDescriptor

      Since:
        3.1

  - ### Constructor Detail

    - #### DataNodeDescriptor

          public DataNodeDescriptor()

    - #### DataNodeDescriptor

          public DataNodeDescriptor​(String name)

  - ### Method Detail

    - #### getDataChannelDescriptor

          public DataChannelDescriptor getDataChannelDescriptor()

      Since:
        3.1

    - #### setDataChannelDescriptor

          public void setDataChannelDescriptor​(DataChannelDescriptor dataChannelDescriptor)

      Since:
        3.1

    - #### compareTo

          public int compareTo​(DataNodeDescriptor o)

      Specified by:
        `compareTo` in interface `Comparable<DataNodeDescriptor>`

    - #### acceptVisitor

          public <T> T acceptVisitor​(ConfigurationNodeVisitor<T> visitor)

      Specified by:
        `acceptVisitor` in interface `ConfigurationNode`

    - #### encodeAsXML

          public void encodeAsXML​(XMLEncoder encoder,
                                  ConfigurationNodeVisitor delegate)

      Description copied from interface: `XMLSerializable`
      Prints itself as XML to the provided XMLEncoder.
      Specified by:
        `encodeAsXML` in interface `XMLSerializable`

    - #### getName

          public String getName()

    - #### setName

          public void setName​(String name)

    - #### getDataMapNames

          public Collection<String> getDataMapNames()

    - #### getParameters

          public String getParameters()

      Returns extra DataNodeDescriptor parameters. This property is often used by custom `DataSourceFactory` to configure a DataSource. E.g. JNDIDataSourceFactory may treat parameters String as a JNDI location of the DataSource, etc.

    - #### setParameters

          public void setParameters​(String parameters)

      Sets extra DataNodeDescriptor parameters. This property is often used by custom `DataSourceFactory` to configure a DataSource. E.g. JNDIDataSourceFactory may treat parameters String as a JNDI location of the DataSource, etc.

    - #### getAdapterType

          public String getAdapterType()

    - #### setAdapterType

          public void setAdapterType​(String adapter)

    - #### getDataSourceFactoryType

          public String getDataSourceFactoryType()

    - #### setDataSourceFactoryType

          public void setDataSourceFactoryType​(String dataSourceFactory)

    - #### getSchemaUpdateStrategyType

          public String getSchemaUpdateStrategyType()

    - #### setSchemaUpdateStrategyType

          public void setSchemaUpdateStrategyType​(String schemaUpdateStrategyClass)

    - #### getDataSourceDescriptor

          public DataSourceInfo getDataSourceDescriptor()

    - #### setDataSourceDescriptor

          public void setDataSourceDescriptor​(DataSourceInfo dataSourceDescriptor)

    - #### getConfigurationSource

          public Resource getConfigurationSource()

      Returns configuration resource for this descriptor. Configuration is usually shared with the parent `DataChannelDescriptor`.

    - #### setConfigurationSource

          public void setConfigurationSource​(Resource configurationResource)

      Sets configuration resource for this descriptor. Configuration is usually shared with the parent `DataChannelDescriptor` and has to be synchronized when it changes in the parent.