Class DefaultDataChannelMetaData
java.lang.Object
org.apache.cayenne.configuration.xml.DefaultDataChannelMetaData
- All Implemented Interfaces:
DataChannelMetaData
Default implementation of DataChannelMetaData
that stores data in Map.
This implementation is thread safe.
- Since:
- 4.1
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ConfigurationNode key, Object value) value.getClass() will be used under the hood to associate data with the key object.<T> T
get
(ConfigurationNode key, Class<T> type) If either key or value isnull
thennull
will be returned.<T> T
remove
(ConfigurationNode key, Class<T> type)
-
Constructor Details
-
DefaultDataChannelMetaData
public DefaultDataChannelMetaData()
-
-
Method Details
-
add
value.getClass() will be used under the hood to associate data with the key object.- Specified by:
add
in interfaceDataChannelMetaData
- Parameters:
key
- object for which we want to store datavalue
- data to store
-
get
If either key or value isnull
thennull
will be returned.- Specified by:
get
in interfaceDataChannelMetaData
- Type Parameters:
T
- data type- Parameters:
key
- object for wich we want meta datatype
- meta data type class- Returns:
- value or
null
-
remove
- Specified by:
remove
in interfaceDataChannelMetaData
- Type Parameters:
T
- data type- Parameters:
key
- object for wich we want meta datatype
- meta data type class- Returns:
- removed value or
null
-