| 1 package com.protomatter.j2ee.ejb; 2 3 52 53 import javax.ejb.*; 54 55 58 public abstract class ProtoEntityEJB 59 extends ProtoEJB 60 implements EntityBean 61 { 62 private EntityContext entityContext = null; 63 64 67 public ProtoEntityEJB() 68 { 69 super(); 70 } 71 72 77 public void setEntityContext(EntityContext context) 78 { 79 this.entityContext = context; 80 if (context != null) 81 initSyslogChannelList(); 82 } 83 84 87 public void unsetEntityContext() 88 { 89 setEntityContext(null); 90 } 91 92 95 protected EntityContext getEntityContext() 96 { 97 return this.entityContext; 98 } 99 100 104 protected Object getPrimaryKey() 105 { 106 EntityContext context = getEntityContext(); 107 return (context == null) ? null : context.getPrimaryKey(); 108 } 109 110 113 public void ejbActivate() 114 { 115 } 116 117 120 public void ejbPassivate() 121 { 122 } 123 } 124 | Popular Tags |