org.objectweb.speedo.metadata
Class SpeedoCommonField

java.lang.Object
  extended by org.objectweb.speedo.metadata.SpeedoElement
      extended by org.objectweb.speedo.metadata.SpeedoCommonField
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SpeedoField, SpeedoInheritedField

public class SpeedoCommonField
extends SpeedoElement

Defines a persistent field inherited from an ancestor. The mapping of this persistent field is redefined in the current persistent class. This meta object references the inherited field and defines its new mapping.

Author:
S.Chassande-Barrioz
See Also:
Serialized Form

Field Summary
 SpeedoColumn[] columns
          is the column(s) containing the value of the field.
 SpeedoTuple jdoTuple
          Type of the tuple represented by this field if it is a tuple
 SpeedoJoin join
          In case of the columns is in another table than the main table of the class, this field defines the join to reach this external table.
 SpeedoClass moClass
          Meta object of the class containing the field.
 java.lang.String name
          name of the persistent field
 
Fields inherited from class org.objectweb.speedo.metadata.SpeedoElement
jdoExtension, personality
 
Constructor Summary
SpeedoCommonField()
           
 
Method Summary
 void addColumn(SpeedoColumn col)
           
 SpeedoColumn getFKColumn(java.lang.String pkColName)
           
 SpeedoJoinColumn getFKJoinColumn(java.lang.String pkColName)
           
 java.lang.String getFQFieldName()
           
 SpeedoColumn getJoinColumn(SpeedoField joinedField)
           
 java.lang.String getSourceDesc()
           
 java.lang.String printColumns()
           
 
Methods inherited from class org.objectweb.speedo.metadata.SpeedoElement
addExtension, addInArray, getExtension, getExtensionByKey, getExtensionValueByKey, indexOfInArray, removeInArray, setValueInArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
name of the persistent field


moClass

public SpeedoClass moClass
Meta object of the class containing the field.


columns

public SpeedoColumn[] columns
is the column(s) containing the value of the field. - If the field has a primitive type (long, int, java.lang.Integer, java.lang.String, java.util.Date, ...), the value must be store on a single column (columns.lenght < 2). - If the field is a reference to a Class or a generic class (Collection, Set, ...), this field describes the columns containing the reference. In both cases the column(s) containing the value can be found in another table than the main table (moClass.mainTable). The value of this columns can depend on the reverse field (if there is one).

See Also:
SpeedoClass.mainTable, join

join

public SpeedoJoin join
In case of the columns is in another table than the main table of the class, this field defines the join to reach this external table. This join instance is common for each columns corresponding to this persistent field. This join must be also listed into #moClass.joinToExtTables. This field is null when this field is mapped on a column included into the main table.

See Also:
columns, SpeedoClass.mainTable, SpeedoClass.joinToExtTables

jdoTuple

public SpeedoTuple jdoTuple
Type of the tuple represented by this field if it is a tuple

Constructor Detail

SpeedoCommonField

public SpeedoCommonField()
Method Detail

getSourceDesc

public java.lang.String getSourceDesc()

addColumn

public void addColumn(SpeedoColumn col)

getJoinColumn

public SpeedoColumn getJoinColumn(SpeedoField joinedField)

getFKColumn

public SpeedoColumn getFKColumn(java.lang.String pkColName)

getFKJoinColumn

public SpeedoJoinColumn getFKJoinColumn(java.lang.String pkColName)

getFQFieldName

public final java.lang.String getFQFieldName()

printColumns

public java.lang.String printColumns()