public class StudyV2
extends java.lang.Object
Model for a DB entity of a study with all properties of a study but not the results of a study. The results of a study are stored in StudyResults and ComponentResult. A study consists of a list components and their model is Component. Default values, where necessary, are at the fields or in the constructor. For the GUI model StudyProperties is used.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALLOWED_WORKER_LIST |
static java.lang.String |
COMMENTS |
static java.lang.String |
DESCRIPTION |
static java.lang.String |
DIR_NAME |
static java.lang.String |
ID |
static java.lang.String |
JSON_DATA |
static java.lang.String |
MEMBERS |
static java.lang.String |
SERIAL_VERSION
Version of this model used for serialisation (e.g.
|
static java.lang.String |
STUDY |
static java.lang.String |
TITLE |
static java.lang.String |
UUID |
Constructor and Description |
---|
StudyV2() |
Modifier and Type | Method and Description |
---|---|
void |
addAllowedWorker(java.lang.String workerType) |
void |
addComponent(Component component) |
void |
addMember(User user) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<java.lang.String> |
getAllowedWorkerList() |
java.lang.String |
getComments() |
Component |
getComponent(int position)
Gets the component of this study at the given position.
|
java.util.List<Component> |
getComponentList() |
java.lang.Integer |
getComponentPosition(Component component)
Returns the position (index+1) of the component in the list of components of this study or null if it doesn't
exist.
|
java.sql.Timestamp |
getDate() |
java.lang.String |
getDescription() |
java.lang.String |
getDirName() |
Component |
getFirstComponent() |
java.lang.Long |
getId() |
java.lang.String |
getJsonData() |
Component |
getLastComponent() |
Component |
getNextComponent(Component component) |
java.lang.String |
getTitle() |
java.util.Set<User> |
getUserList() |
java.lang.String |
getUuid() |
boolean |
hasAllowedWorker(java.lang.String workerType) |
boolean |
hasComponent(Component component) |
int |
hashCode() |
boolean |
hasMember(User user) |
boolean |
isLocked() |
void |
removeAllowedWorker(java.lang.String workerType) |
void |
removeComponent(Component component) |
void |
removeMember(User user) |
void |
setAllowedWorkerList(java.util.Set<java.lang.String> allowedWorkerList) |
void |
setComments(java.lang.String comments) |
void |
setComponentList(java.util.List<Component> componentList) |
void |
setDate(java.sql.Timestamp timestamp) |
void |
setDescription(java.lang.String description) |
void |
setDirName(java.lang.String dirName) |
void |
setId(java.lang.Long id) |
void |
setJsonData(java.lang.String jsonData) |
void |
setLocked(boolean locked) |
void |
setTitle(java.lang.String title) |
void |
setUserList(java.util.Set<User> userList) |
void |
setUuid(java.lang.String uuid) |
java.lang.String |
toString() |
java.util.List<play.data.validation.ValidationError> |
validate() |
public static final java.lang.String SERIAL_VERSION
public static final java.lang.String ID
public static final java.lang.String UUID
public static final java.lang.String MEMBERS
public static final java.lang.String TITLE
public static final java.lang.String JSON_DATA
public static final java.lang.String DESCRIPTION
public static final java.lang.String DIR_NAME
public static final java.lang.String COMMENTS
public static final java.lang.String STUDY
public static final java.lang.String ALLOWED_WORKER_LIST
public void setId(java.lang.Long id)
public java.lang.Long getId()
public void setUuid(java.lang.String uuid)
public java.lang.String getUuid()
public void setTitle(java.lang.String title)
public java.lang.String getTitle()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setDirName(java.lang.String dirName)
public java.lang.String getDirName()
public void setComments(java.lang.String comments)
public java.lang.String getComments()
public void setDate(java.sql.Timestamp timestamp)
public java.sql.Timestamp getDate()
public void setLocked(boolean locked)
public boolean isLocked()
public java.lang.String getJsonData()
public void setJsonData(java.lang.String jsonData)
public void setAllowedWorkerList(java.util.Set<java.lang.String> allowedWorkerList)
public java.util.Set<java.lang.String> getAllowedWorkerList()
public void addAllowedWorker(java.lang.String workerType)
public void removeAllowedWorker(java.lang.String workerType)
public boolean hasAllowedWorker(java.lang.String workerType)
public void setUserList(java.util.Set<User> userList)
public java.util.Set<User> getUserList()
public void addMember(User user)
public void removeMember(User user)
public boolean hasMember(User user)
public void setComponentList(java.util.List<Component> componentList)
public java.util.List<Component> getComponentList()
public Component getComponent(int position)
public java.lang.Integer getComponentPosition(Component component)
public void addComponent(Component component)
public void removeComponent(Component component)
public boolean hasComponent(Component component)
public Component getFirstComponent()
public Component getLastComponent()
public java.util.List<play.data.validation.ValidationError> validate()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object