1 28 29 package com.caucho.ejb.gen; 30 31 import com.caucho.ejb.cfg.EjbEntityBean; 32 import com.caucho.java.JavaWriter; 33 import com.caucho.java.gen.CallChain; 34 import com.caucho.util.L10N; 35 36 import java.io.IOException ; 37 38 41 public class EntityRemoveCall extends CallChain { 42 private static L10N L = new L10N(EntityRemoveCall.class); 43 44 private EjbEntityBean _bean; 45 46 private String _contextClassName; 47 48 private boolean _isCMP; 49 50 public EntityRemoveCall(EjbEntityBean bean, 51 String contextClassName) 52 { 53 _bean = bean; 54 55 _contextClassName = contextClassName; 56 } 57 58 public void setCMP(boolean isCMP) 59 { 60 _isCMP = isCMP; 61 } 62 63 68 public void generateCall(JavaWriter out, String retVar, 69 String var, String []args) 70 throws IOException 71 { 72 out.println("Bean ptr = _context._ejb_begin(trans, false, true);"); 73 74 out.println("ptr.ejbRemove();"); 75 76 out.println("ptr._ejb_state = QEntity._CAUCHO_IS_REMOVED;"); 77 } 78 } 79 | Popular Tags |