| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractClassStrategy
public abstract class AbstractClassStrategy
No-op strategy for easy extension.
| Field Summary | |
|---|---|
| protected  ClassMapping | clsThe owning class mapping. | 
| Constructor Summary | |
|---|---|
| AbstractClassStrategy() | |
| Method Summary | |
|---|---|
|  ResultObjectProvider | customLoad(JDBCStore store,
           boolean subclasses,
           JDBCFetchConfiguration fetch,
           long startIdx,
           long endIdx)Implement this method to customize obtaining a result containing all instances of this class. | 
|  boolean | customLoad(OpenJPAStateManager sm,
           JDBCStore store,
           JDBCFetchConfiguration fetch,
           Result result)Implement this method to customize loading from a Resultinto an instance. | 
|  boolean | customLoad(OpenJPAStateManager sm,
           JDBCStore store,
           PCState state,
           JDBCFetchConfiguration fetch)Implement this method to load the state of a given object, without a previous Result. | 
|  boolean | isPrimaryKeyObjectId(boolean hasAll)Return true if the this class' primary key columns correspond to the base class' primary key columns used to construct oid values. | 
|  Joins | joinSuperclass(Joins joins,
               boolean toThis)Join the mapping and its superclass. | 
|  void | setClassMapping(ClassMapping owner)Set the class mapping using this strategy. | 
|  boolean | supportsEagerSelect(Select sel,
                    OpenJPAStateManager sm,
                    JDBCStore store,
                    ClassMapping base,
                    JDBCFetchConfiguration fetch)Return true if this strategy can perform the given select from the given basemapping. | 
| Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy | 
|---|
| customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, update | 
| 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.Strategy | 
|---|
| customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, update | 
| Field Detail | 
|---|
protected ClassMapping cls
| Constructor Detail | 
|---|
public AbstractClassStrategy()
| Method Detail | 
|---|
public void setClassMapping(ClassMapping owner)
ClassStrategy
setClassMapping in interface ClassStrategypublic boolean isPrimaryKeyObjectId(boolean hasAll)
ClassStrategy
isPrimaryKeyObjectId in interface ClassStrategyhasAll - if true, there must be a primary key column for every
 base class primary key column; if false the primary key
 must only match a subset of the base class primary key columns
public Joins joinSuperclass(Joins joins,
                            boolean toThis)
ClassStrategy
joinSuperclass in interface ClassStrategytoThis - if false, inner join to the superclass table; if
 true, outer join from the superclass table to this table
public boolean supportsEagerSelect(Select sel,
                                   OpenJPAStateManager sm,
                                   JDBCStore store,
                                   ClassMapping base,
                                   JDBCFetchConfiguration fetch)
ClassStrategybase mapping.
 The given state manager may be null if selecting multiple instances.
supportsEagerSelect in interface ClassStrategy
public ResultObjectProvider customLoad(JDBCStore store,
                                       boolean subclasses,
                                       JDBCFetchConfiguration fetch,
                                       long startIdx,
                                       long endIdx)
                                throws java.sql.SQLException
ClassStrategy
customLoad in interface ClassStrategyjava.sql.SQLException
public boolean customLoad(OpenJPAStateManager sm,
                          JDBCStore store,
                          PCState state,
                          JDBCFetchConfiguration fetch)
                   throws java.sql.SQLException,
                          java.lang.ClassNotFoundException
ClassStrategyResult. Return true if this method handles the
 load. If the object does not exist in the data store, simply take no
 action on it (but still return true). Return false to use default
 loading.
customLoad in interface ClassStrategystate - if non-null, then you must initialize the state
 and persistent object of the given state manager
 (after determining the actual class of the object
 from the database, if there are possible persistent
 subclasses); initialization looks like this: 
 sm.initialize (pcClass, state)
java.sql.SQLException
java.lang.ClassNotFoundException
public boolean customLoad(OpenJPAStateManager sm,
                          JDBCStore store,
                          JDBCFetchConfiguration fetch,
                          Result result)
                   throws java.sql.SQLException
ClassStrategyResult
 into an instance. Return true if this mapping handles the
 load; false if normal loading should procede after calling this method.
customLoad in interface ClassStrategyjava.sql.SQLException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||