|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.connector.store.jpa.model.common.WorkspaceEntity
@Entity public class WorkspaceEntity
A WorkspaceEntity represents a workspace that has been create in the store. WorkspaceEntity records are immutable and shared by one or more entities.
Constructor Summary | |
---|---|
WorkspaceEntity()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
static Set<String> |
findAllNames(javax.persistence.EntityManager manager)
Find the set of names for the existing workspaces. |
static WorkspaceEntity |
findByName(javax.persistence.EntityManager manager,
String name)
Find an existing workspace by its name, or create and return one if it does not already exist. |
static WorkspaceEntity |
findByName(javax.persistence.EntityManager manager,
String name,
boolean createIfRequired)
Find an existing workspace by its name. |
Long |
getId()
|
String |
getName()
|
int |
hashCode()
|
void |
setId(Long id)
|
void |
setName(String name)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WorkspaceEntity()
Method Detail |
---|
public Long getId()
public void setId(Long id)
id
- Sets id to the specified value.public String getName()
public void setName(String name)
name
- Sets name to the specified value.public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public static WorkspaceEntity findByName(javax.persistence.EntityManager manager, String name)
manager
- the entity managername
- the name of the workspace
IllegalArgumentException
- if the manager or name are nullpublic static WorkspaceEntity findByName(javax.persistence.EntityManager manager, String name, boolean createIfRequired)
manager
- the entity managername
- the name of the workspacecreateIfRequired
- if the workspace should be persisted if it does not yet exist
IllegalArgumentException
- if the manager or name are nullpublic static Set<String> findAllNames(javax.persistence.EntityManager manager)
manager
- the entity manager
IllegalArgumentException
- if the manager or name are null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |