1 29 30 package com.caucho.amber.cfg; 31 32 import java.util.HashMap ; 33 34 37 public class AttributesConfig { 38 39 41 private HashMap <String , IdConfig> _idMap 43 = new HashMap <String , IdConfig>(); 44 45 private HashMap <String , BasicConfig> _basicMap 46 = new HashMap <String , BasicConfig>(); 47 48 private EmbeddedIdConfig _embeddedId; 49 50 private HashMap <String , VersionConfig> _versionMap 51 = new HashMap <String , VersionConfig>(); 52 53 private HashMap <String , ManyToOneConfig> _manyToOneMap 54 = new HashMap <String , ManyToOneConfig>(); 55 56 private HashMap <String , OneToManyConfig> _oneToManyMap 57 = new HashMap <String , OneToManyConfig>(); 58 59 private HashMap <String , OneToOneConfig> _oneToOneMap 60 = new HashMap <String , OneToOneConfig>(); 61 62 private HashMap <String , ManyToManyConfig> _manyToManyMap 63 = new HashMap <String , ManyToManyConfig>(); 64 65 private HashMap <String , EmbeddedConfig> _embeddedMap 66 = new HashMap <String , EmbeddedConfig>(); 67 68 private HashMap <String , TransientConfig> _transientMap 69 = new HashMap <String , TransientConfig>(); 70 71 72 75 public void addBasic(BasicConfig basic) 76 { 77 _basicMap.put(basic.getName(), basic); 78 } 79 80 83 public HashMap <String , BasicConfig> getBasicMap() 84 { 85 return _basicMap; 86 } 87 88 91 public BasicConfig getBasic(String name) 92 { 93 return _basicMap.get(name); 94 } 95 96 99 public void addId(IdConfig id) 100 { 101 _idMap.put(id.getName(), id); 102 } 103 104 107 public HashMap <String , IdConfig> getIdMap() 108 { 109 return _idMap; 110 } 111 112 115 public IdConfig getId(String name) 116 { 117 return _idMap.get(name); 118 } 119 120 123 public EmbeddedIdConfig getEmbeddedId() 124 { 125 return _embeddedId; 126 } 127 128 131 public void setEmbeddedId(EmbeddedIdConfig embeddedId) 132 { 133 _embeddedId = embeddedId; 134 } 135 136 public HashMap <String , VersionConfig> getVersionMap() 137 { 138 return _versionMap; 139 } 140 141 public void addVersion(VersionConfig version) 142 { 143 _versionMap.put(version.getName(), version); 144 } 145 146 public VersionConfig getVersion(String name) 147 { 148 return _versionMap.get(name); 149 } 150 151 public HashMap <String , ManyToOneConfig> getManyToOneMap() 152 { 153 return _manyToOneMap; 154 } 155 156 public void addManyToOne(ManyToOneConfig manyToOne) 157 { 158 _manyToOneMap.put(manyToOne.getName(), manyToOne); 159 } 160 161 public ManyToOneConfig getManyToOne(String name) 162 { 163 return _manyToOneMap.get(name); 164 } 165 166 public HashMap <String , OneToManyConfig> getOneToManyMap() 167 { 168 return _oneToManyMap; 169 } 170 171 public void addOneToMany(OneToManyConfig oneToMany) 172 { 173 _oneToManyMap.put(oneToMany.getName(), oneToMany); 174 } 175 176 public OneToManyConfig getOneToMany(String name) 177 { 178 return _oneToManyMap.get(name); 179 } 180 181 public HashMap <String , OneToOneConfig> getOneToOneMap() 182 { 183 return _oneToOneMap; 184 } 185 186 public void addOneToOne(OneToOneConfig oneToOne) 187 { 188 _oneToOneMap.put(oneToOne.getName(), oneToOne); 189 } 190 191 public OneToOneConfig getOneToOne(String name) 192 { 193 return _oneToOneMap.get(name); 194 } 195 196 public HashMap <String , ManyToManyConfig> getManyToManyMap() 197 { 198 return _manyToManyMap; 199 } 200 201 public void addManyToMany(ManyToManyConfig manyToMany) 202 { 203 _manyToManyMap.put(manyToMany.getName(), manyToMany); 204 } 205 206 public ManyToManyConfig getManyToMany(String name) 207 { 208 return _manyToManyMap.get(name); 209 } 210 211 public HashMap <String , EmbeddedConfig> getEmbeddedMap() 212 { 213 return _embeddedMap; 214 } 215 216 public void addEmbedded(EmbeddedConfig embedded) 217 { 218 _embeddedMap.put(embedded.getName(), embedded); 219 } 220 221 public EmbeddedConfig getEmbedded(String name) 222 { 223 return _embeddedMap.get(name); 224 } 225 226 public HashMap <String , TransientConfig> getTransientMap() 227 { 228 return _transientMap; 229 } 230 231 public void addTransient(TransientConfig transientConfig) 232 { 233 _transientMap.put(transientConfig.getName(), transientConfig); 234 } 235 236 public TransientConfig getTransient(String name) 237 { 238 return _transientMap.get(name); 239 } 240 } 241 | Popular Tags |