org.apache.openjpa.jdbc.meta.strats
Class SuperclassDiscriminatorStrategy
java.lang.Object
org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractDiscriminatorStrategy
org.apache.openjpa.jdbc.meta.strats.SuperclassDiscriminatorStrategy
- All Implemented Interfaces:
- Serializable, DiscriminatorStrategy, Strategy
public class SuperclassDiscriminatorStrategy
- extends AbstractDiscriminatorStrategy
Discriminator strategy that delegates to superclass discriminator.
- Author:
- Abe White
- See Also:
- Serialized Form
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy |
customDelete, customInsert, customUpdate, delete, getAlias, 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, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, update |
SuperclassDiscriminatorStrategy
public SuperclassDiscriminatorStrategy()
map
public void map(boolean adapt)
- Description copied from interface:
Strategy
- Map the owning mapping using this strategy.
- Specified by:
map
in interface Strategy
- Overrides:
map
in class AbstractStrategy
- Parameters:
adapt
- if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be set
loadSubclasses
public void loadSubclasses(JDBCStore store)
throws SQLException,
ClassNotFoundException
- Description copied from class:
AbstractDiscriminatorStrategy
- By default, logs a warning that this discriminator cannot calculate
its list of subclasses on its own.
- Specified by:
loadSubclasses
in interface DiscriminatorStrategy
- Overrides:
loadSubclasses
in class AbstractDiscriminatorStrategy
- Throws:
SQLException
ClassNotFoundException
getClass
public Class getClass(JDBCStore store,
ClassMapping base,
Result res)
throws SQLException,
ClassNotFoundException
- Description copied from interface:
DiscriminatorStrategy
- Return the class for the current result row.
- Specified by:
getClass
in interface DiscriminatorStrategy
- Overrides:
getClass
in class AbstractDiscriminatorStrategy
- Throws:
SQLException
ClassNotFoundException
hasClassConditions
public boolean hasClassConditions(ClassMapping base,
boolean subclasses)
- Description copied from interface:
DiscriminatorStrategy
- Whether any class conditions are necessary.
- Specified by:
hasClassConditions
in interface DiscriminatorStrategy
- Overrides:
hasClassConditions
in class AbstractDiscriminatorStrategy
- See Also:
DiscriminatorStrategy.getClassConditions(org.apache.openjpa.jdbc.sql.Select, org.apache.openjpa.jdbc.sql.Joins, org.apache.openjpa.jdbc.meta.ClassMapping, boolean)
getClassConditions
public SQLBuffer getClassConditions(Select sel,
Joins joins,
ClassMapping base,
boolean subclasses)
- Description copied from interface:
DiscriminatorStrategy
- Return SQL to limit the classes selected as much as possible to the
given base class, and optionally its subclasses. The select and joins
instances are supplied in order to get column aliases.
- Specified by:
getClassConditions
in interface DiscriminatorStrategy
- Overrides:
getClassConditions
in class AbstractDiscriminatorStrategy
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.