public class SuperclassDiscriminatorStrategy extends AbstractDiscriminatorStrategy
disc, isFinal
Constructor and Description |
---|
SuperclassDiscriminatorStrategy() |
Modifier and Type | Method and Description |
---|---|
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 |
loadSubclasses(JDBCStore store)
By default, logs a warning that this discriminator cannot calculate
its list of subclasses on its own.
|
void |
map(boolean adapt)
Map the owning mapping using this strategy.
|
select, setDiscriminator
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, update
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 void loadSubclasses(JDBCStore store) throws SQLException, ClassNotFoundException
AbstractDiscriminatorStrategy
loadSubclasses
in interface DiscriminatorStrategy
loadSubclasses
in class AbstractDiscriminatorStrategy
SQLException
ClassNotFoundException
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
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.