Package org.apache.openjpa.jdbc.meta
Interface Embeddable
-
- All Known Implementing Classes:
EmbedFieldStrategy
,HandlerFieldStrategy
,MaxEmbeddedBlobFieldStrategy
,MaxEmbeddedByteArrayFieldStrategy
,MaxEmbeddedCharArrayFieldStrategy
,MaxEmbeddedClobFieldStrategy
,PrimitiveFieldStrategy
,RelationFieldStrategy
,StringFieldStrategy
public interface Embeddable
Interface for field strategies that can managed fields of embedded-element, embedded-key, and embedded-value objects. Fields of directly embedded objects do not have to implement this interface.- Since:
- 0.4.0
- Author:
- Abe White
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object
UNSUPPORTED
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ColumnIO
getColumnIO()
Return column I/O information for this mapping.Column[]
getColumns()
Return the columns used by this strategy.java.lang.Object[]
getResultArguments()
Return the arguments needed to extract datastore values viaResult.getObject(java.lang.Object, int, java.lang.Object)
for each column.void
loadEmbedded(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, java.lang.Object val)
Load this strategy's field by transforming the given datastore value.java.lang.Object
toEmbeddedDataStoreValue(java.lang.Object val, JDBCStore store)
Convert the given Java value to its datastore equivalent.java.lang.Object
toEmbeddedObjectValue(java.lang.Object val)
Convert the given datastore value to its Java equivalent.
-
-
-
Method Detail
-
getColumns
Column[] getColumns()
Return the columns used by this strategy.
-
getColumnIO
ColumnIO getColumnIO()
Return column I/O information for this mapping.
-
getResultArguments
java.lang.Object[] getResultArguments()
Return the arguments needed to extract datastore values viaResult.getObject(java.lang.Object, int, java.lang.Object)
for each column.
-
toEmbeddedDataStoreValue
java.lang.Object toEmbeddedDataStoreValue(java.lang.Object val, JDBCStore store)
Convert the given Java value to its datastore equivalent. If this mapping occupies multiple columns, return an object array with one element per column. For relation id columns, return the state manager the column depends on.
-
toEmbeddedObjectValue
java.lang.Object toEmbeddedObjectValue(java.lang.Object val)
Convert the given datastore value to its Java equivalent. IfgetColumns()
returns multiple columns, the given datastore value will be an object array of the corresponding length. This method must only be supported by mappings of embedded id objects. In other casesloadEmbedded(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration, java.lang.Object)
will be used instead. ReturnUNSUPPORTED
if this mapping cannot support this method.
-
loadEmbedded
void loadEmbedded(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, java.lang.Object val) throws java.sql.SQLException
Load this strategy's field by transforming the given datastore value. IfgetColumns()
returns multiple columns, the given datastore value will be an object array of the corresponding length. The value does not have to be loaded immediately; it may be stored as impl data.- Throws:
java.sql.SQLException
-
-