xdoclet.modules.ejb.dd
public class RelationTagsHandler extends EjbTagsHandler
Modifier and Type | Class and Description |
---|---|
class |
RelationTagsHandler.RelationHolder
Holds class/method of the two end points of a relationship.
|
Modifier and Type | Field and Description |
---|---|
protected static RelationTagsHandler.RelationHolder |
currentRelation
The current relation, set by forAllRelationships and used by forAllRelationshipRoles.
|
protected static java.util.Map |
relationMap
A map containing all relations.
|
ALL, LOCAL_SUFFIX, SERVICE_ENDPOINT, SERVICE_ENDPOINT_SUFFIX
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER
Constructor and Description |
---|
RelationTagsHandler() |
Modifier and Type | Method and Description |
---|---|
void |
forAllRelationships(java.lang.String template)
Evaluates the body block for each relationship.
|
protected boolean |
hasRelationships() |
void |
ifHasLeftRoleName(java.lang.String template)
Describe what the method does
|
void |
ifHasRelationships(java.lang.String template)
Evaluates the body if at least one of the classes has an ejb:relation tag, otherwise not.
|
void |
ifHasRightRoleName(java.lang.String template)
Describe what the method does
|
void |
ifIsBidirectional(java.lang.String template)
Describe what the method does
|
void |
ifIsLeftMany(java.lang.String template)
Describe what the method does
|
void |
ifIsMany2Many(java.lang.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.
|
void |
ifIsNotACollection(java.lang.String template)
Evaluates the body block if current method's return type is not a java.util.Collection or java.util.Set.
|
void |
ifIsOne2Many(java.lang.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.
|
void |
ifIsOne2One(java.lang.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.
|
void |
ifIsRightMany(java.lang.String template)
Describe what the method does
|
void |
ifIsUnidirectional(java.lang.String template)
Describe what the method does
|
void |
ifLeftCascadeDelete(java.lang.String template)
Evaluates the body if the left side of this relation has cascade-delete=yes
|
void |
ifLeftNavigable(java.lang.String template)
Describe what the method does
|
void |
ifNotHasRelationships(java.lang.String template)
Evaluates the body if none of the classes has an ejb:relation tag, otherwise not.
|
void |
ifNotIsMany2Many(java.lang.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.
|
void |
ifNotIsOne2Many(java.lang.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.
|
void |
ifNotIsOne2One(java.lang.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.
|
void |
ifRightCascadeDelete(java.lang.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"
|
void |
ifRightNavigable(java.lang.String template)
Describe what the method does
|
protected boolean |
isSetOrCollection(java.lang.String type)
Returns true if current method's return type is a java.util.Collection or java.util.Set, false otherwise.
|
java.lang.String |
leftEJBName()
Returns the EJB Name of the left side of this relationship
|
java.lang.String |
leftFieldName()
Describe what the method does
|
java.lang.String |
leftFieldType()
Describe what the method does
|
java.lang.String |
leftMultiplicity()
Describe what the method does
|
java.lang.String |
leftRoleName()
Describe what the method does
|
java.lang.String |
relationComment()
Describe what the method does
|
java.lang.String |
relationName() |
java.lang.String |
rightEJBName()
Returns the EJB Name of the right side of this relationship
|
java.lang.String |
rightFieldName()
Describe what the method does
|
java.lang.String |
rightFieldType()
Describe what the method does
|
java.lang.String |
rightMultiplicity()
Describe what the method does
|
java.lang.String |
rightRoleName()
Describe what the method does
|
beanType, choosePackage, concreteFullClassName, ejbExternalRefName, ejbName, ejbRefName, ejbRefName, extendsFromFor, forAllBeans, getDependentClassFor, getDependentClassTagName, getEjb, getEjbIdFor, getEjbNameFor, getEjbSpec, getShortEjbNameFor, hasTransaction, id, ifIsAConcreteEJBean, ifLocalEjb, ifNotLocalEjb, ifNotRemoteEjb, ifNotServiceEndpointEjb, ifRemoteEjb, ifServiceEndpointEjb, isAConcreteEJBean, isEjb, isLocalEjb, isOnlyLocalEjb, isOnlyRemoteEjb, isOnlyServiceEndpointEjb, isRemoteEjb, isServiceEndpointEjb, prefixWithEjbSlash, shortEjbName, shouldTraverseSuperclassForDependentClass, symbolicClassName
delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
getXJavaDoc, setXJavaDoc
protected static java.util.Map relationMap
protected static RelationTagsHandler.RelationHolder currentRelation
public void ifLeftCascadeDelete(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
public void ifRightCascadeDelete(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
public java.lang.String leftEJBName() throws XDocletException
XDocletException
public java.lang.String rightEJBName() throws XDocletException
XDocletException
public void ifHasRelationships(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
public void ifNotHasRelationships(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
public java.lang.String relationName() throws XDocletException
XDocletException
public void forAllRelationships(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
CmpTagsHandler.isEntityCmp(xjavadoc.XClass)
,
PersistentTagsHandler.isPersistentField(xjavadoc.XMethod)
,
MethodTagsHandler.isGetter(java.lang.String)
,
isSetOrCollection(java.lang.String)
public void ifIsLeftMany(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public void ifIsRightMany(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public java.lang.String leftFieldName() throws XDocletException
XDocletException
public java.lang.String rightFieldName() throws XDocletException
XDocletException
public java.lang.String leftFieldType() throws XDocletException
XDocletException
public java.lang.String rightFieldType() throws XDocletException
XDocletException
public void ifIsNotACollection(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public java.lang.String relationComment()
public void ifIsOne2One(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public void ifNotIsOne2One(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public void ifIsOne2Many(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public void ifNotIsOne2Many(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public void ifIsMany2Many(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public void ifNotIsMany2Many(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
forAllRelationships(java.lang.String)
public void ifIsBidirectional(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public void ifIsUnidirectional(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public void ifHasLeftRoleName(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public void ifHasRightRoleName(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public void ifLeftNavigable(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public void ifRightNavigable(java.lang.String template) throws XDocletException
template
- Describe what the parameter doesXDocletException
public java.lang.String leftRoleName() throws XDocletException
XDocletException
public java.lang.String rightRoleName() throws XDocletException
XDocletException
public java.lang.String leftMultiplicity() throws XDocletException
XDocletException
public java.lang.String rightMultiplicity() throws XDocletException
XDocletException
protected boolean isSetOrCollection(java.lang.String type)
type
- Description of Parameterprotected boolean hasRelationships()