public class UDTMapper<T> extends Object
A UDTMapper object is obtained from a MappingManager using the
MappingManager.udtMapper(java.lang.Class<T>) method.
| Modifier and Type | Method and Description |
|---|---|
T |
fromUDT(com.datastax.driver.core.UDTValue v)
Converts a
UDTValue (returned by the core API) to the mapped
class. |
com.datastax.driver.core.UDTValue |
toUDT(T entity)
Converts a mapped class to a
UDTValue. |
public T fromUDT(com.datastax.driver.core.UDTValue v)
UDTValue (returned by the core API) to the mapped
class.v - the UDTValue.IllegalArgumentException - if the UDTValue is not of the
type indicated in the mapped class's @UDT annotation.public com.datastax.driver.core.UDTValue toUDT(T entity)
UDTValue.entity - an instance of the mapped class.UDTValue.Copyright © 2012–2015. All rights reserved.