xdoclet.modules.ejb.dd

Class RelationTagsHandler

public class RelationTagsHandler extends EjbTagsHandler

Version: $Revision: 1.12 $

Author: Aslak Hellesxy Ara Abrahamian (ara_e@email.com)

UNKNOWN: Oct 15, 2001 namespace = "EjbRel"

Nested Class Summary
classRelationTagsHandler.RelationHolder
Holds class/method of the two end points of a relationship.
Field Summary
protected static RelationTagsHandler.RelationHoldercurrentRelation
The current relation, set by forAllRelationships and used by forAllRelationshipRoles.
protected static MaprelationMap
A map containing all relations.
Method Summary
voidforAllRelationships(String template)
Evaluates the body block for each relationship.
protected booleanhasRelationships()
voidifHasLeftRoleName(String template)
Describe what the method does
voidifHasRelationships(String template)
Evaluates the body if at least one of the classes has an ejb:relation tag, otherwise not.
voidifHasRightRoleName(String template)
Describe what the method does
voidifIsBidirectional(String template)
Describe what the method does
voidifIsLeftMany(String template)
Describe what the method does
voidifIsMany2Many(String template)
Evaluates the body block if the current relationship is a many to many type, meaning, both sides of the relation returns java.util.Collection or java.util.Set.
voidifIsNotACollection(String template)
Evaluates the body block if current method's return type is not a java.util.Collection or java.util.Set.
voidifIsOne2Many(String template)
Evaluates the body block if the current relationship is a one to many type, meaning, ONLY ONE side of the relation returns java.util.Collection or java.util.Set.
voidifIsOne2One(String template)
Evaluates the body block if the current relationship is a one to one type, meaning, neither side of the relation returns java.util.Collection or java.util.Set.
voidifIsRightMany(String template)
Describe what the method does
voidifIsUnidirectional(String template)
Describe what the method does
voidifLeftCascadeDelete(String template)
Evaluates the body if the left side of this relation has cascade-delete=yes
voidifLeftNavigable(String template)
Describe what the method does
voidifNotHasRelationships(String template)
Evaluates the body if none of the classes has an ejb:relation tag, otherwise not.
voidifNotIsMany2Many(String template)
Evaluates the body block if the current relationship IS NOT a many to many type, meaning, at least one side of the relation does not return java.util.Collection or java.util.Set.
voidifNotIsOne2Many(String template)
Evaluates the body block if the current relationship IS NOT a one to many type, meaning, either both sides, or neither side of the relation returns java.util.Collection or java.util.Set.
voidifNotIsOne2One(String template)
Evaluates the body block if the current relationship IS NOT a one to one type, meaning, at least one side of the relation returns java.util.Collection or java.util.Set.
voidifRightCascadeDelete(String template)
Evaluates the body if the right side of this relation has cascade-delete=yes, or the left side has target-relation cascade-delete="yes"
voidifRightNavigable(String template)
Describe what the method does
protected booleanisSetOrCollection(String type)
Returns true if current method's return type is a java.util.Collection or java.util.Set, false otherwise.
StringleftEJBName()
Returns the EJB Name of the left side of this relationship
StringleftFieldName()
Describe what the method does
StringleftFieldType()
Describe what the method does
StringleftMultiplicity()
Describe what the method does
StringleftRoleName()
Describe what the method does
StringrelationComment()
Describe what the method does
StringrelationName()
StringrightEJBName()
Returns the EJB Name of the right side of this relationship
StringrightFieldName()
Describe what the method does
StringrightFieldType()
Describe what the method does
StringrightMultiplicity()
Describe what the method does
StringrightRoleName()
Describe what the method does

Field Detail

currentRelation

protected static RelationTagsHandler.RelationHolder currentRelation
The current relation, set by forAllRelationships and used by forAllRelationshipRoles. It somehow is like the current index for the forAllRelationships loop.

See Also: RelationTagsHandler

relationMap

protected static Map relationMap
A map containing all relations.

Method Detail

forAllRelationships

public void forAllRelationships(String template)
Evaluates the body block for each relationship. Relations are denoted by ejb:relation for the getter method of the cmr-field.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: CmpTagsHandler PersistentTagsHandler MethodTagsHandler RelationTagsHandler

UNKNOWN: type = "block"

hasRelationships

protected boolean hasRelationships()

ifHasLeftRoleName

public void ifHasLeftRoleName(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifHasRelationships

public void ifHasRelationships(String template)
Evaluates the body if at least one of the classes has an ejb:relation tag, otherwise not.

Parameters: template The body of the block tag

Throws: XDocletException

ifHasRightRoleName

public void ifHasRightRoleName(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifIsBidirectional

public void ifIsBidirectional(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifIsLeftMany

public void ifIsLeftMany(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifIsMany2Many

public void ifIsMany2Many(String template)
Evaluates the body block if the current relationship is a many to many type, meaning, both sides of the relation returns java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifIsNotACollection

public void ifIsNotACollection(String template)
Evaluates the body block if current method's return type is not a java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifIsOne2Many

public void ifIsOne2Many(String template)
Evaluates the body block if the current relationship is a one to many type, meaning, ONLY ONE side of the relation returns java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifIsOne2One

public void ifIsOne2One(String template)
Evaluates the body block if the current relationship is a one to one type, meaning, neither side of the relation returns java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifIsRightMany

public void ifIsRightMany(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifIsUnidirectional

public void ifIsUnidirectional(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifLeftCascadeDelete

public void ifLeftCascadeDelete(String template)
Evaluates the body if the left side of this relation has cascade-delete=yes

Parameters: template The body of the block tag

Throws: XDocletException

ifLeftNavigable

public void ifLeftNavigable(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

ifNotHasRelationships

public void ifNotHasRelationships(String template)
Evaluates the body if none of the classes has an ejb:relation tag, otherwise not.

Parameters: template The body of the block tag

Throws: XDocletException

ifNotIsMany2Many

public void ifNotIsMany2Many(String template)
Evaluates the body block if the current relationship IS NOT a many to many type, meaning, at least one side of the relation does not return java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifNotIsOne2Many

public void ifNotIsOne2Many(String template)
Evaluates the body block if the current relationship IS NOT a one to many type, meaning, either both sides, or neither side of the relation returns java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifNotIsOne2One

public void ifNotIsOne2One(String template)
Evaluates the body block if the current relationship IS NOT a one to one type, meaning, at least one side of the relation returns java.util.Collection or java.util.Set. Used by forAllRelationships.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: RelationTagsHandler

UNKNOWN: type = "block"

ifRightCascadeDelete

public void ifRightCascadeDelete(String template)
Evaluates the body if the right side of this relation has cascade-delete=yes, or the left side has target-relation cascade-delete="yes"

Parameters: template The body of the block tag

Throws: XDocletException

ifRightNavigable

public void ifRightNavigable(String template)
Describe what the method does

Parameters: template Describe what the parameter does

Throws: XDocletException

isSetOrCollection

protected boolean isSetOrCollection(String type)
Returns true if current method's return type is a java.util.Collection or java.util.Set, false otherwise.

Parameters: type Description of Parameter

Returns: true if Collection or Set

leftEJBName

public String leftEJBName()
Returns the EJB Name of the left side of this relationship

Returns: Left side's EJB name

Throws: XDocletException

leftFieldName

public String leftFieldName()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

leftFieldType

public String leftFieldType()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

leftMultiplicity

public String leftMultiplicity()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

leftRoleName

public String leftRoleName()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

relationComment

public String relationComment()
Describe what the method does

Returns: Describe the return value

relationName

public String relationName()

Returns: the name of the current relation

Throws: XDocletException

rightEJBName

public String rightEJBName()
Returns the EJB Name of the right side of this relationship

Returns: Right side's EJB name

Throws: XDocletException

rightFieldName

public String rightFieldName()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

rightFieldType

public String rightFieldType()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

rightMultiplicity

public String rightMultiplicity()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException

rightRoleName

public String rightRoleName()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException