de.uplanet.lucy.server.scripting.groovy
Class NowClosure.NowTimestamp

java.lang.Object
  extended by java.util.Date
      extended by java.sql.Timestamp
          extended by de.uplanet.lucy.server.scripting.groovy.NowClosure.NowTimestamp
All Implemented Interfaces:
IDateTimeValueHolder, IValueHolder<java.util.Date>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>
Enclosing class:
NowClosure

public static final class NowClosure.NowTimestamp
extends java.sql.Timestamp
implements IDateTimeValueHolder

See Also:
Serialized Form

Method Summary
 NowClosure.NowTimestamp asDate()
          Get the current date, i.e. the instance in time with its UTC time part set to zero.
 NowClosure.NowTimestamp asTime()
          Get the current time, i.e. the instance in time with its UTC date set to zero 1970-01-01.
 java.lang.String getCanonicalLexicalRepresentation()
          Get the canonical lexical representation of this value according to it's datatype.
 java.lang.Object getRawValue()
          Get the raw data that this value holder holds.
 javax.xml.namespace.QName getType()
          The type of data this value holder holds.
 java.util.Date getValue()
          Get the data that this value holder holds.
 NowClosure.NowTimestamp getWithoutFractionalSeconds()
          Discard the fractional seconds.
 boolean hasValue()
          Check if this value holder currently holds data or not.
 
Methods inherited from class java.sql.Timestamp
after, before, compareTo, compareTo, equals, equals, getNanos, getTime, setNanos, setTime, toString, valueOf
 
Methods inherited from class java.util.Date
after, before, clone, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getType

public javax.xml.namespace.QName getType()
Description copied from interface: IValueHolder
The type of data this value holder holds.

Specified by:
getType in interface IValueHolder<java.util.Date>
Returns:
IxDatatype.DATETIME.

getValue

public java.util.Date getValue()
Description copied from interface: IValueHolder
Get the data that this value holder holds.

Implementations MUST ensure that multiple calls to this method will return values that equal each other.

Specified by:
getValue in interface IValueHolder<java.util.Date>
Returns:
The data.

getRawValue

public java.lang.Object getRawValue()
Description copied from interface: IValueHolder
Get the raw data that this value holder holds.

Specified by:
getRawValue in interface IValueHolder<java.util.Date>
Returns:
The raw data.

hasValue

public boolean hasValue()
Description copied from interface: IValueHolder
Check if this value holder currently holds data or not.

Specified by:
hasValue in interface IValueHolder<java.util.Date>
Returns:
true if the data holder holds data, or false otherwise.

getWithoutFractionalSeconds

public NowClosure.NowTimestamp getWithoutFractionalSeconds()
Discard the fractional seconds.

Returns:
The date/time with fractional seconds set to zero.

asDate

public NowClosure.NowTimestamp asDate()
Get the current date, i.e. the instance in time with its UTC time part set to zero.

Returns:
The current date.

asTime

public NowClosure.NowTimestamp asTime()
Get the current time, i.e. the instance in time with its UTC date set to zero 1970-01-01.

Returns:
The current time.

getCanonicalLexicalRepresentation

public java.lang.String getCanonicalLexicalRepresentation()
Description copied from interface: IValueHolder
Get the canonical lexical representation of this value according to it's datatype.

Specified by:
getCanonicalLexicalRepresentation in interface IValueHolder<java.util.Date>
Returns:
The canonical lexical representation of the current date.
See Also:
Convert.getCanonicalLexicalRepresentationDateTime(Date).


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.