macaw.businessLayer
Class ValueLabel

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

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

describes an answer to a survey question


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)

Nested Class Summary
static class ValueLabel.EditingOperationType
           
 
Constructor Summary
ValueLabel()
           
 
Method Summary
 java.lang.Object clone()
           
static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user, Variable ownerVariable, ValueLabel originalValueLabel, ValueLabel revisedValueLabel)
           
static boolean differencesExist(User user, Variable ownerVariable, ValueLabel originalValueLabel, ValueLabel revisedValueLabel)
           
 java.lang.String getDisplayItemIdentifier()
           
 java.lang.String getDisplayName()
           
 ValueLabel.EditingOperationType getEditingOperationType()
           
 int getIdentifier()
           
 java.lang.String getLabel()
           
 java.lang.String getValue()
           
 boolean hasSameDisplayName(ValueLabel valueLabel)
           
 boolean isDeletedNewRecord()
           
 boolean isDeletedRecord()
           
 boolean isEditingExistingRecord()
           
 boolean isMissingValue()
           
 boolean isNewRecord()
           
 void setEditingOperationType(ValueLabel.EditingOperationType editingOperationType)
           
 void setIdentifier(int identifier)
           
 void setLabel(java.lang.String label)
           
 void setMissingValue(boolean isMissingValue)
           
 void setValue(java.lang.String value)
           
static void validateFields(ValueLabel valueLabel)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueLabel

public ValueLabel()
Method Detail

getIdentifier

public int getIdentifier()
Returns:
the identifier

setIdentifier

public void setIdentifier(int identifier)
Parameters:
identifier - the identifier to set

getValue

public java.lang.String getValue()
Returns:
the value

setValue

public void setValue(java.lang.String value)
Parameters:
value - the value to set

getLabel

public java.lang.String getLabel()
Returns:
the label

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - the label to set

isMissingValue

public boolean isMissingValue()
Returns:
the isMissingValue

setMissingValue

public void setMissingValue(boolean isMissingValue)
Parameters:
isMissingValue - the isMissingValue to set

setEditingOperationType

public void setEditingOperationType(ValueLabel.EditingOperationType editingOperationType)

getEditingOperationType

public ValueLabel.EditingOperationType getEditingOperationType()

isNewRecord

public boolean isNewRecord()

isEditingExistingRecord

public boolean isEditingExistingRecord()

isDeletedNewRecord

public boolean isDeletedNewRecord()

isDeletedRecord

public boolean isDeletedRecord()

hasSameDisplayName

public boolean hasSameDisplayName(ValueLabel valueLabel)

validateFields

public static void validateFields(ValueLabel valueLabel)
                           throws MacawException
Throws:
MacawException

differencesExist

public static boolean differencesExist(User user,
                                       Variable ownerVariable,
                                       ValueLabel originalValueLabel,
                                       ValueLabel revisedValueLabel)

detectFieldChanges

public static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user,
                                                                       Variable ownerVariable,
                                                                       ValueLabel originalValueLabel,
                                                                       ValueLabel revisedValueLabel)

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