Class DefaultDataChannelMetaData

java.lang.Object
org.apache.cayenne.configuration.xml.DefaultDataChannelMetaData
All Implemented Interfaces:
DataChannelMetaData

public class DefaultDataChannelMetaData extends Object implements DataChannelMetaData

Default implementation of DataChannelMetaData that stores data in Map.

This implementation is thread safe.

Since:
4.1
See Also:
  • Constructor Details

    • DefaultDataChannelMetaData

      public DefaultDataChannelMetaData()
  • Method Details

    • add

      public void add(ConfigurationNode key, Object value)
      value.getClass() will be used under the hood to associate data with the key object.
      Specified by:
      add in interface DataChannelMetaData
      Parameters:
      key - object for which we want to store data
      value - data to store
    • get

      public <T> T get(ConfigurationNode key, Class<T> type)
      If either key or value is null then null will be returned.
      Specified by:
      get in interface DataChannelMetaData
      Type Parameters:
      T - data type
      Parameters:
      key - object for wich we want meta data
      type - meta data type class
      Returns:
      value or null
    • remove

      public <T> T remove(ConfigurationNode key, Class<T> type)
      Specified by:
      remove in interface DataChannelMetaData
      Type Parameters:
      T - data type
      Parameters:
      key - object for wich we want meta data
      type - meta data type class
      Returns:
      removed value or null