SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.jdbc.meta
Interface JoinableMapping

All Known Implementing Classes:
TransformationFieldMapping, ValueFieldMapping, ByteArrayFieldMapping, DelegatingJoinableMapping

public interface JoinableMapping

Represents a mapping that can be joined to. Any column that a user joins to must be "owned" by a field mapping that implements this interface. The only exceptions to this rule are:


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.
 

Method Detail

getFieldMapping

public FieldMapping getFieldMapping()
Return the field mapping that owns this mapping's columns. If this is a delegate mapping, return the field mapping of the delegate.

getColumns

public Column[] getColumns()
Return this mapping's columns.

getJoinValue

public Object getJoinValue(Result res,
                           Column[] cols,
                           ForeignKey fk,
                           Joins joins)
                    throws SQLException
Return the value for this mapping from the given result, using the given columns. Outside code will always call this method with the cols array from 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

public Object getJoinValue(Object fieldVal,
                           Column col)
Return the join value of the given column.
Parameters:
val - the value of the field for this mapping
col - the column of this mapping whose value to return

getJoinTypeCode

public 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.

setAutoIncrementValue

public 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.

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.