|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.nec.tdd.tools.dbMapper.ORMapEntry
A ORMappingInfo entry (Class name - ORMapEntry pair).
This class holds mapping between a Java class and the relational table that will be used to store object instances of the class. An instance of this class is created per class tag specified in OR mapping (xml) file.
An ORMapEntry can also be constructed dynamically and added to an ORMappingInfo object.
Constructor Summary | |
ORMapEntry()
Constructs an ORMapEntry with all paramters set to default. |
Method Summary | |
ORFieldInfo[] |
getAllFields()
Method to get all fields for this mapping. |
java.lang.String |
getClassName()
Returns the class name associated with this map entry. |
DAOInterface |
getDAO()
|
ORFieldInfo |
getField(java.lang.String fieldName)
Method to get an ORFieldInfo from this mapping for given field name. |
ORFieldInfo[] |
getKeyFields()
Method to get all key fields (fields with isKey attribute set to true) for this mapping. |
java.lang.String |
getPKClassName()
Get the primary key class name, if any, associated with this mapping. |
java.lang.String |
getTableName()
Get the database table that will be used to store object instances of the mapping class name. |
boolean |
isUserDefinedPK()
Returns true if primary key class is specified (pk_class tag) in mapping (explicit primary key). |
void |
setClassName(java.lang.String name)
Set the class name associated with this map entry. |
void |
setDAO(DAOInterface dao)
|
void |
setFields(ORFieldInfo[] newFields)
Method to set or replace all fields for this mapping. |
void |
setPKClassName(java.lang.String pkClassName)
Set a primary class for this mapping. |
void |
setTableName(java.lang.String name)
Set the database table name that will be used to store object instances of the mapping class name. |
java.lang.String |
toString()
Returns string representation of this mapping entry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ORMapEntry()
Method Detail |
public java.lang.String getClassName()
public void setClassName(java.lang.String name)
public java.lang.String getTableName()
public void setTableName(java.lang.String name)
public java.lang.String getPKClassName() throws java.lang.Exception
java.lang.Exception
- if primary key can not be determined from the mapping.public boolean isUserDefinedPK()
public void setPKClassName(java.lang.String pkClassName)
pkClassName
- a primary class for this mapping.public ORFieldInfo[] getAllFields()
getKeyFields()
public ORFieldInfo[] getKeyFields()
Notes :
Keys fields are only of basic type.
getAllFields()
public ORFieldInfo getField(java.lang.String fieldName)
fieldName
- A field name whose associated ORFieldInfo is to be
returned.public void setFields(ORFieldInfo[] newFields)
newFields
- New fields for this mapping.public DAOInterface getDAO()
public void setDAO(DAOInterface dao)
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 |