org.eclipse.jst.j2ee.common
Interface EjbRef

All Superinterfaces:
J2EEEObject
All Known Subinterfaces:
EJBLocalRef

public interface EjbRef
extends J2EEEObject

The ejb-ref element is used for the declaration of a reference to an enterprise bean's home. The declaration consists of an optional description; the EJB reference name used in the code of the referencing application client; the expected type of the referenced enterprise bean; the expected home and remote interfaces of the referenced enterprise bean; and an optional ejb-link information. The optional ejb-link element is used to specify the referenced enterprise bean.

Since:
1.0

Method Summary
 java.lang.String getDescription()
           
 EList getDescriptions()
          Returns the value of the 'Descriptions' containment reference list.
 java.lang.String getHome()
           
 java.lang.String getLink()
           
 EnterpriseBean getLinkedEjb(EJBJar ejbJar)
          Return an enterprise bean referenced by the EjbRef, if one exists, within the scope of the parameter.
 java.lang.String getName()
           
 java.lang.String getRemote()
           
 EjbRefType getType()
           
 boolean isEquivalent(EjbRef anEjbRef)
          Return true if the name, home, remote, and link are equivalent.
 boolean isLinked(EnterpriseBean anEJB)
          Return true if this reference is physically linked to
 boolean isLocal()
          Return true if the ejbref is for a local ejb interface.
 boolean isSetType()
          Returns whether the value of the 'Type' attribute is set
 void setDescription(java.lang.String value)
           
 void setHome(java.lang.String value)
           
 void setLink(java.lang.String value)
           
 void setName(java.lang.String value)
           
 void setRemote(java.lang.String value)
           
 void setType(EjbRefType value)
          Sets the value of the 'Type' attribute
 void unsetType()
          Unsets the value of the 'Type' attribute
 

Method Detail

getLinkedEjb

public EnterpriseBean getLinkedEjb(EJBJar ejbJar)
Return an enterprise bean referenced by the EjbRef, if one exists, within the scope of the parameter. The ejb-link value of the ref must equate to a named enterprise bean contained in the jar; otherwise return null


isEquivalent

public boolean isEquivalent(EjbRef anEjbRef)
Return true if the name, home, remote, and link are equivalent.


isLinked

public boolean isLinked(EnterpriseBean anEJB)
Return true if this reference is physically linked to


isLocal

public boolean isLocal()
Return true if the ejbref is for a local ejb interface.


getName

public java.lang.String getName()
Returns:
The value of the Name attribute The ejb-ref-name element contains the name of an EJB reference. This is the JNDI name that the servlet code uses to get a reference to the enterprise bean. Example: ejb//Payroll

setName

public void setName(java.lang.String value)
Parameters:
value - The new value of the Name attribute

getType

public EjbRefType getType()
Returns:
The value of the Type attribute The ejb-ref-type element contains the expected type of the referenced enterprise bean. The ejb-ref-type element must be one of the following: Entity Session

setType

public void setType(EjbRefType value)
Sets the value of the 'Type' attribute.

Parameters:
value - the new value of the 'Type' attribute.
See Also:
EjbRefType, isSetType(), unsetType(), getType()

unsetType

public void unsetType()
Unsets the value of the 'Type' attribute.

See Also:
isSetType(), getType(), setType(EjbRefType)

isSetType

public boolean isSetType()
Returns whether the value of the 'Type' attribute is set.

Returns:
whether the value of the 'Type' attribute is set.
See Also:
unsetType(), getType(), setType(EjbRefType)

getHome

public java.lang.String getHome()
Returns:
The value of the Home attribute The home element contains the fully-qualified name of the enterprise bean's home interface. Example: com.aardvark.payroll.PayrollHome

setHome

public void setHome(java.lang.String value)
Parameters:
value - The new value of the Home attribute

getRemote

public java.lang.String getRemote()
Returns:
The value of the Remote attribute The remote element contains the fully-qualified name of the enterprise bean's remote interface.

setRemote

public void setRemote(java.lang.String value)
Parameters:
value - The new value of the Remote attribute

getLink

public java.lang.String getLink()
Returns:
The value of the Link attribute The ejb-link element is used in the ejb-ref element to specify that an EJB reference is linked to an enterprise bean in the encompassing J2EE Application package. The value of the ejb-link element must be the ejb-name of an enterprise bean in the same J2EE Application package. Example: EmployeeRecord

setLink

public void setLink(java.lang.String value)
Parameters:
value - The new value of the Link attribute

getDescription

public java.lang.String getDescription()
Returns:
The value of the Description attribute The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element.

setDescription

public void setDescription(java.lang.String value)
Parameters:
value - The new value of the Description attribute

getDescriptions

public EList getDescriptions()
Returns the value of the 'Descriptions' containment reference list. The list contents are of type Description.

If the meaning of the 'Descriptions' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Descriptions' containment reference list.
See Also:
CommonPackage.getEjbRef_Descriptions()