cst.common.businessLayer
Class AbstractFieldModel

java.lang.Object
  extended by cst.common.businessLayer.AbstractFieldModel
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DateFieldModel, TextFieldModel

public abstract class AbstractFieldModel
extends java.lang.Object
implements java.lang.Cloneable

Describes the common qualities of data fields used by both TrialSubjectModel and TrialActivityModel.

Each data field has at least two properties:

Consider the example of the primary key identifier field which is used in both TrialSubjectModel and TrialActivityModel classes. In the forms, the key field may be displayed as "NHS Number" in the forms, but the data storage name could be "identifier", "id" or "nhs_number". There may be a number of reasons why you may want these fields to have different names. Having spaces in a display name may make the field easier to read by people but MySQL does not allow spaces in the table field names.


 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
protected  java.lang.String dataStorageName
           
protected  java.lang.String displayName
           
 
Constructor Summary
AbstractFieldModel()
           
 
Method Summary
abstract  java.lang.Object clone()
          performs a deep copy of the field.
 java.lang.String getDataStorageName()
           
 java.lang.String getDisplayName()
           
abstract  void print(java.io.PrintStream out)
           
protected  void setCloneAttributes(AbstractFieldModel clonedFieldModel)
          a convenience method that helps the clone() implementations of subclasses.
 void setDataStorageName(java.lang.String dataStorageName)
           
 void setDisplayName(java.lang.String displayName)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displayName

protected java.lang.String displayName

dataStorageName

protected java.lang.String dataStorageName
Constructor Detail

AbstractFieldModel

public AbstractFieldModel()
Method Detail

print

public abstract void print(java.io.PrintStream out)

getDisplayName

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

setDisplayName

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

getDataStorageName

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

setDataStorageName

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

clone

public abstract java.lang.Object clone()
performs a deep copy of the field.

Overrides:
clone in class java.lang.Object

setCloneAttributes

protected void setCloneAttributes(AbstractFieldModel clonedFieldModel)
a convenience method that helps the clone() implementations of subclasses.

Parameters:
clonedFieldModel -