Search in sources :

Example 1 with FermaContextExtension

use of org.openkilda.persistence.ferma.FermaContextExtension in project open-kilda by telstra.

the class FermaGenericRepository method framedGraph.

protected FramedGraph framedGraph() {
    PersistenceContext context = PersistenceContextManager.INSTANCE.getContextCreateIfMissing();
    FermaContextExtension contextExtension = implementation.getContextExtension(context);
    DelegatingFramedGraph<?> graph = contextExtension.getGraphCreateIfMissing();
    if (graph == null) {
        throw new PersistenceException("Failed to obtain a framed graph");
    }
    return graph;
}
Also used : FermaContextExtension(org.openkilda.persistence.ferma.FermaContextExtension) PersistenceException(org.openkilda.persistence.exceptions.PersistenceException) PersistenceContext(org.openkilda.persistence.context.PersistenceContext)

Aggregations

PersistenceContext (org.openkilda.persistence.context.PersistenceContext)1 PersistenceException (org.openkilda.persistence.exceptions.PersistenceException)1 FermaContextExtension (org.openkilda.persistence.ferma.FermaContextExtension)1