com.sap.mdm.valuetypes
Class DateTimeValue

java.lang.Object
  extended bycom.sap.mdm.valuetypes.AbstractMdmValue
      extended bycom.sap.mdm.valuetypes.AbstractImmutableMdmValue
          extended bycom.sap.mdm.valuetypes.DateTimeValue
All Implemented Interfaces:
Cloneable, Comparable, MdmValue

public class DateTimeValue
extends AbstractImmutableMdmValue

This class represents MDM date and/or time value.


Nested Class Summary
 
Nested classes inherited from class com.sap.mdm.valuetypes.MdmValue
MdmValue.Type
 
Field Summary
static int DATE_FORMAT_TYPE
           
static int DATE_TIME_FORMAT_TYPE
           
static int TIME_FORMAT_TYPE
           
 
Constructor Summary
DateTimeValue(Calendar value)
          Constructs with the specified parameter.
DateTimeValue(Calendar value, int formatType)
          Constructs with the specified parameter.
 
Method Summary
 int compareTo(MdmValue otherValue)
          Compares two MdmValue.
 boolean equals(Object obj)
           
 Date getDate()
           
 int getDay()
           
 int getDayOfWeek()
           
 int getFormatType()
          Returns format type
 int getHour()
           
 int getMilliseconds()
           
 int getMinute()
           
 int getMonth()
           
 int getSeconds()
           
 com.sap.mdm.internal.util.CompressedSystemTime getSystemTime()
          Deprecated. since 7.1.04
 int getType()
          Get type of MdmValue instance.
 int getYear()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class com.sap.mdm.valuetypes.AbstractImmutableMdmValue
clone
 
Methods inherited from class com.sap.mdm.valuetypes.AbstractMdmValue
compareTo, isMultiregion, isMultivalue, isNull
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DATE_TIME_FORMAT_TYPE

public static final int DATE_TIME_FORMAT_TYPE
See Also:
Constant Field Values

DATE_FORMAT_TYPE

public static final int DATE_FORMAT_TYPE
See Also:
Constant Field Values

TIME_FORMAT_TYPE

public static final int TIME_FORMAT_TYPE
See Also:
Constant Field Values
Constructor Detail

DateTimeValue

public DateTimeValue(Calendar value,
                     int formatType)
Constructs with the specified parameter.

Note:

The time zone from Calendar is completely ignored.

Parameters:
value - the value to set to

DateTimeValue

public DateTimeValue(Calendar value)
Constructs with the specified parameter.

Note:

The time zone from Calendar is completely ignored.

Parameters:
value - the value to set to
Method Detail

getType

public int getType()
Description copied from interface: MdmValue
Get type of MdmValue instance. For MdmMultiValue instance this type specify type of multi-value elements Constants for MdmValue types are specified in this interface

Specified by:
getType in interface MdmValue
Specified by:
getType in class AbstractMdmValue

getFormatType

public int getFormatType()
Returns format type


getSystemTime

public com.sap.mdm.internal.util.CompressedSystemTime getSystemTime()
Deprecated. since 7.1.04

Returns system time

Returns:
system time

getYear

public int getYear()

getMonth

public int getMonth()

getDay

public int getDay()

getHour

public int getHour()

getMinute

public int getMinute()

getSeconds

public int getSeconds()

getMilliseconds

public int getMilliseconds()

getDayOfWeek

public int getDayOfWeek()

getDate

public Date getDate()

equals

public boolean equals(Object obj)
Overrides:
equals in class AbstractMdmValue
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public String toString()
See Also:
Object.toString()

compareTo

public int compareTo(MdmValue otherValue)
Description copied from class: AbstractMdmValue
Compares two MdmValue.

Specified by:
compareTo in class AbstractMdmValue
Parameters:
otherValue - the MdmValue to be compared.
Returns:
the value 0 if the argument is a MdmValue is equal to this MdmValue; the value is less than 0 if this MdmValue is less than the argument MdmValue; the value is greater than 0 if this MdmValue is greater than the argument MdmValue;


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.