/** * The metadata repository for the factory that this instance was * constructed with will be serialized, along with any query * compilations etc. that have been created for the factory. */ public void store() { MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setSourceMode(MetaDataRepository.MODE_ALL); Collection types = repos.loadPersistentTypes(devpath, null); for (Iterator iter = types.iterator(); iter.hasNext(); ) repos.getMetaData((Class) iter.next(), null, true); loadQueries(); log.info("The following data will be stored: "); log(repos, conf.getQueryCompilationCacheInstance()); CacheMarshallersValue.getMarshallerById(conf, getClass().getName()) .store(new Object[] { repos, conf.getQueryCompilationCacheInstance() }); }
/** * The metadata repository for the factory that this instance was * constructed with will be serialized, along with any query * compilations etc. that have been created for the factory. */ public void store() { MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setSourceMode(MetaDataRepository.MODE_ALL); Collection types = repos.loadPersistentTypes(devpath, null); for (Iterator iter = types.iterator(); iter.hasNext(); ) repos.getMetaData((Class) iter.next(), null, true); loadQueries(); log.info("The following data will be stored: "); log(repos, conf.getQueryCompilationCacheInstance()); CacheMarshallersValue.getMarshallerById(conf, getClass().getName()) .store(new Object[] { repos, conf.getQueryCompilationCacheInstance() }); }
/** * The metadata repository for the factory that this instance was * constructed with will be serialized, along with any query * compilations etc. that have been created for the factory. */ public void store() { MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setSourceMode(MetaDataRepository.MODE_ALL); Collection types = repos.loadPersistentTypes(devpath, null); for (Iterator iter = types.iterator(); iter.hasNext(); ) repos.getMetaData((Class) iter.next(), null, true); loadQueries(); log.info("The following data will be stored: "); log(repos, conf.getQueryCompilationCacheInstance()); CacheMarshallersValue.getMarshallerById(conf, getClass().getName()) .store(new Object[] { repos, conf.getQueryCompilationCacheInstance() }); }
/** * The metadata repository for the factory that this instance was * constructed with will be serialized, along with any query * compilations etc. that have been created for the factory. */ public void store() { MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setSourceMode(MetaDataRepository.MODE_ALL); Collection types = repos.loadPersistentTypes(devpath, null); for (Iterator iter = types.iterator(); iter.hasNext(); ) repos.getMetaData((Class) iter.next(), null, true); loadQueries(); log.info("The following data will be stored: "); log(repos, conf.getQueryCompilationCacheInstance()); CacheMarshallersValue.getMarshallerById(conf, getClass().getName()) .store(new Object[] { repos, conf.getQueryCompilationCacheInstance() }); }
/** * The metadata repository for the factory that this instance was * constructed with will be serialized, along with any query * compilations etc. that have been created for the factory. */ public void store() { MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setSourceMode(MetaDataRepository.MODE_ALL); Collection types = repos.loadPersistentTypes(devpath, null); for (Iterator iter = types.iterator(); iter.hasNext(); ) repos.getMetaData((Class) iter.next(), null, true); loadQueries(); log.info("The following data will be stored: "); log(repos, conf.getQueryCompilationCacheInstance()); CacheMarshallersValue.getMarshallerById(conf, getClass().getName()) .store(new Object[] { repos, conf.getQueryCompilationCacheInstance() }); }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructor. Supply configuration. * * @param type the bytecode representation fo the type to * enhance; this can be created from any stream or file * @param repos a metadata repository to use for metadata access, * or null to create a new reporitory; the repository * from the given configuration isn't used by default * because the configuration might be an * implementation-specific subclass whose metadata * required more than just base metadata files * @param loader the environment classloader to use for loading * classes and resources. */ public PCEnhancer(OpenJPAConfiguration conf, BCClass type, MetaDataRepository repos, ClassLoader loader) { _managedType = type; _pc = type; _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); if (repos == null) { _repos = conf.newMetaDataRepositoryInstance(); _repos.setSourceMode(MetaDataRepository.MODE_META); } else _repos = repos; _meta = _repos.getMetaData(type.getType(), loader, false); }
/** * Constructor. Supply configuration. * * @param type the bytecode representation fo the type to * enhance; this can be created from any stream or file * @param repos a metadata repository to use for metadata access, * or null to create a new reporitory; the repository * from the given configuration isn't used by default * because the configuration might be an * implementation-specific subclass whose metadata * required more than just base metadata files * @param loader the environment classloader to use for loading * classes and resources. */ public PCEnhancer(OpenJPAConfiguration conf, BCClass type, MetaDataRepository repos, ClassLoader loader) { _managedType = type; _pc = type; _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); if (repos == null) { _repos = conf.newMetaDataRepositoryInstance(); _repos.setSourceMode(MetaDataRepository.MODE_META); } else _repos = repos; _meta = _repos.getMetaData(type.getType(), loader, false); configureOptimizeIdCopy(); }
/** * Constructor. Supply configuration. * * @param type the bytecode representation fo the type to * enhance; this can be created from any stream or file * @param repos a metadata repository to use for metadata access, * or null to create a new reporitory; the repository * from the given configuration isn't used by default * because the configuration might be an * implementation-specific subclass whose metadata * required more than just base metadata files * @param loader the environment classloader to use for loading * classes and resources. */ public PCEnhancer(OpenJPAConfiguration conf, BCClass type, MetaDataRepository repos, ClassLoader loader) { _managedType = type; _pc = type; _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); if (repos == null) { _repos = conf.newMetaDataRepositoryInstance(); _repos.setSourceMode(MetaDataRepository.MODE_META); } else _repos = repos; _meta = _repos.getMetaData(type.getType(), loader, false); configureOptimizeIdCopy(); }
/** * Constructor. Supply configuration. * * @param type the bytecode representation fo the type to * enhance; this can be created from any stream or file * @param repos a metadata repository to use for metadata access, * or null to create a new reporitory; the repository * from the given configuration isn't used by default * because the configuration might be an * implementation-specific subclass whose metadata * required more than just base metadata files * @param loader the environment classloader to use for loading * classes and resources. */ public PCEnhancer(OpenJPAConfiguration conf, BCClass type, MetaDataRepository repos, ClassLoader loader) { _managedType = type; _pc = type; _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); if (repos == null) { _repos = conf.newMetaDataRepositoryInstance(); _repos.setSourceMode(MetaDataRepository.MODE_META); } else _repos = repos; _meta = _repos.getMetaData(type.getType(), loader, false); configureOptimizeIdCopy(); }
/** * Constructor. Supply configuration. * * @param type the bytecode representation fo the type to * enhance; this can be created from any stream or file * @param repos a metadata repository to use for metadata access, * or null to create a new reporitory; the repository * from the given configuration isn't used by default * because the configuration might be an * implementation-specific subclass whose metadata * required more than just base metadata files * @param loader the environment classloader to use for loading * classes and resources. */ public PCEnhancer(OpenJPAConfiguration conf, BCClass type, MetaDataRepository repos, ClassLoader loader) { _managedType = type; _pc = type; _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); if (repos == null) { _repos = conf.newMetaDataRepositoryInstance(); _repos.setSourceMode(MetaDataRepository.MODE_META); } else _repos = repos; _meta = _repos.getMetaData(type.getType(), loader, false); configureOptimizeIdCopy(); }
pr.setSourceMode(MODE_MAPPING, false); pr.setResolve(MODE_MAPPING, false);
pr.setSourceMode(MODE_MAPPING, false); pr.setResolve(MODE_MAPPING, false);
repos.setSourceMode(MetaDataRepository.MODE_META);
repos.setSourceMode(MetaDataRepository.MODE_META);
repos.setSourceMode(MetaDataRepository.MODE_META);