com.ibm.wala.j2ee
Class BeanMetaDataImpl

java.lang.Object
  extended by com.ibm.wala.j2ee.BeanMetaDataImpl
All Implemented Interfaces:
BeanMetaData

public class BeanMetaDataImpl
extends java.lang.Object
implements BeanMetaData

Simple implementation of the BeanMetaData interface. TODO: rework this class to have a hierarchy to distinguish between entities and other beans.


Method Summary
 org.eclipse.jst.j2ee.ejb.EnterpriseBean getBean()
           
 java.util.Collection<FieldReference> getCMPFields()
          Return a Set of FieldReferences, one corresponding to each CMP field in this bean.
 java.util.Set<java.lang.Object> getCMRFields()
          Return a Set of the bean's container managed relationship fields, as FieldReference objects.
 java.util.Map<MethodReference,FieldReference> getCMRGetters()
          Return the Set of container created getter methods for CMRs, as a mapping from MethodReference->FieldReference.
 java.util.Map<MethodReference,FieldReference> getCMRSetters()
          Return the Set of container created setter methods for CMRs, as a mapping from MethodReference->FieldReference.
 TypeReference getEJBClass()
          Return the type of the EJB class for this entity bean
 org.eclipse.jst.j2ee.ejb.EJBJar getEJBJar()
           
 FieldReference getField(org.eclipse.jst.j2ee.ejb.CMRField field)
          Method getField.
 java.util.Set<MethodReference> getFinders()
          Return the Set of container created finder methods, as Method reference objects.
 java.util.Map<java.lang.Object,FieldReference> getGetterMethods()
          Return the Set of container created getter methods, as MethodReference objects.
 TypeReference getHomeInterface()
           
 TypeReference getLocalHomeInterface()
           
 TypeReference getLocalInterface()
           
 TypeReference getPrimaryKeyType()
           
 TypeReference getRemoteInterface()
           
 java.util.Map<java.lang.Object,FieldReference> getSetterMethods()
          Return the Set of container created setter methods, as Method reference objects.
 int hashCode()
           
 boolean isBeanManaged()
          Return true if the bean uses BMP
 boolean isContainerManaged()
          Return true if the bean is container managed.
 boolean isContainerManagedEntity()
          Return true if the bean is a container managed entity.
 boolean isMessageDrivenBean()
          Return true if the bean is a message-driven
 boolean isSessionBean()
          Return true if the bean is a session bean.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCMPFields

public java.util.Collection<FieldReference> getCMPFields()
Return a Set of FieldReferences, one corresponding to each CMP field in this bean.

Specified by:
getCMPFields in interface BeanMetaData
Returns:
Set of IFields

getCMRFields

public java.util.Set<java.lang.Object> getCMRFields()
Return a Set of the bean's container managed relationship fields, as FieldReference objects.

Specified by:
getCMRFields in interface BeanMetaData
Returns:
the bean's CMRs.

getGetterMethods

public java.util.Map<java.lang.Object,FieldReference> getGetterMethods()
Return the Set of container created getter methods, as MethodReference objects. The container is responsible for creating a getter method for each container managed field and relationship.

Specified by:
getGetterMethods in interface BeanMetaData
Returns:
Set of container created getter methods.
See Also:
BeanMetaData.getGetterMethods()

getCMRGetters

public java.util.Map<MethodReference,FieldReference> getCMRGetters()
Return the Set of container created getter methods for CMRs, as a mapping from MethodReference->FieldReference. The container is responsible for creating a getter method for each container managed relationship.

Specified by:
getCMRGetters in interface BeanMetaData

getSetterMethods

public java.util.Map<java.lang.Object,FieldReference> getSetterMethods()
Return the Set of container created setter methods, as Method reference objects. The container is responsible for creating a setter method for each container managed field or relationship.

Specified by:
getSetterMethods in interface BeanMetaData
Returns:
Set of container created setter methods.
See Also:
BeanMetaData.getSetterMethods()

getCMRSetters

public java.util.Map<MethodReference,FieldReference> getCMRSetters()
Return the Set of container created setter methods for CMRs, as a mapping from MethodReference->FieldReference. The container is responsible for creating a setter method for each container managed relationship.

Specified by:
getCMRSetters in interface BeanMetaData

getFinders

public java.util.Set<MethodReference> getFinders()
Return the Set of container created finder methods, as Method reference objects.

Specified by:
getFinders in interface BeanMetaData
Returns:
Set of container created setter methods.

getEJBClass

public TypeReference getEJBClass()
Description copied from interface: BeanMetaData
Return the type of the EJB class for this entity bean

Specified by:
getEJBClass in interface BeanMetaData
Returns:
TypeReference
See Also:
BeanMetaData.getEJBClass()

isContainerManaged

public boolean isContainerManaged()
Description copied from interface: BeanMetaData
Return true if the bean is container managed.

Specified by:
isContainerManaged in interface BeanMetaData
Returns:
true if bean is container manged.

isContainerManagedEntity

public boolean isContainerManagedEntity()
Description copied from interface: BeanMetaData
Return true if the bean is a container managed entity.

Specified by:
isContainerManagedEntity in interface BeanMetaData
Returns:
true if bean is a container manged entity.

isSessionBean

public boolean isSessionBean()
Description copied from interface: BeanMetaData
Return true if the bean is a session bean.

Specified by:
isSessionBean in interface BeanMetaData
Returns:
true if bean is a session bean.

isMessageDrivenBean

public boolean isMessageDrivenBean()
Description copied from interface: BeanMetaData
Return true if the bean is a message-driven

Specified by:
isMessageDrivenBean in interface BeanMetaData
Returns:
true if bean is a message-driven

getField

public FieldReference getField(org.eclipse.jst.j2ee.ejb.CMRField field)
Description copied from interface: BeanMetaData
Method getField.

Specified by:
getField in interface BeanMetaData
Returns:
FieldReference
See Also:
BeanMetaData.getField(CMRField)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getBean

public org.eclipse.jst.j2ee.ejb.EnterpriseBean getBean()
Specified by:
getBean in interface BeanMetaData
Returns:
wccm model of this bean

getHomeInterface

public TypeReference getHomeInterface()
Specified by:
getHomeInterface in interface BeanMetaData
Returns:
TypeReference representing this entity's home interface

getLocalHomeInterface

public TypeReference getLocalHomeInterface()
Specified by:
getLocalHomeInterface in interface BeanMetaData
Returns:
TypeReference representing this entity's local home interface

getRemoteInterface

public TypeReference getRemoteInterface()
Specified by:
getRemoteInterface in interface BeanMetaData
Returns:
TypeReference representing this entity's remote interface

getLocalInterface

public TypeReference getLocalInterface()
Specified by:
getLocalInterface in interface BeanMetaData
Returns:
TypeReference representing this entity's local interface

getPrimaryKeyType

public TypeReference getPrimaryKeyType()
Specified by:
getPrimaryKeyType in interface BeanMetaData
Returns:
TypeReference representing this entity's primary key type.

isBeanManaged

public boolean isBeanManaged()
Description copied from interface: BeanMetaData
Return true if the bean uses BMP

Specified by:
isBeanManaged in interface BeanMetaData
Returns:
true if bean uses BMP

getEJBJar

public org.eclipse.jst.j2ee.ejb.EJBJar getEJBJar()
Specified by:
getEJBJar in interface BeanMetaData
Returns:
WCCM representation of this bean's container

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object