|
||||||||||
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
public abstract class AbstractDiscriminatorStrategy
No-op strategy for easy extension.
Field Summary | |
---|---|
protected Discriminator |
disc
The owning discriminator. |
protected boolean |
isFinal
Whether the owning class is final. |
Constructor Summary | |
---|---|
AbstractDiscriminatorStrategy()
|
Method Summary | |
---|---|
Class |
getClass(JDBCStore store,
ClassMapping base,
Result result)
Return the class for the current result row. |
SQLBuffer |
getClassConditions(Select sel,
Joins joins,
ClassMapping base,
boolean subs)
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 subs)
Whether any class conditions are necessary. |
void |
loadSubclasses(JDBCStore store)
By default, logs a warning that this discriminator cannot calculate its list of subclasses on its own. |
boolean |
select(Select sel,
ClassMapping mapping)
Select the data for this Discriminator. |
void |
setDiscriminator(Discriminator owner)
Set the Discriminator that uses this strategy. |
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 Discriminator disc
protected boolean isFinal
Constructor Detail |
---|
public AbstractDiscriminatorStrategy()
Method Detail |
---|
public void setDiscriminator(Discriminator owner)
DiscriminatorStrategy
setDiscriminator
in interface DiscriminatorStrategy
public boolean select(Select sel, ClassMapping mapping)
DiscriminatorStrategy
select
in interface DiscriminatorStrategy
mapping
- the known base class being selected; this may
not be the base class in the inheritance hierarchy
public void loadSubclasses(JDBCStore store) throws SQLException, ClassNotFoundException
loadSubclasses
in interface DiscriminatorStrategy
SQLException
ClassNotFoundException
public Class getClass(JDBCStore store, ClassMapping base, Result result) throws SQLException, ClassNotFoundException
DiscriminatorStrategy
getClass
in interface DiscriminatorStrategy
SQLException
ClassNotFoundException
public boolean hasClassConditions(ClassMapping base, boolean subs)
DiscriminatorStrategy
hasClassConditions
in interface DiscriminatorStrategy
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 subs)
DiscriminatorStrategy
getClassConditions
in interface DiscriminatorStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |