org.priha.core.values
Class CalendarValueImpl
java.lang.Object
org.priha.core.values.ValueImpl
org.priha.core.values.CalendarValueImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ValueImpl>, javax.jcr.Value
public class CalendarValueImpl
- extends ValueImpl
- implements javax.jcr.Value, java.io.Serializable
- See Also:
- Serialized Form
Method Summary |
static java.lang.String |
format(java.util.Date date)
Formats a date in the ISO 8601 format required by JCR. |
java.util.Calendar |
getDate()
|
double |
getDouble()
|
long |
getLong()
|
java.io.InputStream |
getStream()
By default, returns the inputstream of the String representation. |
java.lang.String |
getString()
|
int |
getType()
|
static java.util.Date |
parse(java.lang.String date)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jcr.Value |
getBoolean |
CalendarValueImpl
public CalendarValueImpl(java.util.Calendar c)
CalendarValueImpl
public CalendarValueImpl(java.lang.Double value)
throws javax.jcr.ValueFormatException
- Throws:
javax.jcr.ValueFormatException
CalendarValueImpl
public CalendarValueImpl(java.lang.Long value)
throws javax.jcr.ValueFormatException
- Throws:
javax.jcr.ValueFormatException
CalendarValueImpl
public CalendarValueImpl(java.lang.String value)
throws javax.jcr.ValueFormatException
- Throws:
javax.jcr.ValueFormatException
CalendarValueImpl
public CalendarValueImpl(CalendarValueImpl value)
getType
public int getType()
- Specified by:
getType
in interface javax.jcr.Value
format
public static java.lang.String format(java.util.Date date)
- Formats a date in the ISO 8601 format required by JCR.
- Parameters:
date
-
- Returns:
parse
public static java.util.Date parse(java.lang.String date)
throws javax.jcr.ValueFormatException
- Throws:
javax.jcr.ValueFormatException
getDate
public java.util.Calendar getDate()
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
- Specified by:
getDate
in interface javax.jcr.Value
- Overrides:
getDate
in class ValueImpl
- Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
getDouble
public double getDouble()
- Specified by:
getDouble
in interface javax.jcr.Value
- Overrides:
getDouble
in class ValueImpl
getLong
public long getLong()
- Specified by:
getLong
in interface javax.jcr.Value
- Overrides:
getLong
in class ValueImpl
getString
public java.lang.String getString()
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
- Specified by:
getString
in interface javax.jcr.Value
- Overrides:
getString
in class ValueImpl
- Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
getStream
public java.io.InputStream getStream()
- Description copied from class:
ValueImpl
- By default, returns the inputstream of the String representation.
- Specified by:
getStream
in interface javax.jcr.Value
- Overrides:
getStream
in class ValueImpl
toString
public java.lang.String toString()
- Overrides:
toString
in class ValueImpl