1 23 24 package org.objectweb.jorm.api; 25 26 import org.objectweb.jorm.metainfo.api.Manager; 27 import org.objectweb.jorm.type.api.PTypeSpace; 28 import org.objectweb.jorm.type.api.PExceptionTyping; 29 import org.objectweb.medor.eval.prefetch.api.PrefetchCache; 30 31 42 public interface PMapper extends PMappingStructuresManager { 43 final String PCLASSMAPPINGAPPENDER = "Mapping"; 44 final String PBINDINGAPPENDER = "Binding"; 45 final String JORMPROPFILE = "jorm.properties"; 46 47 52 void closeConnection(Object conn) throws PException; 53 54 60 String cn2mn(String cn); 61 62 65 Object getConnection() throws PException; 66 67 72 Object getConnection(Object ctxt) throws PException; 73 74 81 Object getConnection(Object connectionContext, Object user) throws PException; 82 83 88 String getMapperName(); 89 90 94 PMappingStructuresManager getPMappingStructuresManager(); 95 96 102 PClassMapping lookup(String classname); 103 104 118 void map(PClassMapping pcm) 119 throws PException; 120 121 136 void map(Object conn, PClassMapping pcm) 137 throws PException; 138 139 156 void map(Object conn, PClassMapping pcm, boolean loadmeta) 157 throws PException; 158 159 164 void setConnectionFactory(Object cf) throws PException; 165 166 169 Object getConnectionFactory(); 170 171 176 void setPrefetchCache(PrefetchCache pc) throws PException; 177 178 181 PrefetchCache getPrefetchCache(); 182 183 189 void setMapperName(String mappername); 190 191 197 Manager getMetaInfoManager(); 198 199 203 PTypeSpace getPTypeSpace(); 204 205 209 void start() throws PException; 210 211 215 void stop() throws PException; 216 217 221 void unmap(String classname) throws PException; 222 223 228 void addMapperEventListener(PMapperListener listener); 229 230 235 void removeMapperEventListener(PMapperListener listener); 236 237 242 PClassMapping createGenClassMapping() throws PException; 243 } 244 | Popular Tags |