1 29 30 package com.caucho.ejb.gen; 31 32 import com.caucho.bytecode.JClass; 33 import com.caucho.ejb.cfg.EjbEntityBean; 34 import com.caucho.util.L10N; 35 36 39 public class AmberAssembler extends EntityAssembler { 40 private static final L10N L = new L10N(AmberAssembler.class); 41 42 public AmberAssembler(EjbEntityBean bean, String fullClassName) 43 { 44 super(bean, fullClassName); 45 } 46 47 50 public void addHeaderComponent(JClass beanClass, 51 String contextClassName, 52 String implClassName) 53 { 54 _entityBean = new AmberBean(beanClass, 55 contextClassName, 56 implClassName); 57 58 _entityBean.setBean((EjbEntityBean) getBean()); 59 60 _genClass.addComponent(_entityBean); 61 } 62 63 66 public ViewClass createHomeView(JClass homeClass, 67 String fullClassName, 68 String viewPrefix) 69 { 70 EntityHomeView homeView = new EntityHomeView(homeClass, 71 fullClassName, 72 viewPrefix, 73 true); 74 75 _genClass.addComponent(homeView); 76 77 return homeView; 78 } 79 80 83 public ViewClass createView(JClass homeClass, 84 String fullClassName, 85 String viewPrefix) 86 { 87 AmberView view = new AmberView(homeClass, 88 fullClassName, 89 viewPrefix); 90 91 _genClass.addComponent(view); 92 93 return view; 94 } 95 } 96 | Popular Tags |