1 23 24 package org.objectweb.jorm.mapper.fos.metainfo; 25 26 import org.objectweb.jorm.metainfo.lib.BasicClassMapping; 27 import org.objectweb.jorm.metainfo.api.Class; 28 import org.objectweb.jorm.metainfo.api.MetaObject; 29 import org.objectweb.jorm.metainfo.api.ParentClassMapping; 30 import org.objectweb.jorm.metainfo.api.PrimitiveElementMapping; 31 import org.objectweb.util.monolog.api.Logger; 32 import org.objectweb.util.monolog.api.LoggerFactory; 33 34 37 public class FosClassMapping extends BasicClassMapping 38 implements FosMappingInfos { 39 private String directoryName = null; 40 41 46 public FosClassMapping(MetaObject linkedMO, MetaObject parent) { 47 super(null, linkedMO, parent); 48 } 49 50 52 57 public String getDirName() { 58 return directoryName; 59 } 60 61 66 public void setDirName(String dirname) { 67 directoryName = dirname; 68 } 69 70 74 public void addFieldMapping(String fn) { 75 Class c = (Class ) getLinkedMO(); 76 MetaObject f = c.getHiddenField(fn); 77 if (f != null) { 78 if (getPrimitiveElementMapping(fn) == null) { 79 addPrimitiveElementMapping( 80 new FosPrimitiveElementMapping(this, f)); 81 } 82 return; 83 } 84 f = c.getTypedElement(fn); 85 if (f != null) { 86 if (getPrimitiveElementMapping(fn) == null) { 87 addPrimitiveElementMapping( 88 new FosPrimitiveElementMapping(this, f)); 89 } 90 } 91 } 92 93 public ParentClassMapping createImplicitParentClassMapping(Class superClass) { 94 throw new Error ("implicit mapping not supported yet in FOS"); 95 } 96 97 public void addImplicitDependencies() { 98 } 99 100 103 public PrimitiveElementMapping getPrimitiveElementMapping(String fieldName, boolean searchInSuper) { 104 throw new InternalError ("Not implemented yet"); 105 } 106 107 110 public void setLogger(Logger logger) { 111 113 } 114 115 118 public void setLoggerFactory(LoggerFactory loggerfactory) { 119 121 } 122 } 123 | Popular Tags |