org.jboss.ejb.plugins.cmp.jdbc.metadata
Class JDBCRelationshipRoleMetaData

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData

public final class JDBCRelationshipRoleMetaData
extends java.lang.Object

Imutable class which represents one ejb-relationship-role element found in the ejb-jar.xml file's ejb-relation elements.


Constructor Summary
JDBCRelationshipRoleMetaData(JDBCRelationMetaData (src)  relationMetaData, JDBCApplicationMetaData (src)  application, org.w3c.dom.Element element, JDBCRelationshipRoleMetaData (src)  defaultValues)
           
JDBCRelationshipRoleMetaData(JDBCRelationMetaData (src)  relationMetaData, JDBCApplicationMetaData (src)  application, RelationshipRoleMetaData (src)  role)
           
 
Method Summary
 java.lang.String getCMRFieldName()
          Gets the name of the entity's cmr field for this role.
 JDBCEntityMetaData (src) getEntity()
          Gets the name of the entity that has this role.
 java.util.Collection getKeyFields()
          Gets the key fields of this role.
 JDBCReadAheadMetaData (src) getReadAhead()
          Gets the read ahead meta data
 JDBCRelationshipRoleMetaData (src) getRelatedRole()
          Gets the related role's jdbc meta data.
 JDBCRelationMetaData (src) getRelationMetaData()
          Gets the relation to which this role belongs.
 java.lang.String getRelationshipRoleName()
          Gets the name of this role.
 boolean hasForeignKeyConstraint()
          Should this role use a foreign key constraint.
 void init(JDBCRelationshipRoleMetaData (src)  relatedRole)
           
 void init(JDBCRelationshipRoleMetaData (src)  relatedRole, org.w3c.dom.Element element)
           
 boolean isBatchCascadeDelete()
           
 boolean isCascadeDelete()
          Should this entity be deleted when related entity is deleted.
 boolean isIndexed()
           
 boolean isMultiplicityMany()
          Checks if the multiplicity is many.
 boolean isMultiplicityOne()
          Checks if the multiplicity is one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCRelationshipRoleMetaData

public JDBCRelationshipRoleMetaData(JDBCRelationMetaData (src)  relationMetaData,
                                    JDBCApplicationMetaData (src)  application,
                                    RelationshipRoleMetaData (src)  role)
                             throws DeploymentException (src) 

JDBCRelationshipRoleMetaData

public JDBCRelationshipRoleMetaData(JDBCRelationMetaData (src)  relationMetaData,
                                    JDBCApplicationMetaData (src)  application,
                                    org.w3c.dom.Element element,
                                    JDBCRelationshipRoleMetaData (src)  defaultValues)
                             throws DeploymentException (src) 
Method Detail

init

public void init(JDBCRelationshipRoleMetaData (src)  relatedRole)
          throws DeploymentException (src) 
Throws:
DeploymentException (src)

init

public void init(JDBCRelationshipRoleMetaData (src)  relatedRole,
                 org.w3c.dom.Element element)
          throws DeploymentException (src) 
Throws:
DeploymentException (src)

getRelationMetaData

public JDBCRelationMetaData (src)  getRelationMetaData()
Gets the relation to which this role belongs.


getRelationshipRoleName

public java.lang.String getRelationshipRoleName()
Gets the name of this role.


hasForeignKeyConstraint

public boolean hasForeignKeyConstraint()
Should this role use a foreign key constraint.

Returns:
true if the store mananager will execute an ALTER TABLE ADD CONSTRAINT statement to add a foreign key constraint.

isMultiplicityOne

public boolean isMultiplicityOne()
Checks if the multiplicity is one.


isMultiplicityMany

public boolean isMultiplicityMany()
Checks if the multiplicity is many.


isCascadeDelete

public boolean isCascadeDelete()
Should this entity be deleted when related entity is deleted.


isBatchCascadeDelete

public boolean isBatchCascadeDelete()

getEntity

public JDBCEntityMetaData (src)  getEntity()
Gets the name of the entity that has this role.


getCMRFieldName

public java.lang.String getCMRFieldName()
Gets the name of the entity's cmr field for this role.


getRelatedRole

public JDBCRelationshipRoleMetaData (src)  getRelatedRole()
Gets the related role's jdbc meta data.


getReadAhead

public JDBCReadAheadMetaData (src)  getReadAhead()
Gets the read ahead meta data


getKeyFields

public java.util.Collection getKeyFields()
Gets the key fields of this role.

Returns:
an unmodifiable collection of JDBCCMPFieldMetaData objects

isIndexed

public boolean isIndexed()