macaw.businessLayer
Class SupportingDocument

java.lang.Object
  extended by macaw.businessLayer.SupportingDocument
All Implemented Interfaces:
java.lang.Cloneable, Displayable

public class SupportingDocument
extends java.lang.Object
implements Displayable, java.lang.Cloneable

describes a document used to provide background information about a derived variable.


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
SupportingDocument()
           
 
Method Summary
 java.lang.Object clone()
           
static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user, SupportingDocument originalDocument, SupportingDocument revisedDocument)
           
 java.lang.String getDescription()
          description of the document
 java.lang.String getDisplayItemIdentifier()
           
 java.lang.String getDisplayName()
           
 java.lang.String getDocumentCode()
          a code used to help uniquely identify a document for the end-user.
 java.lang.String getFileName()
          name of the file
 java.lang.String getFilePath()
          the logical location of the file
 int getIdentifier()
          the primary key value of the instance stored in the relational database.
 java.lang.String getTitle()
          title of the document
 boolean isNewRecord()
           
 void setDescription(java.lang.String description)
           
 void setDocumentCode(java.lang.String documentCode)
           
 void setFileName(java.lang.String fileName)
           
 void setFilePath(java.lang.String filePath)
           
 void setIdentifier(int identifier)
           
 void setIsNewRecord(boolean isNewRecord)
           
 void setTitle(java.lang.String title)
           
static void validateFields(SupportingDocument supportingDocument)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupportingDocument

public SupportingDocument()
Method Detail

getIdentifier

public int getIdentifier()
the primary key value of the instance stored in the relational database.


setIdentifier

public void setIdentifier(int identifier)

getTitle

public java.lang.String getTitle()
title of the document

Returns:
the title

setTitle

public void setTitle(java.lang.String title)
Parameters:
title - the title to set

getDocumentCode

public java.lang.String getDocumentCode()
a code used to help uniquely identify a document for the end-user. Two documents could have the same title but be published in different years or by different authors. The purpose of the code is simply to uniquely identify records in a list of displayed documents.

Returns:
the documentCode

setDocumentCode

public void setDocumentCode(java.lang.String documentCode)
Parameters:
documentCode - the documentCode to set

getDescription

public java.lang.String getDescription()
description of the document

Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

getFileName

public java.lang.String getFileName()
name of the file

Returns:
the fileName

setFileName

public void setFileName(java.lang.String fileName)
Parameters:
fileName - the fileName to set

getFilePath

public java.lang.String getFilePath()
the logical location of the file

Returns:
the filePath

setFilePath

public void setFilePath(java.lang.String filePath)
Parameters:
filePath - the filePath to set

isNewRecord

public boolean isNewRecord()

setIsNewRecord

public void setIsNewRecord(boolean isNewRecord)

validateFields

public static void validateFields(SupportingDocument supportingDocument)
                           throws MacawException
Throws:
MacawException

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

detectFieldChanges

public static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user,
                                                                       SupportingDocument originalDocument,
                                                                       SupportingDocument revisedDocument)