cst.common.businessLayer
Class TrialActivityModel

java.lang.Object
  extended by cst.common.businessLayer.TrialActivityModel
All Implemented Interfaces:
java.lang.Cloneable

public class TrialActivityModel
extends java.lang.Object
implements java.lang.Cloneable

An activity comprising a sequence of steps which are applied to each subject. A TrialActivityModel has the following properties:

The class has the following major duties:


 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)

Field Summary
static java.text.SimpleDateFormat SQL_DATE_FORMAT
           
 
Constructor Summary
TrialActivityModel()
           
 
Method Summary
 void addField(DateFieldModel dateFieldModel)
           
 boolean allowBlankFields()
           
 java.lang.Object clone()
           
static java.util.ArrayList<TrialActivityChange> detectTrialActivityChanges(java.lang.String userID, TrialActivityModel originalActivityModel, TrialActivityModel revisedActivityModel, java.lang.String dataSourceName)
           
 boolean enforceChronology()
           
 java.lang.String getComments()
           
 java.lang.String getDataStorageName()
           
 DateFieldModel getDateFieldFromDataStorageName(java.lang.String fieldDataStorageName)
           
 java.util.ArrayList<DateFieldModel> getDateFieldModels()
           
 java.util.Date getDateFieldValue(java.lang.String fieldDataStorageName)
           
 java.lang.String getDisplayName()
           
 java.lang.String getIdentifier()
           
 int getMaximumCommentLength()
           
 int getOrderPosition()
           
 TextFieldModel getPrimaryKeyFieldModel()
           
 boolean isCompleted()
           
 void print(java.io.PrintStream out)
           
 void setAllowBlankFields(boolean allowBlankFields)
           
 void setComments(java.lang.String comments)
           
 void setDataStorageName(java.lang.String dataStorageName)
           
 void setDateFieldValue(java.lang.String fieldDataStorageName, java.util.Date date)
           
 void setDisplayName(java.lang.String displayName)
           
 void setEnforceChronology(boolean enforceChronology)
           
 void setIdentifier(java.lang.String identifier)
           
 void setMaximumCommentLength(int maximumCommentLength)
           
 void setOrderPosition(int orderPosition)
           
 void setPrimaryKeyFieldModel(TextFieldModel primaryKeyFieldModel)
           
 void sortPositionsOfDateFieldModels()
           
static void validate(TrialActivityModel trialActivityModel)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQL_DATE_FORMAT

public static final java.text.SimpleDateFormat SQL_DATE_FORMAT
Constructor Detail

TrialActivityModel

public TrialActivityModel()
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)

getOrderPosition

public int getOrderPosition()
Returns:
the orderPosition

setOrderPosition

public void setOrderPosition(int orderPosition)
Parameters:
orderPosition - the orderPosition to set

getDisplayName

public java.lang.String getDisplayName()
Returns:
the displayName

setDisplayName

public void setDisplayName(java.lang.String displayName)
Parameters:
aspectName - the aspectName to set

getDataStorageName

public java.lang.String getDataStorageName()
Returns:
the dataStorageName

getDateFieldFromDataStorageName

public DateFieldModel getDateFieldFromDataStorageName(java.lang.String fieldDataStorageName)

getDateFieldValue

public java.util.Date getDateFieldValue(java.lang.String fieldDataStorageName)

setDateFieldValue

public void setDateFieldValue(java.lang.String fieldDataStorageName,
                              java.util.Date date)

setDataStorageName

public void setDataStorageName(java.lang.String dataStorageName)
Parameters:
dataStorageName - the dataStorageName to set

isCompleted

public boolean isCompleted()

sortPositionsOfDateFieldModels

public void sortPositionsOfDateFieldModels()

getDateFieldModels

public java.util.ArrayList<DateFieldModel> getDateFieldModels()

addField

public void addField(DateFieldModel dateFieldModel)

getComments

public java.lang.String getComments()
Returns:
the comments

setComments

public void setComments(java.lang.String comments)
Parameters:
comments - the comments to set

allowBlankFields

public boolean allowBlankFields()

setAllowBlankFields

public void setAllowBlankFields(boolean allowBlankFields)

enforceChronology

public boolean enforceChronology()

setEnforceChronology

public void setEnforceChronology(boolean enforceChronology)

getMaximumCommentLength

public int getMaximumCommentLength()

setMaximumCommentLength

public void setMaximumCommentLength(int maximumCommentLength)

print

public void print(java.io.PrintStream out)

detectTrialActivityChanges

public static java.util.ArrayList<TrialActivityChange> detectTrialActivityChanges(java.lang.String userID,
                                                                                  TrialActivityModel originalActivityModel,
                                                                                  TrialActivityModel revisedActivityModel,
                                                                                  java.lang.String dataSourceName)

validate

public static void validate(TrialActivityModel trialActivityModel)
                     throws CSTException
Throws:
CSTException

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object