org.jboss.metadata.ejb.spec
Class RelationMetaData

java.lang.Object
  extended by org.jboss.metadata.javaee.support.IdMetaDataImpl
      extended by org.jboss.metadata.javaee.support.NamedMetaData
          extended by org.jboss.metadata.javaee.support.NamedMetaDataWithDescriptions
              extended by org.jboss.metadata.ejb.spec.RelationMetaData
All Implemented Interfaces:
Serializable, Cloneable, IdMetaData, MappableMetaData

public class RelationMetaData
extends NamedMetaDataWithDescriptions

RelationMetaData.

Version:
$Revision: 1.1 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
RelationMetaData()
          Create a new RelationMetaData.
 
Method Summary
 String getEjbRelationName()
          Get the ejbRelationName.
 List<RelationRoleMetaData> getEjbRelationshipRoles()
          TODO JBossXB figureout why this is required and why JBossXB wants to use the xml name as the property rather than the one I want to give it
 RelationRoleMetaData getLeftRole()
          Get the leftRole.
 RelationRoleMetaData getRelatedRole(RelationRoleMetaData role)
          Get the other role
 RelationRoleMetaData getRightRole()
          Get the rightRole.
 void setEjbRelationName(String ejbRelationName)
          Set the ejbRelationName.
 void setEjbRelationshipRoles(List<RelationRoleMetaData> roleMetaData)
          Set the relation role metadata
 void setLeftRole(RelationRoleMetaData leftRole)
          Set the leftRole.
 void setRightRole(RelationRoleMetaData rightRole)
          Set the rightRole.
 
Methods inherited from class org.jboss.metadata.javaee.support.NamedMetaDataWithDescriptions
getDescriptions, setDescriptions
 
Methods inherited from class org.jboss.metadata.javaee.support.NamedMetaData
equals, getKey, getName, hashCode, merge, setName, toString
 
Methods inherited from class org.jboss.metadata.javaee.support.IdMetaDataImpl
clone, getId, merge, merge, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.metadata.javaee.support.MappableMetaData
getKey
 

Constructor Detail

RelationMetaData

public RelationMetaData()
Create a new RelationMetaData.

Method Detail

getEjbRelationName

public String getEjbRelationName()
Get the ejbRelationName.

Returns:
the ejbRelationName.

setEjbRelationName

public void setEjbRelationName(String ejbRelationName)
Set the ejbRelationName.

Parameters:
ejbRelationName - the ejbRelationName.
Throws:
IllegalArgumentException - for a null ejbRelationName

getLeftRole

public RelationRoleMetaData getLeftRole()
Get the leftRole.

Returns:
the leftRole.

setLeftRole

public void setLeftRole(RelationRoleMetaData leftRole)
Set the leftRole.

Parameters:
leftRole - the leftRole.
Throws:
IllegalArgumentException - for a null leftRole

getRightRole

public RelationRoleMetaData getRightRole()
Get the rightRole.

Returns:
the rightRole.

setRightRole

public void setRightRole(RelationRoleMetaData rightRole)
Set the rightRole.

Parameters:
rightRole - the rightRole.
Throws:
IllegalArgumentException - for a null rightRole

getRelatedRole

public RelationRoleMetaData getRelatedRole(RelationRoleMetaData role)
Get the other role

Parameters:
role - the reference role
Returns:
the related role
Throws:
IllegalArgumentException - if the role is not a role in this relationship

getEjbRelationshipRoles

public List<RelationRoleMetaData> getEjbRelationshipRoles()
TODO JBossXB figureout why this is required and why JBossXB wants to use the xml name as the property rather than the one I want to give it

Returns:
null always

setEjbRelationshipRoles

public void setEjbRelationshipRoles(List<RelationRoleMetaData> roleMetaData)
Set the relation role metadata

On first invocation it sets the left role, on second invocation it sets the right role, after that it throws an IllegalStateException

Parameters:
roleMetaData -
Throws:
IllegalArgumentException - for a null role metadata
IllegalStateException - for too many roles


Copyright © 2009 JBoss Inc.. All Rights Reserved.