@SuppressWarnings({ "rawtypes", "unchecked" }) protected Collection getUnsupportedOptions() { Collection c = super.getUnsupportedOptions(); // remove options we do support but the abstract store doesn't // c.remove(OpenJPAConfiguration.OPTION_ID_DATASTORE); // c.remove(OpenJPAConfiguration.OPTION_OPTIMISTIC); // and add some that we don't support but the abstract store does // TODO take these out one by one c.add(OpenJPAConfiguration.OPTION_EMBEDDED_RELATION); c.add(OpenJPAConfiguration.OPTION_EMBEDDED_COLLECTION_RELATION); c.add(OpenJPAConfiguration.OPTION_EMBEDDED_MAP_RELATION); return c; }
protected Collection getUnsupportedOptions() { Collection c = super.getUnsupportedOptions(); // remove options we do support but the abstract store doesn't c.remove(OpenJPAConfiguration.OPTION_ID_DATASTORE); c.remove(OpenJPAConfiguration.OPTION_OPTIMISTIC); // and add some that we don't support but the abstract store does c.add(OpenJPAConfiguration.OPTION_EMBEDDED_RELATION); c.add(OpenJPAConfiguration.OPTION_EMBEDDED_COLLECTION_RELATION); c.add(OpenJPAConfiguration.OPTION_EMBEDDED_MAP_RELATION); return c; }
protected Collection getUnsupportedOptions() { Collection c = super.getUnsupportedOptions(); // remove options we do support but the abstract store doesn't c.remove(OpenJPAConfiguration.OPTION_ID_DATASTORE); c.remove(OpenJPAConfiguration.OPTION_OPTIMISTIC); // and add some that we don't support but the abstract store does c.add(OpenJPAConfiguration.OPTION_EMBEDDED_RELATION); c.add(OpenJPAConfiguration.OPTION_EMBEDDED_COLLECTION_RELATION); c.add(OpenJPAConfiguration.OPTION_EMBEDDED_MAP_RELATION); return c; }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }