|
||||||||
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.SingleEntryTypeInfo
Stores additional information for an ORFieldInfo of single-entry type. The single-entry field class should have an OR mapping, say childMapEntry, against a relational database table.
All key fields of this childMapEntry 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.SingleEntryTypeInfo(java.lang.String fieldTypeStr)
Constructs a SingleEntryTypeInfo with given field type string. |
Method Summary | |
void |
addRelation(java.lang.String parentField,
java.lang.String childField)
Add an parent-child field relation to relation map. |
java.lang.Class |
getFieldClass()
Returns the class associated with field's type. |
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 single-entry type. |
java.lang.String |
getTypeStr()
Returns string representation of field's type/class. |
java.lang.String |
toString()
Returns string representation of SingleEntryTypeInfo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ORFieldInfo.SingleEntryTypeInfo(java.lang.String fieldTypeStr)
Method Detail |
public java.lang.String getTypeStr()
public java.lang.Class getFieldClass() throws java.lang.Exception
java.lang.Exception
- if field class can not be located.public void addRelation(java.lang.String parentField, java.lang.String childField)
parentField
- A basic field name from mapping which holds this
single-entry type field. This field name maps to
a key field (childField) specified in mapping
associated with the single-entry field class.childField
- A key field name specified in OR mapping
associated with the single-entry field 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 |