|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kodo.jdbc.meta.DelegatingJoinableMapping
Delegates to another JoinableMapping after doing column
translation. Useful for joins that are not managed by any fields on
the joined-from side. For example, a vertical class mapping manages
foreign key columns linking to the superclass table. It needs to use
the joinable field mappings of the superclass to actually extract the
column values from field values and so forth, but in order for other
mapping to join to its foreign key columns it needs joinable mappings
of its own. So it creates delegating mappings.
| Constructor Summary | |
DelegatingJoinableMapping(JoinableMapping join,
ForeignKey fk)
Constructor. |
|
| Method Summary | |
Column[] |
getColumns()
Return this mapping's columns. |
FieldMapping |
getFieldMapping()
Return the field mapping that owns this mapping's columns. |
int |
getJoinTypeCode(Column col)
Return the type code from FieldMapping of the JDBC value
returned from calls to getJoinValue(kodo.jdbc.sql.Result, kodo.jdbc.schema.Column[], kodo.jdbc.schema.ForeignKey) for the given column. |
Object |
getJoinValue(Object fieldVal,
Column col)
Return the join value of the given column. |
Object |
getJoinValue(Result res,
Column[] cols,
ForeignKey fk)
Return the value for this mapping from the given result, using the given columns. |
void |
setAutoIncrementValue(KodoStateManager sm,
Column col,
long autoInc)
Use the given auto-incremented value to set this join value's field on the given instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DelegatingJoinableMapping(JoinableMapping join,
ForeignKey fk)
join - the mapping to delegate tofk - the foreign key to use to translate any given columns
to the given delegate's columns| Method Detail |
public Column[] getColumns()
JoinableMappinggetColumns in interface JoinableMappingpublic FieldMapping getFieldMapping()
JoinableMappinggetFieldMapping in interface JoinableMapping
public Object getJoinValue(Result res,
Column[] cols,
ForeignKey fk)
throws SQLException
JoinableMappingcols array from JoinableMapping.getColumns(), but delegates
may change the columns to use. If the given foreign key is non-null,
use the foreign key's columns by translating the given columns through
ForeignKey.getColumn(kodo.jdbc.schema.Column).getJoinValue in interface JoinableMapping
public Object getJoinValue(Object fieldVal,
Column col)
JoinableMappinggetJoinValue in interface JoinableMappingkodo.jdbc.meta.JoinableMappingval - the value of the field for this mappingcol - the column of this mapping whose value to returnpublic int getJoinTypeCode(Column col)
JoinableMappingFieldMapping of the JDBC value
returned from calls to JoinableMapping.getJoinValue(kodo.jdbc.sql.Result, kodo.jdbc.schema.Column[], kodo.jdbc.schema.ForeignKey) for the given column.getJoinTypeCode in interface JoinableMapping
public void setAutoIncrementValue(KodoStateManager sm,
Column col,
long autoInc)
JoinableMappingsetAutoIncrementValue in interface JoinableMapping
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||