|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.meta.strats.AbstractStrategy org.apache.openjpa.jdbc.meta.strats.AbstractDiscriminatorStrategy org.apache.openjpa.jdbc.meta.strats.SubclassJoinDiscriminatorStrategy
public class SubclassJoinDiscriminatorStrategy
Discriminator strategy that outer joins to all possible subclass tables to determine the class of an instance. This indicator type should only be used with vertical inheritance hierarchies.
Field Summary | |
---|---|
static String |
ALIAS
|
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractDiscriminatorStrategy |
---|
disc, isFinal |
Constructor Summary | |
---|---|
SubclassJoinDiscriminatorStrategy()
|
Method Summary | |
---|---|
String |
getAlias()
Return the alias of this strategy. |
Class |
getClass(JDBCStore store,
ClassMapping base,
Result res)
Return the class for the current result row. |
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. |
boolean |
hasClassConditions(ClassMapping base,
boolean subclasses)
Whether any class conditions are necessary. |
void |
map(boolean adapt)
Map the owning mapping using this strategy. |
boolean |
select(Select sel,
ClassMapping mapping)
Select the data for this Discriminator. |
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractDiscriminatorStrategy |
---|
loadSubclasses, setDiscriminator |
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy |
---|
customDelete, customInsert, customUpdate, delete, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, 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, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, update |
Field Detail |
---|
public static final String ALIAS
Constructor Detail |
---|
public SubclassJoinDiscriminatorStrategy()
Method Detail |
---|
public String getAlias()
Strategy
getAlias
in interface Strategy
getAlias
in class AbstractStrategy
public void map(boolean adapt)
Strategy
map
in interface Strategy
map
in class AbstractStrategy
adapt
- if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be setpublic boolean select(Select sel, ClassMapping mapping)
DiscriminatorStrategy
select
in interface DiscriminatorStrategy
select
in class AbstractDiscriminatorStrategy
mapping
- the known base class being selected; this may
not be the base class in the inheritance hierarchy
public Class getClass(JDBCStore store, ClassMapping base, Result res) throws SQLException, ClassNotFoundException
DiscriminatorStrategy
getClass
in interface DiscriminatorStrategy
getClass
in class AbstractDiscriminatorStrategy
SQLException
ClassNotFoundException
public boolean hasClassConditions(ClassMapping base, boolean subclasses)
DiscriminatorStrategy
hasClassConditions
in interface DiscriminatorStrategy
hasClassConditions
in class AbstractDiscriminatorStrategy
DiscriminatorStrategy.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)
DiscriminatorStrategy
getClassConditions
in interface DiscriminatorStrategy
getClassConditions
in class AbstractDiscriminatorStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |