Class CollectionConverter
- java.lang.Object
-
- org.opennms.netmgt.graph.persistence.converter.CollectionConverter
-
public class CollectionConverter extends java.lang.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(java.lang.Class<?> type)
java.lang.String
toStringRepresentation(java.util.Collection<?> collection)
java.util.Collection<?>
toValue(java.lang.Class<java.util.Collection<?>> type, java.lang.String string)
-
-
-
Method Detail
-
toStringRepresentation
public java.lang.String toStringRepresentation(java.util.Collection<?> collection)
-
toValue
public java.util.Collection<?> toValue(java.lang.Class<java.util.Collection<?>> type, java.lang.String string)
-
canConvert
public boolean canConvert(java.lang.Class<?> type)
-
-