|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
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 JDBCTypes of the JDBC
value returned from calls to getJoinValue(kodo.jdbc.sql.Result, kodo.jdbc.schema.Column[], kodo.jdbc.schema.ForeignKey, kodo.jdbc.sql.Joins) 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,
Joins joins)
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 columnsMethod Detail |
public Column[] getColumns()
JoinableMapping
getColumns
in interface JoinableMapping
public FieldMapping getFieldMapping()
JoinableMapping
getFieldMapping
in interface JoinableMapping
public Object getJoinValue(Result res, Column[] cols, ForeignKey fk, Joins joins) throws SQLException
JoinableMapping
cols
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)
JoinableMapping
getJoinValue
in interface JoinableMapping
kodo.jdbc.meta.JoinableMapping
val
- the value of the field for this mappingcol
- the column of this mapping whose value to returnpublic int getJoinTypeCode(Column col)
JoinableMapping
JDBCTypes
of the JDBC
value returned from calls to JoinableMapping.getJoinValue(kodo.jdbc.sql.Result, kodo.jdbc.schema.Column[], kodo.jdbc.schema.ForeignKey, kodo.jdbc.sql.Joins)
for the
given column.getJoinTypeCode
in interface JoinableMapping
public void setAutoIncrementValue(KodoStateManager sm, Column col, long autoInc)
JoinableMapping
setAutoIncrementValue
in interface JoinableMapping
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |