public abstract class AbstractDiscriminatorStrategy extends AbstractStrategy implements DiscriminatorStrategy
| Modifier and Type | Field and Description |
|---|---|
protected Discriminator |
disc
The owning discriminator.
|
protected boolean |
isFinal
Whether the owning class is final.
|
| Constructor and Description |
|---|
AbstractDiscriminatorStrategy() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, updateprotected Discriminator disc
protected boolean isFinal
public void setDiscriminator(Discriminator owner)
DiscriminatorStrategysetDiscriminator in interface DiscriminatorStrategypublic boolean select(Select sel, ClassMapping mapping)
DiscriminatorStrategyselect in interface DiscriminatorStrategymapping - the known base class being selected; this may
not be the base class in the inheritance hierarchypublic void loadSubclasses(JDBCStore store) throws SQLException, ClassNotFoundException
loadSubclasses in interface DiscriminatorStrategySQLExceptionClassNotFoundExceptionpublic Class getClass(JDBCStore store, ClassMapping base, Result result) throws SQLException, ClassNotFoundException
DiscriminatorStrategygetClass in interface DiscriminatorStrategySQLExceptionClassNotFoundExceptionpublic boolean hasClassConditions(ClassMapping base, boolean subs)
DiscriminatorStrategypublic SQLBuffer getClassConditions(Select sel, Joins joins, ClassMapping base, boolean subs)
DiscriminatorStrategygetClassConditions in interface DiscriminatorStrategyCopyright © 2006–2022 Apache Software Foundation. All rights reserved.