cst.common.businessLayer
Class TrialSubjectModel

java.lang.Object
  extended by 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:


 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)

Constructor Summary
TrialSubjectModel()
           
TrialSubjectModel(java.lang.String identifier)
           
 
Method Summary
 void addFilterFieldModel(TextFieldModel textFieldModel)
           
 void addTrialActivityModel(TrialActivityModel trialActivityModel)
           
 java.lang.Object clone()
           
 void computeCompletedActivities()
           
 boolean containsActivity(TrialActivityModel trialActivityModel)
           
 void decrementCompletedActivitiesCount()
           
 int getCompletedActivitiesCount()
           
 java.lang.String getDisplayItemIdentifier()
           
 java.lang.String getDisplayName()
           
 TextFieldModel getFilterFieldModel(java.lang.String filterFieldDataStorageName)
           
 java.util.ArrayList<TextFieldModel> getFilterFieldModels()
           
 java.lang.String getFilterFieldValue(java.lang.String fieldName)
           
 java.lang.String getIdentifier()
           
 TextFieldModel getPrimaryKeyFieldModel()
           
 java.util.Date getTrialActivityDateFieldModel(java.lang.String trialActivityDataStorageName, java.lang.String trialActivityFieldDataStorageName)
           
 TrialActivityModel getTrialActivityFromDataStorageName(java.lang.String trialActivityDataStorageName)
           
 java.util.ArrayList<TrialActivityModel> getTrialActivityModels()
           
 void incrementCompletedActivitiesCount()
           
 boolean isCompleted()
           
 void print(java.io.PrintStream out)
           
 void setCompletedActivitiesCount(int completedActivitiesCount)
           
 void setFilterFieldValue(java.lang.String filterFieldDataStorageName, java.lang.String value)
           
 void setIdentifier(java.lang.String identifier)
           
 void setPrimaryKeyFieldModel(TextFieldModel primaryKeyFieldModel)
           
 void setTrialActivityDateFieldModel(java.lang.String trialActivityDataStorageName, java.lang.String trialActivityFieldDataStorageName, java.util.Date date)
           
 void setTrialActivityModel(TrialActivityModel targetTrialActivityModel)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrialSubjectModel

public TrialSubjectModel(java.lang.String identifier)

TrialSubjectModel

public TrialSubjectModel()
Method Detail

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