|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.graph.connector.map.MapRepository
org.jboss.dna.connector.store.jpa.model.simple.SimpleJpaRepository
public class SimpleJpaRepository
Implementation of MapRepository
for the Simple JPA connector model
. This class exposes a map of
workspace names to workspaces
and each workspace provides a logical mapping of node UUIDs to nodes
. The JpaNode
class functions as an adapter between the persistent entity for nodes
and the
map repository interface for nodes
.
This class differs slightly from the other MapRepository
implementations in that it exists only within the lifetime of
a single EntityManager
(which itself is opened and closed within the lifetime of a single SimpleJpaConnection
.
The other map repository implementations all outlive any particular connection and generally survive for the lifetime of the
DNA server.
Constructor Summary | |
---|---|
SimpleJpaRepository(String sourceName,
UUID rootNodeUuid,
javax.persistence.EntityManager entityManager,
ExecutionContext context,
boolean compressData,
boolean creatingWorkspacesAllowed,
long minimumSizeOfLargeValuesInBytes)
|
|
SimpleJpaRepository(String sourceName,
UUID rootNodeUuid,
String defaultWorkspaceName,
String[] predefinedWorkspaceNames,
javax.persistence.EntityManager entityManager,
ExecutionContext context,
boolean compressData,
boolean creatingWorkspacesAllowed,
long minimumSizeOfLargeValuesInBytes)
|
Method Summary | |
---|---|
MapWorkspace |
getWorkspace(String name)
Returns the workspace with the given name |
Set<String> |
getWorkspaceNames()
Returns a list of the names of the currently created workspaces |
MapRepositoryTransaction |
startTransaction(boolean readonly)
Begin a transaction, hinting whether the transaction will be used only to read the content. |
Methods inherited from class org.jboss.dna.graph.connector.map.MapRepository |
---|
createWorkspace, createWorkspace, destroyWorkspace, getRootNodeUuid, getSourceName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleJpaRepository(String sourceName, UUID rootNodeUuid, String defaultWorkspaceName, String[] predefinedWorkspaceNames, javax.persistence.EntityManager entityManager, ExecutionContext context, boolean compressData, boolean creatingWorkspacesAllowed, long minimumSizeOfLargeValuesInBytes)
public SimpleJpaRepository(String sourceName, UUID rootNodeUuid, javax.persistence.EntityManager entityManager, ExecutionContext context, boolean compressData, boolean creatingWorkspacesAllowed, long minimumSizeOfLargeValuesInBytes)
Method Detail |
---|
public MapWorkspace getWorkspace(String name)
MapRepository
getWorkspace
in class MapRepository
name
- the name of the workspace to return
public Set<String> getWorkspaceNames()
MapRepository
getWorkspaceNames
in class MapRepository
public MapRepositoryTransaction startTransaction(boolean readonly)
committed
or
rolled back
.
startTransaction
in class MapRepository
readonly
- true if the transaction will not modify any content, or false if changes are to be made
MapRepository.startTransaction(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |