|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl
| Field Summary | |
static String |
CLASS_COL
Metadata extension key used to mark the name of the subclass indicator column for this class. |
| Constructor Summary | |
SubclassProviderImpl()
|
|
| Method Summary | |
void |
addClassCondition(PersistenceManagerImpl pm,
ObjectSelect sel)
Adds the appropriate SQL to sel to select only
instances that are of the class that this subclass provider is
configured for. |
void |
addClassCondition(PersistenceManagerImpl pm,
QuerySelect sel)
Adds the appropriate SQL to sel to select only
instances that are of the class that this subclass provider is
configured for. |
void |
addSubclassConditions(PersistenceManagerImpl pm,
ObjectSelect sel)
Adds the appropriate SQL to sel to select only
instances that are of the class that this provider is
configured for, or are subclasses of that class. |
void |
addSubclassConditions(PersistenceManagerImpl pm,
QuerySelect sel)
Adds the appropriate SQL to sel to select only
instances that are of the class that this provider is
configured for, or are subclasses of that class. |
protected String |
getIndicatorColumnName()
Returns the name of the subclass indicator column used by this mapping/provider combination. |
Column[] |
getIndicatorColumns()
Returns the columns that store the indicator value. |
protected int |
getIndicatorColumnSQLType()
Returns the SQLTypes type constant for the indicator
column used by this mapping/provider combination. |
Class[] |
getSubclasses(PersistenceManagerImpl pm)
This invokes getType(PersistenceManagerImpl,ClassResolver,Object) on each
distinct value for this mapping's subclass indicator
column. |
Class |
getType(PersistenceManagerImpl pm,
ClassResolver resolver,
Object indicatorVal)
Return a Class object given that val was stored
in this mapping's indicator column. |
Class |
getType(PersistenceManagerImpl pm,
ResultSet rs,
int startIndex,
ClassResolver resolver)
Return the class of the object stored in the current row of the given result set. |
Object |
getValue(PersistenceManagerImpl pm)
Return an object to be stored in this mapping's indicator column. |
void |
initialize(ClassMapping cm,
Column[] cols)
Initialize this subclass provider for cm. |
void |
initialize(ClassMapping cm,
Table primaryTable)
Initialize this subclass provider for cm. |
void |
insert(StateManagerImpl sm,
Table currentTable,
Insert insert)
Adds the appropriate SQL to insert to insert the
subclass indicator values into currentTable. |
void |
select(PersistenceManagerImpl pm,
ObjectSelect sel)
Adds the appropriate SQL to sel to select the
columns needed for subclass information. |
void |
select(PersistenceManagerImpl pm,
QuerySelect sel)
Adds the appropriate SQL to sel to select the
columns needed for subclass information. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final String CLASS_COL
| Constructor Detail |
public SubclassProviderImpl()
| Method Detail |
public void initialize(ClassMapping cm,
Table primaryTable)
SubclassProvidercm.
primaryTable is the table that the class
indicator should be installed in.initialize in interface SubclassProvider
public void initialize(ClassMapping cm,
Column[] cols)
SubclassProvidercm.
indicatorCols is the array of indicator columns
that cm's parent class uses, and which this
subclass provider should therefore use.initialize in interface SubclassProvider
public Class getType(PersistenceManagerImpl pm,
ResultSet rs,
int startIndex,
ClassResolver resolver)
SubclassProviderReturn the class of the object stored in the current row of
the given result set. startIndex is the index of
the first of this subclass provider's columns.
getType in interface SubclassProvider
public Class getType(PersistenceManagerImpl pm,
ClassResolver resolver,
Object indicatorVal)
val was stored
in this mapping's indicator column. The class should be loaded
with resolver. pm is a reference to
the PersistenceManagerImpl that requested that this class
be loaded.public Object getValue(PersistenceManagerImpl pm)
SubclassProviderReturn an object to be stored in this mapping's indicator
column. pm is a reference to the
PersistenceManagerImpl that requested that this class be
loaded.
This method should generate values from which
SubclassProvider.getType(PersistenceManagerImpl,ResultSet,int,ClassResolver)
can correctly determine a class.
getValue in interface SubclassProvider
public void addClassCondition(PersistenceManagerImpl pm,
ObjectSelect sel)
SubclassProvidersel to select only
instances that are of the class that this subclass provider is
configured for.addClassCondition in interface SubclassProvider
public void addSubclassConditions(PersistenceManagerImpl pm,
ObjectSelect sel)
SubclassProvidersel to select only
instances that are of the class that this provider is
configured for, or are subclasses of that class.addSubclassConditions in interface SubclassProvider
public void select(PersistenceManagerImpl pm,
ObjectSelect sel)
SubclassProvidersel to select the
columns needed for subclass information.select in interface SubclassProvider
public void insert(StateManagerImpl sm,
Table currentTable,
Insert insert)
SubclassProviderinsert to insert the
subclass indicator values into currentTable.insert in interface SubclassProviderpublic Column[] getIndicatorColumns()
SubclassProvidernull or Column[0] if there
are no columns.getIndicatorColumns in interface SubclassProviderprotected String getIndicatorColumnName()
protected int getIndicatorColumnSQLType()
SQLTypes type constant for the indicator
column used by this mapping/provider combination.public Class[] getSubclasses(PersistenceManagerImpl pm)
This invokes getType(PersistenceManagerImpl,ClassResolver,Object) on each
distinct value for this mapping's subclass indicator
column.
getSubclasses in interface SubclassProvider
public void addClassCondition(PersistenceManagerImpl pm,
QuerySelect sel)
SubclassProvidersel to select only
instances that are of the class that this subclass provider is
configured for.addClassCondition in interface SubclassProvider
public void addSubclassConditions(PersistenceManagerImpl pm,
QuerySelect sel)
SubclassProvidersel to select only
instances that are of the class that this provider is
configured for, or are subclasses of that class.addSubclassConditions in interface SubclassProvider
public void select(PersistenceManagerImpl pm,
QuerySelect sel)
SubclassProvidersel to select the
columns needed for subclass information.select in interface SubclassProvider
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||