|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.nec.tdd.tools.dbMapper.ORFieldInfo.MultipleEntryTypeInfo
Stores additional information for an ORFieldInfo of multiple-entry type.
A multiple-entry can be of one of the following two types:
Component class (contained in Array or collection) should have an OR mapping, say componentMapEntry, against a relational database table. All key fields of this componentMapEntry are mapped to basic fields of parentMapEntry (mapping to which contains this ORFieldInfo). This class maintains a map of these parent-child pairs indexed by parent field name.
Constructor Summary | |
ORFieldInfo.MultipleEntryTypeInfo(java.lang.String fieldTypeStr,
java.lang.String containerTypeStr)
Constructs a MultipleEntryTypeInfo with given component and container types. |
Method Summary | |
void |
addRelation(java.lang.String parentField,
java.lang.String childField)
Add an parent-child field relation to relation map. |
java.lang.Class |
getContainerClass()
Returns the container class associated with this multiple-entry. |
java.lang.String |
getContainerTypeStr()
Returns container class name as specified in mapping file. |
java.lang.Class |
getEntryClass()
Returns the component class associated with this multiple-entry. |
java.lang.String |
getEntryTypeStr()
Returns component class name. |
java.lang.String |
getRelation(java.lang.String parentField)
Get child field name associated with given parent field name from parent-child relation map. |
java.util.Collection |
getRelations()
Get all parent-child relation pair from the relation map associated with this multiple-entry type. |
java.lang.String |
toString()
Returns string representation of MultipleEntryTypeInfo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ORFieldInfo.MultipleEntryTypeInfo(java.lang.String fieldTypeStr, java.lang.String containerTypeStr)
Method Detail |
public java.lang.String getEntryTypeStr()
public java.lang.Class getEntryClass() throws java.lang.Exception
java.lang.Exception
- if class can not be loaded.public java.lang.String getContainerTypeStr()
public java.lang.Class getContainerClass() throws java.lang.Exception
java.lang.Exception
- if class can not be loaded.public void addRelation(java.lang.String parentField, java.lang.String childField)
parentField
- A basic field name from mapping which holds this
ORFieldInfo. This field name maps to
a key field (childField) specified in mapping
associated with the component type/class.childField
- A key field name specified in OR mapping
associated with the multiple-entry component
class.public java.lang.String getRelation(java.lang.String parentField)
parentField
- The parent field name (a basic field name
from mapping which holds the ORFieldInfo).public java.util.Collection getRelations()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |