SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.meta
Interface PrimaryKeyMapping

All Known Implementing Classes:
TransformationMapping, ValueMapping

public interface PrimaryKeyMapping

Field mappings for primary key fields must implement this interface.


Method Summary
 java.lang.Object getPrimaryKeyValue(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res, com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols, int index)
          Load the primary key value for this field from the given result.
 void setPrimaryKeyValue(com.solarmetric.rd.kodo.impl.jdbc.runtime.Row row, com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols, int index, java.lang.Object val, boolean set)
          Set the primary key value of this mapping into the given row.
 

Method Detail

getPrimaryKeyValue

public java.lang.Object getPrimaryKeyValue(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res,
                                           com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols,
                                           int index)
                                    throws java.sql.SQLException
Load the primary key value for this field from the given result.

Parameters:
res - the result to load from
cols - the columns in the row corresponding to all the primary key columns of the owning class
index - the index in the cols array of the first column that belongs to this primary key mapping; any additional primary key columns will be sequentially after the index
Returns:
the value of this primary key field
java.sql.SQLException

setPrimaryKeyValue

public void setPrimaryKeyValue(com.solarmetric.rd.kodo.impl.jdbc.runtime.Row row,
                               com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols,
                               int index,
                               java.lang.Object val,
                               boolean set)
                        throws java.sql.SQLException
Set the primary key value of this mapping into the given row.

Parameters:
row - the row to set into
cols - the columns in the row corresponding to the primary key columns in the owning class
index - the index in the cols array of the first column that belongs to this primary key mapping; any additional primary key columns will be sequentially after the index
val - the Java value of this field
set - if true, set the value into the row; if false, add a where condition to the row
java.sql.SQLException

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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