public abstract class InValueDiscriminatorStrategy extends AbstractDiscriminatorStrategy
disc, isFinal| Constructor and Description |
|---|
InValueDiscriminatorStrategy() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class |
getClass(JDBCStore store,
ClassMapping base,
Result res)
Return the class for the current result row.
|
protected abstract java.lang.Class |
getClass(java.lang.Object val,
JDBCStore store)
Convert the given discriminator value to the corresponding class.
|
SQLBuffer |
getClassConditions(Select sel,
Joins joins,
ClassMapping base,
boolean subclasses)
Return SQL to limit the classes selected as much as possible to the
given base class, and optionally its subclasses.
|
protected abstract java.lang.Object |
getDiscriminatorValue(ClassMapping cls)
Return the discriminator value for the given type.
|
protected abstract int |
getJavaType()
Return the Java type code from
JavaTypes for the discriminator
values. |
boolean |
hasClassConditions(ClassMapping base,
boolean subclasses)
Whether any class conditions are necessary.
|
void |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
void |
map(boolean adapt)
Map the owning mapping using this strategy.
|
boolean |
select(Select sel,
ClassMapping mapping)
Select the data for this Discriminator.
|
loadSubclasses, setDiscriminatorcustomDelete, customInsert, customUpdate, delete, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdate, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomDelete, customInsert, customUpdate, delete, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdate, updateprotected abstract int getJavaType()
JavaTypes for the discriminator
values. This method is only used during mapping installation.protected abstract java.lang.Object getDiscriminatorValue(ClassMapping cls)
protected abstract java.lang.Class getClass(java.lang.Object val,
JDBCStore store)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic void map(boolean adapt)
Strategymap in interface Strategymap in class AbstractStrategyadapt - if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be setpublic void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws java.sql.SQLException
Strategyinsert in interface Strategyinsert in class AbstractStrategyjava.sql.SQLExceptionpublic boolean select(Select sel, ClassMapping mapping)
DiscriminatorStrategyselect in interface DiscriminatorStrategyselect in class AbstractDiscriminatorStrategymapping - the known base class being selected; this may
not be the base class in the inheritance hierarchypublic java.lang.Class getClass(JDBCStore store, ClassMapping base, Result res) throws java.sql.SQLException, java.lang.ClassNotFoundException
DiscriminatorStrategygetClass in interface DiscriminatorStrategygetClass in class AbstractDiscriminatorStrategyjava.sql.SQLExceptionjava.lang.ClassNotFoundExceptionpublic boolean hasClassConditions(ClassMapping base, boolean subclasses)
DiscriminatorStrategyhasClassConditions in interface DiscriminatorStrategyhasClassConditions in class AbstractDiscriminatorStrategyDiscriminatorStrategy.getClassConditions(org.apache.openjpa.jdbc.sql.Select, org.apache.openjpa.jdbc.sql.Joins, org.apache.openjpa.jdbc.meta.ClassMapping, boolean)public SQLBuffer getClassConditions(Select sel, Joins joins, ClassMapping base, boolean subclasses)
DiscriminatorStrategygetClassConditions in interface DiscriminatorStrategygetClassConditions in class AbstractDiscriminatorStrategyCopyright © 2006-2013 Apache Software Foundation. All Rights Reserved.