Class CollectionConverter
- java.lang.Object
-
- org.opennms.netmgt.graph.persistence.converter.CollectionConverter
-
public class CollectionConverter extends java.lang.ObjectTransforms aCollectionfrom and to a String to be persisted/serialized to the database.
TheCollectionmay only contain elements of a type that is supported by theConverterService.
The conversion follows the following pattern:
Collection<->SerializedCollection<-> JSON String. TheSerializedCollectionis 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 booleancanConvert(java.lang.Class<?> type)java.lang.StringtoStringRepresentation(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)
-
-