DataChannelMetaData (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.configuration.xml, interface: DataChannelMetaData

# Interface DataChannelMetaData

All Known Implementing Classes:
  `DefaultDataChannelMetaData, NoopDataChannelMetaData`

public interface DataChannelMetaData

Storage for all kind of meta data that is not required for runtime.

Currently used by Modeler and cli tools (e.g. Maven, Ant and Gradle) to store project extra data.

Usage:

         // attach custom information to data map
         metaData.add(dataMap, myObject);

         // read data
         MyObject obj = metaData.get(dataMap, MyObject.class);

Since:
  4.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(ConfigurationNode key, Object value)`
  Store data for object.
  `<T> T`
  `get(ConfigurationNode key, Class<T> type)`
  Get meta data for object
  `<T> T`
  `remove(ConfigurationNode key, Class<T> type)`

- ## Method Details

  - ### add

    void add(ConfigurationNode key, Object value)
    Store data for object.
    Parameters:
      `key` - object for which we want to store data
      `value` - data to store

  - ### get

    <T> T get(ConfigurationNode key, Class<T> type)
    Get meta data for object
    Type Parameters:
      `T` - meta data type
    Parameters:
      `key` - object for wich we want meta data
      `type` - meta data type class
    Returns:
      value or `null` if no data available

  - ### remove

    <T> T remove(ConfigurationNode key, Class<T> type)
    Type Parameters:
      `T` - meta data type
    Parameters:
      `key` - object for wich we want meta data
      `type` - meta data type class
    Returns:
      value or `null` if no can't remove
    Since:
      4.1