1 package org.lateralnz.panther.wrapper; 2 3 import javax.ejb.EJBHome ; 4 import javax.ejb.EJBMetaData ; 5 6 import org.lateralnz.panther.util.EJBConstants; 7 8 public class EJBMetaDataWrapper implements EJBMetaData , EJBConstants { 9 10 private EJBHome home; 11 private Class homeClass; 12 private Class remoteClass; 13 private int type; 14 15 public EJBMetaDataWrapper(EJBHome home, Class homeClass, Class remoteClass, int type) { 16 this.home = home; 17 this.homeClass = homeClass; 18 this.remoteClass = remoteClass; 19 this.type = type; 20 } 21 22 public EJBHome getEJBHome() { 23 return home; 24 } 25 26 public Class getHomeInterfaceClass() { 27 return homeClass; 28 } 29 30 public Class getPrimaryKeyClass() { 31 throw new UnsupportedOperationException ("session beans have no primary key"); 32 } 33 34 public Class getRemoteInterfaceClass() { 35 return remoteClass; 36 } 37 38 public boolean isSession() { 39 return type == STATEFUL_SESSION_BEAN; 40 } 41 42 public boolean isStatelessSession() { 43 return type == STATELESS_SESSION_BEAN; 44 } 45 } 46 | Popular Tags |