1 23 24 package org.objectweb.jorm.metainfo.api; 25 26 import java.util.Collection ; 27 import java.util.List ; 28 29 import org.objectweb.jorm.type.api.PType; 30 import org.objectweb.medor.expression.api.Expression; 31 import org.objectweb.medor.expression.api.ExpressionException; 32 33 40 public interface Class extends MetaObject { 41 45 String getFileName(); 46 47 51 void setFileName(String filename); 52 53 59 boolean isAbstract(); 60 61 void setAbstract(boolean isAbstract); 62 63 67 String getName(); 68 69 74 String getFQName(); 75 76 85 TypedElement getTypedElement(String fieldName); 86 87 92 TypedElement removeTypedElement(String fieldName); 93 94 103 NameDef createNameDef(); 104 105 115 116 ScalarField createHiddenField(String fieldname, PType type, int size, int scale); 117 118 122 Collection getHiddenFields() ; 123 124 128 Collection getAllHiddenFields() ; 129 130 135 ScalarField getHiddenField(String fieldname); 136 137 138 145 NameDef getNameDef(String projectName); 146 147 150 Collection getNameDefs(); 151 152 159 Expression getInheritanceFilter(NameDef nd) throws ExpressionException; 160 161 165 Object getInheritanceNamingKey(NameDef nd); 166 167 void setInheritanceNamingKey(NameDef nd, Object key); 168 169 175 void setInheritanceFilter(NameDef nd, Expression filter); 176 177 183 void setInheritanceFilter(NameDef nd, String filter); 184 185 186 197 PrimitiveElement createPrimitiveElement(String fieldName, PType type, int size, int scale); 198 199 207 void setConstantValue(String fieldName, String cv); 208 209 217 String getConstantValue(String fieldName); 218 219 229 ClassRef createClassRef(String fieldName, Class class_); 230 231 244 GenClassRef createGenClassRef(String fieldName, String genName); 245 246 254 Collection getFields(); 255 256 263 Collection getAllFields() ; 264 265 273 Collection getSubClasses(); 274 275 279 Collection getSuperClasses(); 280 281 288 Class getSuperClass(String fqcn); 289 290 297 void addSuperClass(Class class_); 298 299 306 void addSubClass(Class class_); 307 308 313 int getInheritedClassNumber(); 314 315 318 PType getPType(); 319 320 325 int getFieldRefNumber(); 326 327 333 ClassProject getClassProject(String projectName); 334 335 342 public ClassMapping getClassMapping(String projectName, String mapperName); 343 344 348 Collection getClassProjects(); 349 350 356 void addClassProject(String projectName, ClassProject classProject); 357 358 364 ClassProject createClassProject(String projectName); 365 366 371 ClassProject removeClassProject(String projectname); 372 373 376 List getAncestors(); 377 378 381 List getAllAncestors(); 382 383 388 boolean isPolymorphic(); 389 390 394 boolean generateKFPNC() throws ExpressionException; 395 396 400 public boolean detectFilterElementNotInPK(Expression exp, NameDef nd) 401 throws ExpressionException; 402 } 403 | Popular Tags |