Interface CpoTransform<D,J>
- Type Parameters:
D- the raw datastore-side typeJ- the Java bean-side type
- All Known Subinterfaces:
CassandraCpoTransform<D,,J> JdbcCpoTransform<D,J>
- All Known Implementing Classes:
TransformCharArray,TransformClob,TransformGZipBytes,TransformNoOp,TransformNoOp,TransformStringByte,TransformStringChar,TransformTimestampToCalendar
public interface CpoTransform<D,J>
CpoTransform converts an attribute's value between the raw form stored/read at the
datastore and the form exposed on the Java bean, e.g. clob-to-string or gzip compression.
Implementations are configured per-attribute in the meta XML and instantiated reflectively, so
they must provide a public no-arg constructor.- Since:
- 9/19/10
- Author:
- Michael Bellomo
-
Method Summary
Modifier and TypeMethodDescriptiontransformIn(D inObject) Converts a raw datastore value into the bean-side representation.transformOut(J attributeObject) Converts a bean attribute's value into the raw datastore-side representation.
-
Method Details
-
transformIn
Converts a raw datastore value into the bean-side representation.- Parameters:
inObject- the raw value read from the datastore- Returns:
- the value to set on the bean attribute
- Throws:
CpoException- if the value cannot be converted
-
transformOut
Converts a bean attribute's value into the raw datastore-side representation.- Parameters:
attributeObject- the value read from the bean attribute- Returns:
- the value to bind to the datastore
- Throws:
CpoException- if the value cannot be converted
-