Class CollectionConverter
- java.lang.Object
-
- org.opennms.netmgt.graph.persistence.converter.CollectionConverter
-
public class CollectionConverter extends Object
Transforms aCollection
from and to a String to be persisted/serialized to the database.
TheCollection
may only contain elements of a type that is supported by theConverterService
.
The conversion follows the following pattern:
Collection
<->SerializedCollection
<-> JSON String. TheSerializedCollection
is the Java representation of the JSON object.
The elements in the Collection are converted to Strings using theConverterService
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvert(Class<?> type)
String
toStringRepresentation(Collection<?> collection)
Collection<?>
toValue(Class<Collection<?>> type, String string)
-
-
-
Method Detail
-
toStringRepresentation
public String toStringRepresentation(Collection<?> collection)
-
toValue
public Collection<?> toValue(Class<Collection<?>> type, String string)
-
canConvert
public boolean canConvert(Class<?> type)
-
-