KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lateralnz > panther > wrapper > EJBMetaDataWrapper


1 package org.lateralnz.panther.wrapper;
2
3 import javax.ejb.EJBHome JavaDoc;
4 import javax.ejb.EJBMetaData JavaDoc;
5
6 import org.lateralnz.panther.util.EJBConstants;
7
8 public class EJBMetaDataWrapper implements EJBMetaData JavaDoc, EJBConstants {
9     
10   private EJBHome JavaDoc home;
11   private Class JavaDoc homeClass;
12   private Class JavaDoc remoteClass;
13   private int type;
14   
15   public EJBMetaDataWrapper(EJBHome JavaDoc home, Class JavaDoc homeClass, Class JavaDoc remoteClass, int type) {
16     this.home = home;
17     this.homeClass = homeClass;
18     this.remoteClass = remoteClass;
19     this.type = type;
20   }
21   
22   public EJBHome JavaDoc getEJBHome() {
23     return home;
24   }
25  
26   public Class JavaDoc getHomeInterfaceClass() {
27     return homeClass;
28   }
29   
30   public Class JavaDoc getPrimaryKeyClass() {
31     throw new UnsupportedOperationException JavaDoc("session beans have no primary key");
32   }
33   
34   public Class JavaDoc 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