org.openeai.moa.objects.resources
Class Date

java.lang.Object
  extended by org.openeai.OpenEaiObject
      extended by org.openeai.moa.EnterpriseObjectBase
          extended by org.openeai.moa.XmlEnterpriseObjectImpl
              extended by org.openeai.moa.objects.resources.Date
All Implemented Interfaces:
java.lang.Cloneable, EnterpriseObject, XmlEnterpriseObject, PubliclyCloneable

public class Date
extends XmlEnterpriseObjectImpl
implements XmlEnterpriseObject, PubliclyCloneable

A Class that wraps the Date element as specified in the OpenEAI protocol.

Version:
3.0 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)

Field Summary
 
Fields inherited from class org.openeai.moa.XmlEnterpriseObjectImpl
ENTERPRISE_FIELDS, XML_LAYOUT_MANAGER
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
Date(java.lang.String type)
          Constructor for a Date of a specific type.
 
Method Summary
 java.lang.Object clone()
          Performs a recursive field for field copy of the current Object and returns the result.
 java.lang.String getDay()
          Returns the day component of this date.
 java.lang.String getMonth()
          Returns the month component of this date.
 java.lang.String getType()
          Returns the type for this date.
 java.lang.String getYear()
          Returns the year component of this date.
 void setDay(java.lang.String day)
          Sets the day component of this date.
 void setMonth(java.lang.String month)
          Sets the month component of this date.
 void setYear(java.lang.String year)
          Sets the year component of this date.
 java.util.Date toDate()
          Returns the state of this date object as a new java.util.Date instance.
 java.lang.String toString()
          Returns a string representation of this date.
 
Methods inherited from class org.openeai.moa.XmlEnterpriseObjectImpl
addInputLayoutManager, addOutputLayoutManager, buildObjectFromInput, buildObjectFromXmlString, buildOutputFromObject, buildOutputFromObject, deferInitialization, dumpData, equals, getApplicationValue, getBaseline, getCombinedKeyValue, getControlArea, getCreateDoc, getCreateDocUri, getCreateSyncDoc, getCreateSyncDocUri, getDeleteDoc, getDeleteDocUri, getDeleteSyncDoc, getDeleteSyncDocUri, getEnterpriseFields, getEnterpriseValue, getGenerateDoc, getGenerateDocUri, getGenerateSyncDoc, getGenerateSyncDocUri, getInputLayoutManager, getInputLayoutManager, getInputLayoutManagers, getLength, getOutputLayoutManager, getOutputLayoutManager, getOutputLayoutManagers, getProvideDoc, getProvideDocUri, getQueryDoc, getQueryDocUri, getResponseDoc, getResponseDocUri, getRootElementName, getTestId, getUpdateDoc, getUpdateDocUri, getUpdateSyncDoc, getUpdateSyncDocUri, getValidation, getValueFromObject, getValueFromObject, init, initializeChild, isDate, isEmpty, isRepeating, restoreLayoutManagers, saveLayoutManagers, setBaseline, setCreateDoc, setCreateDocUri, setCreateSyncDoc, setCreateSyncDocUri, setDeleteDoc, setDeleteDocUri, setDeleteSyncDoc, setDeleteSyncDocUri, setEnterpriseFields, setGenerateDoc, setGenerateDocUri, setGenerateSyncDoc, setGenerateSyncDocUri, setInputLayoutManager, setInputLayoutManagers, setOutputLayoutManager, setOutputLayoutManagers, setProvideDoc, setProvideDocUri, setQueryDoc, setQueryDocUri, setResponseDoc, setResponseDocUri, setTestId, setUpdateDoc, setUpdateDocUri, setUpdateSyncDoc, setUpdateSyncDocUri, setValidation, setValue, toXmlString
 
Methods inherited from class org.openeai.OpenEaiObject
getAppName, getDebug, getFromAddr, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openeai.moa.XmlEnterpriseObject
addInputLayoutManager, addOutputLayoutManager, buildObjectFromInput, buildObjectFromXmlString, buildOutputFromObject, buildOutputFromObject, equals, getBaseline, getCombinedKeyValue, getCreateDoc, getCreateSyncDoc, getDeleteDoc, getDeleteSyncDoc, getEnterpriseFields, getGenerateDoc, getGenerateSyncDoc, getInputLayoutManager, getInputLayoutManager, getInputLayoutManagers, getOutputLayoutManager, getOutputLayoutManager, getOutputLayoutManagers, getProvideDoc, getQueryDoc, getResponseDoc, getTestId, getUpdateDoc, getUpdateSyncDoc, getValidation, getValueFromObject, getValueFromObject, initializeChild, isDate, isEmpty, setBaseline, setCreateDoc, setCreateSyncDoc, setDeleteDoc, setDeleteSyncDoc, setEnterpriseFields, setGenerateDoc, setGenerateSyncDoc, setInputLayoutManager, setInputLayoutManagers, setOutputLayoutManager, setOutputLayoutManagers, setProvideDoc, setQueryDoc, setResponseDoc, setTestId, setUpdateDoc, setUpdateSyncDoc, toXmlString
 

Constructor Detail

Date

public Date(java.lang.String type)
Constructor for a Date of a specific type.

Parameters:
type - the type of the date (e.g., TerminationDate)
Method Detail

getType

public java.lang.String getType()
Returns the type for this date.


getDay

public java.lang.String getDay()
Returns the day component of this date.


setDay

public void setDay(java.lang.String day)
            throws EnterpriseFieldException
Sets the day component of this date.

Parameters:
day - the new value of the day component for this date
Throws:
EnterpriseFieldException

getMonth

public java.lang.String getMonth()
Returns the month component of this date.


setMonth

public void setMonth(java.lang.String month)
              throws EnterpriseFieldException
Sets the month component of this date.

Parameters:
month - the new month component for this date
Throws:
EnterpriseFieldException

getYear

public java.lang.String getYear()
Returns the year component of this date.


setYear

public void setYear(java.lang.String year)
             throws EnterpriseFieldException
Sets the year component of this date.

Parameters:
year - the new year component for this date
Throws:
EnterpriseFieldException

toString

public java.lang.String toString()
Returns a string representation of this date.

Specified by:
toString in interface XmlEnterpriseObject
Overrides:
toString in class XmlEnterpriseObjectImpl
Returns:
String

toDate

public java.util.Date toDate()
                      throws InvalidFormatException
Returns the state of this date object as a new java.util.Date instance.

Throws:
InvalidFormatException

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
Description copied from interface: XmlEnterpriseObject
Performs a recursive field for field copy of the current Object and returns the result. Any object found that supports the "clone" method is cloned. Since all simple fields within an XmlEnterpriseObjectImpl are ultimately Strings, the resulting object is in fact a new object because the copy is recursive.

Specified by:
clone in interface XmlEnterpriseObject
Specified by:
clone in interface PubliclyCloneable
Overrides:
clone in class XmlEnterpriseObjectImpl
Returns:
XmlEnterpriseObject a "deep" copy of the object.
Throws:
java.lang.CloneNotSupportedException


Copyright © 2002,2003 OpenEAI Software Foundation