1 29 30 package com.caucho.amber.gen; 31 32 import com.caucho.amber.type.EntityType; 33 import com.caucho.java.AbstractGenerator; 34 import com.caucho.loader.Environment; 35 import com.caucho.util.L10N; 36 import com.caucho.vfs.PersistentDependency; 37 38 import java.io.IOException ; 39 import java.util.ArrayList ; 40 41 44 public class EntityGenerator extends AbstractGenerator { 45 static final L10N L = new L10N(EntityGenerator.class); 46 47 private String _baseClassName; 48 private String _extClassName; 49 private EntityType _entityType; 50 51 private ArrayList <PersistentDependency> _dependencies = 52 new ArrayList <PersistentDependency>(); 53 54 57 public void setEntityType(EntityType entityType) 58 { 59 _entityType = entityType; 60 61 _dependencies.addAll(entityType.getDependencies()); 62 63 for (int i = 0; i < _dependencies.size(); i++) 64 Environment.addDependency(_dependencies.get(i)); 65 } 66 67 70 public void setBaseClassName(String baseClassName) 71 { 72 _baseClassName = baseClassName; 73 } 74 75 78 public String getBaseClassName() 79 { 80 return _baseClassName; 81 } 82 83 86 public void setExtClassName(String extClassName) 87 { 88 _extClassName = extClassName; 89 90 setFullClassName(_extClassName); 91 } 92 93 96 public String getBeanClassName() 97 { 98 return _baseClassName; 100 } 101 102 103 106 public void generateJava() 107 throws IOException 108 { 109 } 110 } 111 | Popular Tags |