kodo.jdbc.meta
Class SubclassJoinClassIndicator
java.lang.Object
|
+--kodo.jdbc.meta.Indicator
|
+--kodo.jdbc.meta.ClassIndicator
|
+--kodo.jdbc.meta.SubclassJoinClassIndicator
- All Implemented Interfaces:
- Mapping
- public class SubclassJoinClassIndicator
- extends ClassIndicator
Class indicator that outer joins to all possible subclass tables to
determine the class of an instance. This indicator type should only
be used with vertical inheritance hierarchies.
Method Summary |
void |
fromMappingInfo(MappingInfo info,
boolean adapt)
The default implementation will raise warnings for any mapping
attributes that are declared but not in the list of the valid
attributes for this mapping. |
Class |
getClass(JDBCStoreManager store,
Result res)
Return the class for the current result row. |
SQLBuffer |
getClassConditions(JDBCStoreManager store,
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. |
String |
getMappingType()
Return the abbreviated name of this mapping, or the full class name if
it is a custom mapping. |
Table |
getTable()
Return the mapping's primary data table. |
boolean |
map()
Map a new instance of this mapping type. |
void |
reverseMap(SchemaGroup schema,
ReverseMappingTool tool)
Create mappings from the schema, using the given tool. |
boolean |
select(Select sel,
ClassMapping mapping)
Select the virtual row columns of this mapping. |
void |
toMappingInfo(MappingInfo info)
Serialize this mapping to a simple MappingInfo instance
for transfer to XML or some other format. |
Methods inherited from class kodo.jdbc.meta.Indicator |
addMappingInfoAttributes, delete, delete, getColumns, getDBDictionary, getMappingRepository, getOwnerMapping, insert, insert, isCustomDelete, isCustomInsert, isCustomUpdate, refSchemaComponents, setOwnerMapping, update, update |
TYPE
public static final String TYPE
SubclassJoinClassIndicator
public SubclassJoinClassIndicator()
getMappingType
public String getMappingType()
- Description copied from interface:
Mapping
- Return the abbreviated name of this mapping, or the full class name if
it is a custom mapping.
getTable
public Table getTable()
- Description copied from interface:
Mapping
- Return the mapping's primary data table.
- Overrides:
getTable
in class Indicator
toMappingInfo
public void toMappingInfo(MappingInfo info)
- Description copied from interface:
Mapping
- Serialize this mapping to a simple
MappingInfo
instance
for transfer to XML or some other format.
fromMappingInfo
public void fromMappingInfo(MappingInfo info,
boolean adapt)
- Description copied from class:
Indicator
- The default implementation will raise warnings for any mapping
attributes that are declared but not in the list of the valid
attributes for this mapping.
- Overrides:
fromMappingInfo
in class Indicator
- Following copied from class:
kodo.jdbc.meta.Indicator
- See Also:
Indicator.addMappingInfoAttributes(java.util.Collection)
map
public boolean map()
- Description copied from interface:
Mapping
- Map a new instance of this mapping type. If the underlying
metadata cannot be mapped using this type, return false.
reverseMap
public void reverseMap(SchemaGroup schema,
ReverseMappingTool tool)
- Description copied from interface:
Mapping
- Create mappings from the schema, using the given tool.
Implement this method if you want the class mapping to be a candidate
when reverse-mapping a schema to java classes. Note that this
method will be invoked on a template instance, so you cannot rely
on the metadata or owning repository being set.
- Overrides:
reverseMap
in class Indicator
select
public boolean select(Select sel,
ClassMapping mapping)
- Description copied from class:
Indicator
- Select the virtual row columns of this mapping. Returns false by
default.
- Overrides:
select
in class Indicator
- Following copied from class:
kodo.jdbc.meta.Indicator
- Parameters:
mapping
- the known base class being selected- Returns:
- true if anything was selected; false otherwise
getClass
public Class getClass(JDBCStoreManager store,
Result res)
throws SQLException,
ClassNotFoundException
- Description copied from class:
ClassIndicator
- Return the class for the current result row.
- Overrides:
getClass
in class ClassIndicator
getClassConditions
public SQLBuffer getClassConditions(JDBCStoreManager store,
Select sel,
Joins joins,
ClassMapping base,
boolean subs)
- Description copied from class:
ClassIndicator
- Return SQL to limit the classes selected as much as possible to the
given base class, and optionally its subclasses. Return null if
no conditions needed. The select and joins instances are supplied
in order to get column aliases.
- Overrides:
getClassConditions
in class ClassIndicator
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.