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 Object

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

Version:
$Revision: 1.22 $
Author:
Dain Sundstrom, Alexey Loubyansky

Constructor Summary
JDBCRelationshipRoleMetaData(JDBCRelationMetaData relationMetaData, JDBCApplicationMetaData application, Element element, JDBCRelationshipRoleMetaData defaultValues)
           
JDBCRelationshipRoleMetaData(JDBCRelationMetaData relationMetaData, JDBCApplicationMetaData application, RelationshipRoleMetaData role)
           
 
Method Summary
 String getCMRFieldName()
          Gets the name of the entity's cmr field for this role.
 JDBCEntityMetaData getEntity()
          Gets the name of the entity that has this role.
 Collection getKeyFields()
          Gets the key fields of this role.
 JDBCReadAheadMetaData getReadAhead()
          Gets the read ahead meta data
 JDBCRelationshipRoleMetaData getRelatedRole()
          Gets the related role's jdbc meta data.
 JDBCRelationMetaData getRelationMetaData()
          Gets the relation to which this role belongs.
 String getRelationshipRoleName()
          Gets the name of this role.
 boolean hasForeignKeyConstraint()
          Should this role use a foreign key constraint.
 void init(JDBCRelationshipRoleMetaData relatedRole)
           
 void init(JDBCRelationshipRoleMetaData relatedRole, 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 relationMetaData,
                                    JDBCApplicationMetaData application,
                                    RelationshipRoleMetaData role)
                             throws org.jboss.deployment.DeploymentException

JDBCRelationshipRoleMetaData

public JDBCRelationshipRoleMetaData(JDBCRelationMetaData relationMetaData,
                                    JDBCApplicationMetaData application,
                                    Element element,
                                    JDBCRelationshipRoleMetaData defaultValues)
                             throws org.jboss.deployment.DeploymentException
Method Detail

init

public void init(JDBCRelationshipRoleMetaData relatedRole)
          throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

init

public void init(JDBCRelationshipRoleMetaData relatedRole,
                 Element element)
          throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

getRelationMetaData

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


getRelationshipRoleName

public 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 getEntity()
Gets the name of the entity that has this role.


getCMRFieldName

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


getRelatedRole

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


getReadAhead

public JDBCReadAheadMetaData getReadAhead()
Gets the read ahead meta data


getKeyFields

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

Returns:
an unmodifiable collection of JDBCCMPFieldMetaData objects

isIndexed

public boolean isIndexed()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.