org.jlf.dataMap
Class DateAttribute

java.lang.Object
  |
  +--org.jlf.dataMap.DataAttribute
        |
        +--org.jlf.dataMap.DateAttribute
All Implemented Interfaces:
java.io.Serializable

public class DateAttribute
extends DataAttribute

This class is used to hold a Java Date attribute.

See Also:
DataAttribute, DataAttributeDescriptor, Serialized Form

Field Summary
protected  java.lang.String dateFormatString
          Holds the date format string so the attribute can be properly date formatted when using the toString() method.
 
Fields inherited from class org.jlf.dataMap.DataAttribute
hasChanged, name, originalValue, value
 
Constructor Summary
DateAttribute()
          Default constructor.
DateAttribute(java.lang.String name)
          Normal attribute constructor.
 
Method Summary
 void basicSetValue(java.lang.Object newValue)
          Override for Date-specific behavior.
 void basicSetValue(java.lang.String dateString)
          Setter to convert a string to a date.
 java.lang.String getDateFormatString()
          Retrieves the default date format string.
 void setDateFormatString(java.lang.String dateFormatString)
          Resets the default date format string.
 java.lang.String toString()
          Overrides the default toString() method to output date in dateFormat format.
 
Methods inherited from class org.jlf.dataMap.DataAttribute
getDoubleValue, getLongValue, getName, getOriginalValue, getStringValue, getValue, hasChanged, resetAndSetValue, resetHasChanged, setName, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dateFormatString

protected java.lang.String dateFormatString
Holds the date format string so the attribute can be properly date formatted when using the toString() method.

Constructor Detail

DateAttribute

public DateAttribute()
Default constructor. Try to use the parameterized constructor with an attribute name to construct the attribute.


DateAttribute

public DateAttribute(java.lang.String name)
Normal attribute constructor.

Method Detail

getDateFormatString

public java.lang.String getDateFormatString()
Retrieves the default date format string.


setDateFormatString

public void setDateFormatString(java.lang.String dateFormatString)
Resets the default date format string.


basicSetValue

public void basicSetValue(java.lang.Object newValue)
Override for Date-specific behavior.

Overrides:
basicSetValue in class DataAttribute

basicSetValue

public void basicSetValue(java.lang.String dateString)
Setter to convert a string to a date.


toString

public java.lang.String toString()
Overrides the default toString() method to output date in dateFormat format.

Overrides:
toString in class DataAttribute