cst.common.businessLayer
Class TrialSubjectModel
java.lang.Object
cst.common.businessLayer.TrialSubjectModel
- All Implemented Interfaces:
- Displayable, java.lang.Cloneable
public class TrialSubjectModel
- extends java.lang.Object
- implements Displayable, java.lang.Cloneable
Represents a subject. A subject comprises the following properties:
-
a primary key field which identifies a subject. It is an instance of
TextFieldModel
.
-
a collection of filter field attributes which are used to filter subsets
of subjects. For example, an attribute "location" may be used to let
users filter subject records by those who live in Birmingham. Another
attribute "gender" could be used to let users filter records based on
male or female subjects. Each filter attribute is represented by an
instance of
TextFieldModel
.
-
a collection of activities, each represented by an instance of
TrialActivityModel
-
a count of the number of completed activities.
Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrialSubjectModel
public TrialSubjectModel(java.lang.String identifier)
TrialSubjectModel
public TrialSubjectModel()
getIdentifier
public java.lang.String getIdentifier()
setIdentifier
public void setIdentifier(java.lang.String identifier)
getPrimaryKeyFieldModel
public TextFieldModel getPrimaryKeyFieldModel()
setPrimaryKeyFieldModel
public void setPrimaryKeyFieldModel(TextFieldModel primaryKeyFieldModel)
getFilterFieldValue
public java.lang.String getFilterFieldValue(java.lang.String fieldName)
addFilterFieldModel
public void addFilterFieldModel(TextFieldModel textFieldModel)
getFilterFieldModel
public TextFieldModel getFilterFieldModel(java.lang.String filterFieldDataStorageName)
getFilterFieldModels
public java.util.ArrayList<TextFieldModel> getFilterFieldModels()
setFilterFieldValue
public void setFilterFieldValue(java.lang.String filterFieldDataStorageName,
java.lang.String value)
addTrialActivityModel
public void addTrialActivityModel(TrialActivityModel trialActivityModel)
getTrialActivityModels
public java.util.ArrayList<TrialActivityModel> getTrialActivityModels()
getCompletedActivitiesCount
public int getCompletedActivitiesCount()
setCompletedActivitiesCount
public void setCompletedActivitiesCount(int completedActivitiesCount)
incrementCompletedActivitiesCount
public void incrementCompletedActivitiesCount()
decrementCompletedActivitiesCount
public void decrementCompletedActivitiesCount()
computeCompletedActivities
public void computeCompletedActivities()
isCompleted
public boolean isCompleted()
getTrialActivityFromDataStorageName
public TrialActivityModel getTrialActivityFromDataStorageName(java.lang.String trialActivityDataStorageName)
setTrialActivityModel
public void setTrialActivityModel(TrialActivityModel targetTrialActivityModel)
getTrialActivityDateFieldModel
public java.util.Date getTrialActivityDateFieldModel(java.lang.String trialActivityDataStorageName,
java.lang.String trialActivityFieldDataStorageName)
throws CSTException
- Throws:
CSTException
setTrialActivityDateFieldModel
public void setTrialActivityDateFieldModel(java.lang.String trialActivityDataStorageName,
java.lang.String trialActivityFieldDataStorageName,
java.util.Date date)
throws CSTException
- Throws:
CSTException
print
public void print(java.io.PrintStream out)
containsActivity
public boolean containsActivity(TrialActivityModel trialActivityModel)
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName
in interface Displayable
getDisplayItemIdentifier
public java.lang.String getDisplayItemIdentifier()
- Specified by:
getDisplayItemIdentifier
in interface Displayable
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object