toolbox.dao.orm
Class ORMReferenceConfig

Package class diagram package ORMReferenceConfig
java.lang.Object
  extended by toolbox.dao.orm.ORMReferenceConfig

 class ORMReferenceConfig
extends java.lang.Object

Package protected class to encapsulate the configuration of a single reference within an ORMMappingConfig configuration.


Constructor Summary
ORMReferenceConfig(java.lang.String table, java.lang.String daoBean, java.lang.String daoBeanMapping, java.lang.String refId, java.lang.String entityId)
          Construct a new reference instance with the given configuration settings.
 
Method Summary
(package private)  java.lang.Class getDaoBeanClass()
          Return a Class instance of the DaoBean implementation configured for this reference.
(package private)  java.lang.Object getDaoBeanInstance()
          Return an instance of the DaoBean implementation configured for this reference.
(package private)  java.lang.String getDaoBeanMapping()
          Return the DaoBean map key configured for this reference.
(package private)  java.lang.String getEntityId()
          Return the name of the column to uniquely identify the referenced entity.
(package private)  java.lang.String getRefId()
          Return the name of the reference column on the parent table.
(package private)  java.lang.String getTable()
          Return the referenced table name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ORMReferenceConfig

ORMReferenceConfig(java.lang.String table,
                   java.lang.String daoBean,
                   java.lang.String daoBeanMapping,
                   java.lang.String refId,
                   java.lang.String entityId)
Construct a new reference instance with the given configuration settings.

Parameters:
table - String containing referenced table name.
daoBean - Fully qualified class name of the DaoBean implementation that must encapsulate the referenced data.
daoBeanMapping - String containing the name of the map key that must be populated in the parent DaoBean instance.
refId - The name of the column containing reference identifier on the parent table.
entityId - The name of the column to identify the referenced entity.
Method Detail

getTable

java.lang.String getTable()
Return the referenced table name.

Returns:
String containing referenced table name.

getDaoBeanInstance

java.lang.Object getDaoBeanInstance()
                              throws java.lang.Exception
Return an instance of the DaoBean implementation configured for this reference.

Returns:
Object that is a DaoBean instance.
Throws:
java.lang.Exception - if the DaoBean instance cannot be returned.

getDaoBeanClass

java.lang.Class getDaoBeanClass()
                          throws java.lang.Exception
Return a Class instance of the DaoBean implementation configured for this reference.

Returns:
Class that is a DaoBean implementation.
Throws:
java.lang.Exception - if the DaoBean class cannot be returned.

getDaoBeanMapping

java.lang.String getDaoBeanMapping()
Return the DaoBean map key configured for this reference.

Returns:
String containing map key.

getRefId

java.lang.String getRefId()
Return the name of the reference column on the parent table.

Returns:
String containing reference column name.

getEntityId

java.lang.String getEntityId()
Return the name of the column to uniquely identify the referenced entity.

Returns:
String containing the name of identity column of the referenced entity.