org.apache.openjpa.jdbc.meta.strats
Class EmbedValueHandler

java.lang.Object
  extended by org.apache.openjpa.jdbc.meta.strats.AbstractValueHandler
      extended by org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler
All Implemented Interfaces:
Serializable, ValueHandler
Direct Known Subclasses:
ElementEmbedValueHandler, ObjectIdValueHandler

public abstract class EmbedValueHandler
extends AbstractValueHandler

Base class for embedded value handlers.

Since:
0.4.0
Author:
Abe White
See Also:
Serialized Form

Constructor Summary
EmbedValueHandler()
           
 
Method Summary
static void getEmbeddedIdCols(FieldMapping fmd, List cols)
           
static void getIdColumns(FieldMapping fmd, List cols)
           
protected  void map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt, List cols, List args)
          Maps embedded value and gathers columns and arguments into given lists.
protected  void map(ValueMapping vm, String name, ColumnIO io, boolean adapt, List cols, List args)
          Deprecated.  
protected  Object toDataStoreValue(OpenJPAStateManager em, ValueMapping vm, JDBCStore store, Column[] cols, Object rval, int idx)
          Helper to convert an object value to its datastore equivalent.
protected  int toDataStoreValue1(OpenJPAStateManager em, ValueMapping vm, JDBCStore store, Column[] cols, List rvals, int idx)
           
protected  void toObjectValue(OpenJPAStateManager em, ValueMapping vm, Object val, JDBCStore store, JDBCFetchConfiguration fetch, Column[] cols, int idx)
          Helper to convert a datastore value to its object equivalent.
protected  int toObjectValue1(OpenJPAStateManager em, ValueMapping vm, Object val, JDBCStore store, JDBCFetchConfiguration fetch, Column[] cols, int idx)
           
 
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractValueHandler
getResultArgument, isVersionable, objectValueRequiresLoad, toDataStoreValue, toObjectValue, toObjectValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.jdbc.meta.ValueHandler
map
 

Constructor Detail

EmbedValueHandler

public EmbedValueHandler()
Method Detail

map

protected void map(ValueMapping vm,
                   String name,
                   ColumnIO io,
                   boolean adapt,
                   List cols,
                   List args)
Deprecated. 

Maps embedded value and gathers columns and arguments into given lists.


map

protected void map(ValueMapping vm,
                   DBIdentifier name,
                   ColumnIO io,
                   boolean adapt,
                   List cols,
                   List args)
Maps embedded value and gathers columns and arguments into given lists.


toDataStoreValue

protected Object toDataStoreValue(OpenJPAStateManager em,
                                  ValueMapping vm,
                                  JDBCStore store,
                                  Column[] cols,
                                  Object rval,
                                  int idx)
Helper to convert an object value to its datastore equivalent.

Parameters:
em - state manager for embedded object
vm - owning value
store - store manager
cols - embedded columns
rval - return array if multiple columns
idx - index in columns array to start

toDataStoreValue1

protected int toDataStoreValue1(OpenJPAStateManager em,
                                ValueMapping vm,
                                JDBCStore store,
                                Column[] cols,
                                List rvals,
                                int idx)

toObjectValue

protected void toObjectValue(OpenJPAStateManager em,
                             ValueMapping vm,
                             Object val,
                             JDBCStore store,
                             JDBCFetchConfiguration fetch,
                             Column[] cols,
                             int idx)
                      throws SQLException
Helper to convert a datastore value to its object equivalent.

Parameters:
em - state manager for embedded object
vm - owning value
val - datastore value
store - optional store manager
fetch - optional fetch configuration
cols - embedded columns
idx - index in columns array to start
Throws:
SQLException

toObjectValue1

protected int toObjectValue1(OpenJPAStateManager em,
                             ValueMapping vm,
                             Object val,
                             JDBCStore store,
                             JDBCFetchConfiguration fetch,
                             Column[] cols,
                             int idx)
                      throws SQLException
Throws:
SQLException

getEmbeddedIdCols

public static void getEmbeddedIdCols(FieldMapping fmd,
                                     List cols)

getIdColumns

public static void getIdColumns(FieldMapping fmd,
                                List cols)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.