01: package org.mockejb;
02:
03: import java.lang.reflect.Modifier;
04:
05: /**
06: * Contains entity bean-specific data used for EJB deployment.
07: * Currently only has <code>isCMP</code> flag.
08: *
09: * @author Alexander Ananiev
10: */
11: public class EntityBeanDescriptor extends BasicEjbDescriptor {
12:
13: /**
14: * Creates a new instance of the descriptor.
15: * @param jndiName jndiName to bind Home to
16: * @param homeClass class of the home interface
17: * @param ifaceClass class of the business interface, remote or local
18: * @param beanClass class of the implementation class, can be the abstract class
19: * in case of CMP
20: */
21: public EntityBeanDescriptor(String jndiName, Class homeClass,
22: Class ifaceClass, Class beanClass) {
23:
24: super (jndiName, homeClass, ifaceClass, beanClass);
25: }
26:
27: /**
28: * Returns true if this descriptor is for CMP entity bean,
29: * i.e., abstract bean class was passed to the constructor
30: * @return true if CMP, false if BMP
31: */
32: public boolean isCMP() {
33: return Modifier.isAbstract(getBeanClass().getModifiers());
34:
35: }
36:
37: }
|