net.datacrow.core.objects
Class DcValue

java.lang.Object
  extended by net.datacrow.core.objects.DcValue
All Implemented Interfaces:
java.io.Serializable

public class DcValue
extends java.lang.Object
implements java.io.Serializable

The value class represents a field value. It knows when it has been changed.

Author:
Robert Jan van der Waals
See Also:
Serialized Form

Constructor Summary
DcValue()
           
 
Method Summary
 void clear()
          Clears the value and sets it to null.
protected  void finalize()
           
 java.lang.String getDisplayString(DcField field)
           
 java.lang.Object getValue()
           
 java.lang.String getValueAsString()
          Creates a string representation.
 boolean isChanged()
          Indicates if the value has been changed.
 void setChanged(boolean b)
          Marks the value as changed.
 void setValue(java.lang.Object o, DcField field)
          Sets the new value for this object.
 void setValueLowLevel(java.lang.Object newValue, DcField field)
          Bypasses all checks and sets the value directly.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DcValue

public DcValue()
Method Detail

isChanged

public boolean isChanged()
Indicates if the value has been changed.

Returns:

setChanged

public void setChanged(boolean b)
Marks the value as changed.

Parameters:
b -

setValueLowLevel

public void setValueLowLevel(java.lang.Object newValue,
                             DcField field)
Bypasses all checks and sets the value directly.

Parameters:
newValue - The new value to be used.
field - The field for which the value is set.

setValue

public void setValue(java.lang.Object o,
                     DcField field)
Sets the new value for this object.

Parameters:
o - The new value.
field - The field for which the value is set.

clear

public void clear()
Clears the value and sets it to null.

Parameters:
nochecks - Just do it, do not check whether we are dealing with an edited item

getValue

public java.lang.Object getValue()

getValueAsString

public java.lang.String getValueAsString()
Creates a string representation.


getDisplayString

public java.lang.String getDisplayString(DcField field)

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable