org.objectweb.jorm.mapper.rdb.generator
Class RdbGenRef

java.lang.Object
  extended byorg.objectweb.jorm.mapper.rdb.generator.RdbGenRef

public class RdbGenRef
extends java.lang.Object

Defines the structure of a reference of a JORM class. This structure is either a simple column or a composite name. In the case of a simple column, only refColumn is defined (not null). In the case of a composite name, all variables are defined except refColumn that is null.

Author:
P. Dechamboux

Field Summary
 java.util.Map cnFieldColumns
          It associates a projection column for each field of the composite name
 int cnId
          An index in [1..n] is associated with each composite name reference.
 java.lang.String cnName
          The name of the composite name used, if it is a composite name.
 java.lang.String cnPackage
          The package name of the composite name.
 java.lang.String fieldName
          name of the reference field.
 RdbGenJoin join
           
 NameDef nd
           
 RdbGenColumn refColumn
          The column associated with this reference (non composite name).
 
Constructor Summary
RdbGenRef()
           
 
Method Summary
 java.lang.String getAccessorValue(boolean isSpecific)
           
 java.lang.String getClassFieldName(java.lang.String compositeFieldName)
           
 java.util.Set getcnField2ColumnName()
           
 java.util.Map getCnFieldColumns()
           
 java.lang.String getCnFQName()
           
 int getCnId()
           
 java.lang.String getCnName()
           
 java.lang.String getCnPackage()
           
 java.lang.String getFieldName()
           
 java.lang.String getFieldName(RdbGenColumn rgc)
          Gets the composite name field that is mapped to the given column.
 RdbGenJoin getJoin(RdbGenColumn rgc)
           
 RdbGenJoin getJoin(RdbGenColumn rgc, java.lang.String fn)
           
 NameDef getNd()
           
 RdbGenColumn getRefColumn()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cnName

public java.lang.String cnName
The name of the composite name used, if it is a composite name.


cnId

public int cnId
An index in [1..n] is associated with each composite name reference.


cnPackage

public java.lang.String cnPackage
The package name of the composite name.


cnFieldColumns

public java.util.Map cnFieldColumns
It associates a projection column for each field of the composite name. < name of the field in the composite name (String) -> RdbGenColumn >


refColumn

public RdbGenColumn refColumn
The column associated with this reference (non composite name). Null if the namedef is composite, otherwise directly references the column encoding the name


nd

public NameDef nd

fieldName

public java.lang.String fieldName
name of the reference field. If null the object describes the mapping of the Id


join

public RdbGenJoin join
Constructor Detail

RdbGenRef

public RdbGenRef()
Method Detail

getFieldName

public java.lang.String getFieldName()

getNd

public NameDef getNd()

getCnName

public java.lang.String getCnName()

getCnId

public int getCnId()

getCnPackage

public java.lang.String getCnPackage()

getCnFQName

public java.lang.String getCnFQName()

getCnFieldColumns

public java.util.Map getCnFieldColumns()

getRefColumn

public RdbGenColumn getRefColumn()

getFieldName

public java.lang.String getFieldName(RdbGenColumn rgc)
Gets the composite name field that is mapped to the given column.

Parameters:
rgc - The involved column.
Returns:
The field name of the composite name that is mapped to this column.

getClassFieldName

public java.lang.String getClassFieldName(java.lang.String compositeFieldName)

getAccessorValue

public java.lang.String getAccessorValue(boolean isSpecific)

getJoin

public RdbGenJoin getJoin(RdbGenColumn rgc)
                   throws PException
Throws:
PException

getJoin

public RdbGenJoin getJoin(RdbGenColumn rgc,
                          java.lang.String fn)
                   throws PException
Throws:
PException

getcnField2ColumnName

public java.util.Set getcnField2ColumnName()

toString

public java.lang.String toString()