@Entity
public abstract class Worker
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
comment
Some comment the user can give during study link/worker creation (only for
PersonalSingleWorker and
PersonalMultipleWorker . |
static java.lang.String |
COMMENT |
static java.lang.String |
DISCRIMINATOR |
static java.lang.String |
UI_WORKER_TYPE |
Constructor and Description |
---|
Worker() |
Modifier and Type | Method and Description |
---|---|
void |
addBatch(Batch batch) |
void |
addStudyResult(StudyResult studyResult) |
boolean |
equals(java.lang.Object obj) |
abstract java.lang.String |
generateConfirmationCode() |
java.util.Set<Batch> |
getBatchList() |
java.lang.String |
getComment() |
java.util.Optional<StudyResult> |
getFirstStudyResult() |
java.lang.Long |
getId() |
java.util.Optional<StudyResult> |
getLastStudyResult() |
java.util.List<StudyResult> |
getStudyResultList() |
abstract java.lang.String |
getUIWorkerType() |
static java.lang.String |
getUIWorkerType(java.lang.String workerType)
Little helper method that translates a workerType into the UI worker
type.
|
abstract java.lang.String |
getWorkerType() |
boolean |
hasBatch(Batch batch) |
int |
hashCode() |
void |
removeBatch(Batch batch) |
void |
removeStudyResult(StudyResult studyResult) |
void |
setBatchList(java.util.Set<Batch> batchList) |
void |
setComment(java.lang.String comment) |
void |
setId(java.lang.Long id) |
void |
setStudyResultList(java.util.List<StudyResult> studyResultList) |
java.lang.String |
toString() |
abstract java.util.List<play.data.validation.ValidationError> |
validate() |
public static final java.lang.String DISCRIMINATOR
public static final java.lang.String UI_WORKER_TYPE
public static final java.lang.String COMMENT
protected java.lang.String comment
PersonalSingleWorker
and
PersonalMultipleWorker
.public abstract java.lang.String generateConfirmationCode()
public abstract java.util.List<play.data.validation.ValidationError> validate()
public abstract java.lang.String getWorkerType()
public abstract java.lang.String getUIWorkerType()
public static java.lang.String getUIWorkerType(java.lang.String workerType)
public void setId(java.lang.Long id)
public java.lang.Long getId()
public void setComment(java.lang.String comment)
public java.lang.String getComment()
public void setStudyResultList(java.util.List<StudyResult> studyResultList)
public java.util.List<StudyResult> getStudyResultList()
public java.util.Optional<StudyResult> getFirstStudyResult()
public java.util.Optional<StudyResult> getLastStudyResult()
public void addStudyResult(StudyResult studyResult)
public void removeStudyResult(StudyResult studyResult)
public java.util.Set<Batch> getBatchList()
public void setBatchList(java.util.Set<Batch> batchList)
public boolean hasBatch(Batch batch)
public void addBatch(Batch batch)
public void removeBatch(Batch batch)
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