SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002

com.solarmetric.kodo.impl.jdbc.ormapping
Class FieldMapping

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
        |
        +--com.solarmetric.kodo.impl.jdbc.ormapping.FieldMapping
Direct Known Subclasses:
AbstractCollectionMapping, AbstractMapMapping, LobMapping, OneToOneMapping, ValueMapping

public abstract class FieldMapping
extends Mapping

A mapping between a field of a java class and its relational database representation.

Author:
Abe White

Field Summary
static String COL_INDEX
          Metadata extension key used to mark fields for indexing.
static String COL_LENGTH
          Metadata extension key used to specify the maximum length of a field.
static String DATA_COL
          Metadata extension key used to mark the name of the data column for this field.
 
Fields inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
MAPPING, TABLE
 
Constructor Summary
FieldMapping()
           
 
Method Summary
 void compareToNull(com.solarmetric.kodo.impl.jdbc.sql.ObjectSelect sel, boolean isNull)
          Compare this column to null.
 Column[] getDataColumns()
          Return the primary data column(s) for this mapping.
static FieldMapping getInstance(FieldMetaData fmd)
          Return the FieldMapping for the given FieldMetaData, creating it if necessary.
 FieldMetaData getMetaData()
          Return the metadata for the primary data column.
 void join(com.solarmetric.kodo.impl.jdbc.sql.ObjectSelect select)
          Join this mapping to the given select statement.
 void setDataColumns(Column[] data)
          Set the primary data column(s) for this mapping.
 
Methods inherited from class com.solarmetric.kodo.impl.jdbc.ormapping.Mapping
createMappings, dropCache, getConfiguration, getDictionary, getInstance, getTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_COL

public static final String DATA_COL
Metadata extension key used to mark the name of the data column for this field.

COL_INDEX

public static final String COL_INDEX
Metadata extension key used to mark fields for indexing.

COL_LENGTH

public static final String COL_LENGTH
Metadata extension key used to specify the maximum length of a field.
Constructor Detail

FieldMapping

public FieldMapping()
Method Detail

getInstance

public static FieldMapping getInstance(FieldMetaData fmd)
Return the FieldMapping for the given FieldMetaData, creating it if necessary.

getDataColumns

public Column[] getDataColumns()
Return the primary data column(s) for this mapping. This will be the primary key column(s) for object mappings.

setDataColumns

public void setDataColumns(Column[] data)
Set the primary data column(s) for this mapping. For primary table mappings, these columns should reside in the same table as the PK columns of this class. For mappings to other object types, these columns should hold the PK values for the related object.

getMetaData

public FieldMetaData getMetaData()
Return the metadata for the primary data column.

join

public void join(com.solarmetric.kodo.impl.jdbc.sql.ObjectSelect select)
Join this mapping to the given select statement. For basic mappings, this no-op method implementation will suffice. Secondary table mappings should override this method to do the proper join.

compareToNull

public void compareToNull(com.solarmetric.kodo.impl.jdbc.sql.ObjectSelect sel,
                          boolean isNull)
Compare this column to null. For basic primary table mappings, the default definition of this method will suffice. More complex mappings should override this method.

SolarMetric Kodo JDO Enterprise Edition 2.3.1 generated on August 20 2002

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