vdoclet.ejb
Class EjbInfo

java.lang.Object
  |
  +--vdoclet.ejb.EjbInfo

public class EjbInfo
extends Object

Represents an EJB derived from Javadoc information


Constructor Summary
EjbInfo(ClassInfo srcClass)
          Construct a new EjbInfo.
 
Method Summary
 List getAllSrcMethods()
          Get methods from the srcClass and any inner "CMP" class
 String getBaseName()
          Get the base-name for derived classes.
 EjbBundle getBundle()
          Get the associated EjbBundle
 ClassInfo getCmp11Class()
          Get a representation of the generated cmp11Class.
 String getCmp11ClassName()
          Get the name of the bean cmp11Class.
 List getCmpFields()
          Derive a set of persistent fields based on the CMP_COLUMN tag.
 String getCmpSchemaName()
          Get the name of the abstract persistence schema
 List getCmrFields()
          Derive a set of relationship fields based on the CMR_TARGET tag.
 ClassInfo getEjbClass()
          Return a representation of the ejb-class.
 EjbLocalView getLocalView()
          Get the local client view
 String getName()
          Get the EJB-name of the EJB.
 ClassInfo getPrimaryKey()
          Get a representation of the primary-key class.
 List getPrimaryKeyFields()
          Derive a list of primary-key fields.
 Collection getQueryMethods()
          Get a representation of the view-home interface.
 EjbRemoteView getRemoteView()
          Get the remote client view
 ClassInfo getSrcClass()
          Get ClassInfo for the bean implementation class.
 ClassInfo getSrcCmpInnerClass()
           
 EjbInfo getSuperEjb()
           
 List getTags(String name)
          Return all the values of the named tag from the srcClass.
 String getTagValue(String name)
          Return the named tag from the srcClass.
 String getTagValue(String name, String defaultValue)
          Return the named tag from the srcClass.
 String getType()
           
 boolean isAbstract()
          True if the srcClass was tagged with "@ejb-abstract".
 boolean isCmpEntity()
          True if this represents a container-managed entity.
 boolean isEjb()
          True if the srcClass represents an EJB.
 boolean isEntity()
          True if the srcClass was tagged with "@ejb-entity".
 boolean isMessageDriven()
          True if the srcClass was tagged with "@ejb-mdb".
 boolean isPrimaryKeyRequired()
          Check whether we need to generate the primary-key
 boolean isSession()
          True if the srcClass was tagged with "@ejb-session".
 void setBundle(EjbBundle bundle)
          Associate this EjbInfo with an EjbBundle
static String shortName(String fullName)
          Get the last part of the argument, removing any package prefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EjbInfo

public EjbInfo(ClassInfo srcClass)
Construct a new EjbInfo.

Parameters:
srcClass - the bean implementation class
Method Detail

setBundle

public void setBundle(EjbBundle bundle)
Associate this EjbInfo with an EjbBundle


getBundle

public EjbBundle getBundle()
Get the associated EjbBundle


getSrcClass

public ClassInfo getSrcClass()
Get ClassInfo for the bean implementation class.


getSrcCmpInnerClass

public ClassInfo getSrcCmpInnerClass()
Returns:
the inner-class called "CMP", or null if there isn't one

getAllSrcMethods

public List getAllSrcMethods()
Get methods from the srcClass and any inner "CMP" class


getSuperEjb

public EjbInfo getSuperEjb()
Returns:
EjbInfo for the EJB that this one extends, or null if there isn't one

getTagValue

public String getTagValue(String name,
                          String defaultValue)
Return the named tag from the srcClass. Return the specified defaultValue if the tag is not present.


getTagValue

public String getTagValue(String name)
Return the named tag from the srcClass. Return null if the tag is not present.


getTags

public List getTags(String name)
Return all the values of the named tag from the srcClass.


isEjb

public boolean isEjb()
True if the srcClass represents an EJB.


isEntity

public boolean isEntity()
True if the srcClass was tagged with "@ejb-entity".


isSession

public boolean isSession()
True if the srcClass was tagged with "@ejb-session".


isMessageDriven

public boolean isMessageDriven()
True if the srcClass was tagged with "@ejb-mdb".


isCmpEntity

public boolean isCmpEntity()
True if this represents a container-managed entity.


isAbstract

public boolean isAbstract()
True if the srcClass was tagged with "@ejb-abstract".


getType

public String getType()
Returns:
the type of this bean as a string, eg, "entity".

getBaseName

public String getBaseName()
Get the base-name for derived classes. The default is the name of the srcClass, minus any "Bean" suffix. This can be overridden with an "@ejb-base-name" tag.


getName

public String getName()
Get the EJB-name of the EJB. The default is the value of getBaseName(), minus any package prefix. This can be overridden with an "@ejb-name" tag.


isPrimaryKeyRequired

public boolean isPrimaryKeyRequired()
Check whether we need to generate the primary-key


getPrimaryKeyFields

public List getPrimaryKeyFields()
Derive a list of primary-key fields.


getPrimaryKey

public ClassInfo getPrimaryKey()
Get a representation of the primary-key class.


getQueryMethods

public Collection getQueryMethods()
Get a representation of the view-home interface.


getRemoteView

public EjbRemoteView getRemoteView()
Get the remote client view


getLocalView

public EjbLocalView getLocalView()
Get the local client view


getCmp11ClassName

public String getCmp11ClassName()
Get the name of the bean cmp11Class.

The default is getBaseName() plus a "Cmp11" suffix. This can be overridden with an "@ejb-cmp11-class" tag.


getCmp11Class

public ClassInfo getCmp11Class()
Get a representation of the generated cmp11Class.


getCmpFields

public List getCmpFields()
Derive a set of persistent fields based on the CMP_COLUMN tag.


getCmrFields

public List getCmrFields()
Derive a set of relationship fields based on the CMR_TARGET tag.


getCmpSchemaName

public String getCmpSchemaName()
Get the name of the abstract persistence schema

The default is the last word of getName(). This can be overridden with an "@ejb-cmp-schema-name" tag.


getEjbClass

public ClassInfo getEjbClass()
Return a representation of the ejb-class. This will typically be the srcClass, but may in some cases be a generated sub-class.


shortName

public static String shortName(String fullName)
Get the last part of the argument, removing any package prefix

Parameters:
fullName - a fully-qualified name