jrun.ejb.ejbql
Class CmrField

java.lang.Object
  |
  +--jrun.ejb.ejbql.ExpressionBase
        |
        +--jrun.ejb.ejbql.CmrField
All Implemented Interfaces:
Element, Expression, Symbol
Direct Known Subclasses:
Cmp20EjbCmrField

public abstract class CmrField
extends ExpressionBase
implements Symbol

The CmrField class represents the use of a container-managed relationship within an EJBQL query. E.g. in "o.lineItems", it represents the traversal of OrderBean to LineItem. In this case, the source persistent object is OrderBean and the sink persistent object is LineItem. Both source and sink must be CMP 2.0 Entity beans.

Author:
Enrique Duvos

Fields inherited from interface jrun.ejb.ejbql.Element
UNSPECIFIED_TRAVERSAL_ORDER
 
Constructor Summary
CmrField(java.lang.String name, EJBRelationshipRoleMetaData sourceRoleMetaData)
           
 
Method Summary
 void accept(Visitor visitor)
           
 boolean equals(java.lang.Object other)
           
 CMRFieldMetaData getCMRFieldMetaData()
           
 EJBRelationMetaData getEJBRelationMetaData()
           
 java.util.Iterator getFieldNames()
          Return the field names used to refer to this instances of this relationship.
 java.lang.String getName()
           
 EntityMetaData getSinkEntityMetaData()
           
 java.util.Iterator getSinkPrimaryKeyFieldNames()
          Return the field names used to refer to this instances of this relationship.
 EntityMetaData getSourceEntityMetaData()
           
 EJBRelationshipRoleMetaData getSourceRoleMetaData()
           
abstract  java.lang.String getTargetName()
          Symbol name of persistent entity for this CMR: (abstract schema name)
 boolean isCmrField()
           
 boolean isCollectionValued()
          True if the source can refer to many instances of the sink.
 boolean isSingleValued()
          True if the source can refer to only a single instance of the sink.
 boolean isUsedInJoin()
           
 void setUsedInJoin(boolean usedInJoin)
           
 java.lang.String toSql()
           
 java.lang.String toString()
           
 
Methods inherited from class jrun.ejb.ejbql.ExpressionBase
getChildren, isCmpField, isIdentificationVar, isInputParam, isNavigationExpression, isOperatorExpression
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jrun.ejb.ejbql.Symbol
getTableName
 
Methods inherited from interface jrun.ejb.ejbql.Expression
getJavaType, isCmpField, isIdentificationVar, isInputParam, isNavigationExpression, isOperatorExpression
 
Methods inherited from interface jrun.ejb.ejbql.Element
getChildren
 

Constructor Detail

CmrField

public CmrField(java.lang.String name,
                EJBRelationshipRoleMetaData sourceRoleMetaData)
Method Detail

getEJBRelationMetaData

public EJBRelationMetaData getEJBRelationMetaData()

getSourceRoleMetaData

public EJBRelationshipRoleMetaData getSourceRoleMetaData()

getSourceEntityMetaData

public EntityMetaData getSourceEntityMetaData()

getSinkEntityMetaData

public EntityMetaData getSinkEntityMetaData()

getCMRFieldMetaData

public CMRFieldMetaData getCMRFieldMetaData()

isUsedInJoin

public boolean isUsedInJoin()

setUsedInJoin

public void setUsedInJoin(boolean usedInJoin)

getSinkPrimaryKeyFieldNames

public java.util.Iterator getSinkPrimaryKeyFieldNames()
Return the field names used to refer to this instances of this relationship.

getFieldNames

public java.util.Iterator getFieldNames()
Return the field names used to refer to this instances of this relationship.

getName

public java.lang.String getName()
Specified by:
getName in interface Symbol

toString

public java.lang.String toString()
Specified by:
toString in interface Symbol
Overrides:
toString in class java.lang.Object

toSql

public java.lang.String toSql()
Specified by:
toSql in interface Symbol

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Element

isCmrField

public boolean isCmrField()
Specified by:
isCmrField in interface Expression
Overrides:
isCmrField in class ExpressionBase

isSingleValued

public boolean isSingleValued()
True if the source can refer to only a single instance of the sink.

isCollectionValued

public boolean isCollectionValued()
True if the source can refer to many instances of the sink.

getTargetName

public abstract java.lang.String getTargetName()
Symbol name of persistent entity for this CMR: (abstract schema name)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object


Copyright � 2002 Macromedia Corporation. All Rights Reserved.