public class DefaultDataChannelMetaData extends Object implements DataChannelMetaData
Default implementation of DataChannelMetaData
that stores data in Map.
This implementation is thread safe.
NoopDataChannelMetaData
Constructor and Description |
---|
DefaultDataChannelMetaData() |
Modifier and Type | Method and Description |
---|---|
void |
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 is
null then null will be returned. |
<T> T |
remove(ConfigurationNode key,
Class<T> type) |
public void add(ConfigurationNode key, Object value)
add
in interface DataChannelMetaData
key
- object for which we want to store datavalue
- data to storepublic <T> T get(ConfigurationNode key, Class<T> type)
null
then null
will be returned.get
in interface DataChannelMetaData
T
- data typekey
- object for wich we want meta datatype
- meta data type classnull
public <T> T remove(ConfigurationNode key, Class<T> type)
remove
in interface DataChannelMetaData
T
- data typekey
- object for wich we want meta datatype
- meta data type classnull
Copyright © 2001–2019 Apache Cayenne. All rights reserved.