See: Description
Interface | Description |
---|---|
PersistenceOptions |
Represents options managed by
PersistenceBackendFactory . |
PersistenceOptionsBuilder |
A builder of
PersistenceOptions . |
PersistentResourceOptions |
Represents options related to resource-level features.
|
PersistentStoreOptions |
Represents options related to database access features.
|
Class | Description |
---|---|
AbstractPersistenceOptions |
The abstract implementation of
PersistenceOptions . |
AbstractPersistenceOptionsBuilder<B extends AbstractPersistenceOptionsBuilder<B,O>,O extends AbstractPersistenceOptions> |
An abstract
PersistenceOptionsBuilder that manages the assembly and the construction of
PersistenceOptions . |
CommonOptions |
A
PersistenceOptions that holds common options. |
CommonOptionsBuilder |
A common
PersistenceOptionsBuilder that creates common options that are available for all back-end
implementations. |
Enum | Description |
---|---|
CommonStoreOptions |
Represents common options related to database access, managed by
PersistenceBackendFactory . |
Exception | Description |
---|---|
InvalidOptionException |
Exception thrown if an error is detected when validating options during assembly.
|
NeoEMF can be customized by using specific options that are provided to the Resource.save(java.util.Map)
and Resource.load(java.util.Map)
methods. This package defines two APIs:
PersistentResourceOptions
: defines the generic options available for
each implementation. This interface is implemented in backend-specific packages to provide backend-related
options.PersistenceOptionsBuilder
: a fluent API allowing to easily
set NeoEMF options in client applications. Backend-specific builders are also provided to integrate backend-related
options.
These classes are used to create option maps used in EMF save and load methods. For example, the following
code creates a map that tells the framework to commit the pending transaction after 10000 operations, and cache the
accessed features to retrieve them efficiently. ConcreteBackendBuilder corresponds to a
backend-specific implementation of PersistenceOptionsBuilder
.
// Create the option map
Map<String, Object> options = ConcreteBackendBuilder.newBuilder()
.autocommit(10000)
.cacheFeatures()
.asMap();
// Load the resource with the specified options
myResource.load(options);
// Manipulate the resource with autocommit and feature cache enabled
myResource.getContents() [...]
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.