org.openeai.moa.objects.resources
Class Datetime
java.lang.Object
org.openeai.OpenEaiObject
org.openeai.moa.EnterpriseObjectBase
org.openeai.moa.XmlEnterpriseObjectImpl
org.openeai.moa.objects.resources.Datetime
- All Implemented Interfaces:
- java.lang.Cloneable, EnterpriseObject, XmlEnterpriseObject, PubliclyCloneable
public class Datetime
- extends XmlEnterpriseObjectImpl
- implements XmlEnterpriseObject
A Class that wraps the Datetime element as specified in
the OpenEAI protocol.
- Version:
- 3.0 - 28 January 2003
- Author:
- Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
|
Constructor Summary |
Datetime()
Constructor - get the current system time and populate this object appropriately. |
Datetime(java.util.Date aDate)
Constructor - use the Date passed in to populate this object appropriately. |
Datetime(org.jdom.Element eDatetime)
Constructor - use the element passed in to build the Datetime object. |
Datetime(java.lang.String type)
Constructor - set the Datetime 'type' to be that which is passed in and then
instantiate a normal Datetime object. |
Datetime(java.lang.String type,
java.util.Date date)
Constructor - set the Datetime 'type' to be that which is passed in (for the same
reasons as outlined in the String-only constructor) and then instantiate a
Datetime object initial values indicative of the java.util.Date
passed in. |
Datetime(java.lang.String type,
long time)
Constructor - set the Datetime 'type' to be that which is passed in (for the same
reasons as outlined in the String-only constructor) and then instantiate a
Datetime object initial values indicative of the long time in milliseconds
passed in. |
|
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()
|
java.lang.String |
getHour()
|
java.lang.String |
getMinute()
|
java.lang.String |
getMonth()
|
java.lang.String |
getSecond()
|
java.lang.String |
getSubSecond()
|
java.lang.String |
getTimezone()
|
java.lang.String |
getType()
Returns the type of Datetime element this is. |
java.lang.String |
getYear()
|
void |
setDay(java.lang.String day)
|
void |
setHour(java.lang.String hour)
|
void |
setMinute(java.lang.String minute)
|
void |
setMonth(java.lang.String month)
|
void |
setSecond(java.lang.String second)
|
void |
setSubSecond(java.lang.String subSecond)
|
void |
setTimezone(java.lang.String timezone)
|
void |
setYear(java.lang.String year)
|
java.lang.String |
toString()
Creates a String object out of the current contents of the object
and returns a concatenated string representing that information. |
| 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 |
Datetime
public Datetime(org.jdom.Element eDatetime)
throws EnterpriseLayoutException
- Constructor - use the element passed in to build the Datetime object.
- Throws:
EnterpriseLayoutException
Datetime
public Datetime()
- Constructor - get the current system time and populate this object appropriately.
Datetime
public Datetime(java.util.Date aDate)
- Constructor - use the Date passed in to populate this object appropriately.
Datetime
public Datetime(java.lang.String type)
- Constructor - set the Datetime 'type' to be that which is passed in and then
instantiate a normal Datetime object. This is needed because the Datetime element
as specified in the OpenEAI protocol is a defined "domain" just like the Date element.
Therefore, it may be necessary to instantiate a Datetime object of a certain type
depending on the element that corresponds to this Datetime object in a message definition.
This is to avoid having to maintain multiple versions of the Datetime object, one for
each element of type Datetime. Example, the StartDatetime element is a Datetime but we
don't have to maintain a StartDatetime Java object. Developers just instantiate a Datetime
object and pass the "StartDatetime" type to this constructor.
Datetime
public Datetime(java.lang.String type,
java.util.Date date)
- Constructor - set the Datetime 'type' to be that which is passed in (for the same
reasons as outlined in the String-only constructor) and then instantiate a
Datetime object initial values indicative of the java.util.Date
passed in. This is needed, because one frequently wants to instatiate
a date with some other value than the current system time.
Datetime
public Datetime(java.lang.String type,
long time)
- Constructor - set the Datetime 'type' to be that which is passed in (for the same
reasons as outlined in the String-only constructor) and then instantiate a
Datetime object initial values indicative of the long time in milliseconds
passed in. This is needed, because one frequently wants to instatiate
a date with some other value than the current system time.
getType
public java.lang.String getType()
- Returns the type of Datetime element this is. The type is defined during construction.
getYear
public java.lang.String getYear()
setYear
public void setYear(java.lang.String year)
getMonth
public java.lang.String getMonth()
setMonth
public void setMonth(java.lang.String month)
getDay
public java.lang.String getDay()
setDay
public void setDay(java.lang.String day)
getHour
public java.lang.String getHour()
setHour
public void setHour(java.lang.String hour)
getMinute
public java.lang.String getMinute()
setMinute
public void setMinute(java.lang.String minute)
getSecond
public java.lang.String getSecond()
setSecond
public void setSecond(java.lang.String second)
getSubSecond
public java.lang.String getSubSecond()
setSubSecond
public void setSubSecond(java.lang.String subSecond)
getTimezone
public java.lang.String getTimezone()
setTimezone
public void setTimezone(java.lang.String timezone)
toString
public java.lang.String toString()
- Creates a String object out of the current contents of the object
and returns a concatenated string representing that information.
- Specified by:
toString in interface XmlEnterpriseObject- Overrides:
toString in class XmlEnterpriseObjectImpl
- Returns:
- String the concatenated string created from the contents
of this object (YY-MM-DD HH:MM:SS:SSS GMT).
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