|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.connector.store.jpa.util.Workspaces
@NotThreadSafe public class Workspaces
A manager and cache for WorkspaceEntity
objects.
Constructor Summary | |
---|---|
Workspaces(javax.persistence.EntityManager manager)
|
Method Summary | |
---|---|
WorkspaceEntity |
create(String workspaceName)
Create a workspace with the supplied name. |
boolean |
destroy(String workspaceName)
Remove the entity representation of the workspace. |
WorkspaceEntity |
get(String workspaceName,
boolean createIfRequired)
Get the workspace with the supplied name, and optionally create a new one if missing. |
Set<String> |
getWorkspaceNames()
Find the set of names for the existing workspaces. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Workspaces(javax.persistence.EntityManager manager)
Method Detail |
---|
public WorkspaceEntity create(String workspaceName)
workspaceName
- the name of the workspace; may not be null
public WorkspaceEntity get(String workspaceName, boolean createIfRequired)
workspaceName
- the name of the workspace; never nullcreateIfRequired
- true if the workspace should be created if there is no existing workspace with the supplied name
createIfRequired
was
falsepublic Set<String> getWorkspaceNames()
public boolean destroy(String workspaceName)
WorkspaceEntity
record.
workspaceName
- the name of the workspace; may not be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |