public abstract class AbstractPersistenceBackendFactory extends Object implements PersistenceBackendFactory
PersistenceBackendFactory
that processes common store options and manages the configuration.BACKEND_PROPERTY, CONFIG_FILE
Modifier | Constructor and Description |
---|---|
protected |
AbstractPersistenceBackendFactory()
Constructs a new
AbstractPersistenceBackendFactory . |
Modifier and Type | Method and Description |
---|---|
PersistentStore |
createPersistentStore(PersistentResource resource,
PersistenceBackend backend,
Map<?,?> options)
Creates a
PersistentStore between the given resource and the given backend
according to the given options . |
protected abstract PersistentStore |
createSpecificPersistentStore(PersistentResource resource,
PersistenceBackend backend,
Map<?,?> options)
Creates a
PersistentStore between the given resource and the given backend
according to the given options . |
protected abstract String |
getName()
Returns the literal description of the created
PersistenceBackend . |
protected static List<PersistentStoreOptions> |
getStoreOptions(Map<?,?> options)
Parses the store options from the given
options . |
protected void |
processGlobalConfiguration(File directory)
Creates and saves the NeoEMF configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyBackend, createPersistentBackend, createTransientBackend, createTransientStore
protected AbstractPersistenceBackendFactory()
AbstractPersistenceBackendFactory
.@Nonnull protected static List<PersistentStoreOptions> getStoreOptions(@Nullable Map<?,?> options)
options
.
The store options must be a List<PersistentStoreOptions>
registered with the
PersistentResourceOptions.STORE_OPTIONS
key.
options
- the optionsprotected abstract String getName()
PersistenceBackend
.PersistenceBackend
public PersistentStore createPersistentStore(PersistentResource resource, PersistenceBackend backend, Map<?,?> options) throws InvalidDataStoreException
PersistenceBackendFactory
PersistentStore
between the given resource
and the given backend
according to the given options
.
The returned PersistentStore
may be a succession of several PersistentStore
.
createPersistentStore
in interface PersistenceBackendFactory
resource
- the resourcebackend
- the back-endoptions
- the options that defines the behaviour of the back-endInvalidDataStoreException
- if there is at least one invalid value in options
, or if an option is
missingprotected abstract PersistentStore createSpecificPersistentStore(PersistentResource resource, PersistenceBackend backend, Map<?,?> options) throws InvalidDataStoreException
PersistentStore
between the given resource
and the given backend
according to the given options
.
The returned PersistentStore
may be a succession of several PersistentStore
.
Contrary to createPersistentStore(PersistentResource, PersistenceBackend, Map)
, this method is
associated to a specific PersistenceBackend
, and called before creating global
PersistentStore
.
resource
- the resourcebackend
- the back-endoptions
- the optionsInvalidDataStoreException
- if there is at least one invalid value in options
, or if an option is
missingprotected void processGlobalConfiguration(File directory) throws InvalidDataStoreException
The configuration is stored as a properties file beside a database in order to identify a PersistenceBackend
.
directory
- the directory where the configuration must be storedInvalidDataStoreException
- if the configuration cannot be created in the directory
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.