|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance rs.sol.soloist.server.uml.commonimplementation.runtime._DataTypeInstance rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfDataType rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfPrimitiveType rs.sol.soloist.server.builtindomains.builtindatatypes.DateTime
public class DateTime
Absolute date and time.
Nested Class Summary | |
---|---|
static class |
DateTime.AsDateTime
Encodes DateTime as SQL DATETIME (in UTC) |
static class |
DateTime.AsDateTimeLocal
Encodes DateTime as SQL DATETIME (in local timezone) |
static class |
DateTime.AsLong
|
static class |
DateTime.AsString
Encodes DateTime as yyyy-MM-dd HH:mm:ss.SSS in UTC |
static class |
DateTime.AsStringLocal
Encodes DateTime as yyyy-MM-dd HH:mm:ss.SSS in local timezone |
static class |
DateTime.DefaultSerializationHandler
|
Field Summary | |
---|---|
static IPrimitiveType |
CLASSIFIER
|
static java.lang.String |
FQ_TYPE_NAME
|
static java.lang.String |
MILLISECOND_RESOLUTION_PATTERN
|
static java.lang.String |
SECOND_RESOLUTION_PATTERN
|
static java.util.TimeZone |
UTC
|
Constructor Summary | |
---|---|
DateTime()
Now. |
|
DateTime(long timestamp)
|
Method Summary | |
---|---|
DateTime |
addCalendarField(int calendarField,
int amount)
|
boolean |
after(DateTime other)
|
boolean |
before(DateTime other)
|
boolean |
equals(java.lang.Object obj)
|
static DateTime |
fromCalendar(java.util.Calendar calendar)
|
static DateTime |
fromDate(java.util.Date date)
|
static DateTime |
fromDateAndTime(Date date,
Time time)
Date and time interpreted in given time zone |
static DateTime |
fromDateAndTime(Date date,
Time time,
java.util.TimeZone zone)
Date and time interpreted in given time zone |
static DateTime |
fromSerializable(java.io.Serializable ser)
TODO: use SerializationHandler |
static DateTime |
fromString(java.lang.String string)
|
static DateTime |
fromString(java.lang.String string,
java.util.TimeZone zone)
|
Date |
getDate()
|
Date |
getDate(java.util.TimeZone zone)
|
Time |
getTime()
|
Time |
getTime(java.util.TimeZone zone)
|
long |
getTimestamp()
|
java.util.Date |
getValue()
|
int |
hashCode()
|
boolean |
isEqualTo(IClassifierInstance ci)
Is this Classifier Instance equal to the given Classifier Instance? Semantic rules: 1. |
IClassifierInstance |
makeClone()
Clones this Classifier Instance. |
TimeInterval |
minus(DateTime other)
|
DateTime |
minus(TimeInterval interval)
|
DateTime |
minusDays(int days)
|
DateTime |
minusHours(int hours)
|
DateTime |
minusMilliseconds(int milliseconds)
|
DateTime |
minusMinutes(int minutes)
|
DateTime |
minusMonths(int months)
|
DateTime |
minusSeconds(int seconds)
|
DateTime |
minusYears(int years)
|
DateTime |
plus(TimeInterval interval)
|
DateTime |
plusDays(int days)
|
DateTime |
plusHours(int hours)
|
DateTime |
plusMilliseconds(int milliseconds)
|
DateTime |
plusMinutes(int minutes)
|
DateTime |
plusMonths(int months)
|
DateTime |
plusSeconds(int seconds)
|
DateTime |
plusYears(int years)
|
void |
setFieldsOnCalendar(java.util.Calendar cal)
|
java.util.Calendar |
toCalendar()
|
java.util.Calendar |
toCalendar(java.util.Locale locale)
|
java.util.Calendar |
toCalendar(java.util.TimeZone zone)
|
java.util.Calendar |
toCalendar(java.util.TimeZone zone,
java.util.Locale locale)
|
java.util.Date |
toDate()
|
java.lang.String |
toString()
|
java.lang.String |
toString(java.util.TimeZone zone)
|
java.lang.String |
toStringMilliseconds()
|
java.lang.String |
toStringMilliseconds(java.util.TimeZone zone)
|
java.lang.String |
toStringSeconds()
|
java.lang.String |
toStringSeconds(java.util.TimeZone zone)
|
java.sql.Timestamp |
toTimestamp()
|
Methods inherited from class rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfPrimitiveType |
---|
accept, accept, getSQLString, toSerializable |
Methods inherited from class rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance |
---|
addAttributeValue, getAttributeValue, getDataType, getMyID, getSlot, getSlots, setDataType, setMyID |
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._DataTypeInstance |
---|
getClassifier, hasIdentity, isClassInstance, isDataTypeInstance, isMarkedAsDeleted, markAsDeleted |
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance |
---|
conformsTo, constructor, copySlots, copySlots, destroy, destructor, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMElement, getSlot, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isKindOf, isModelElement, isRTElement |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IDataTypeInstance |
---|
getDataType |
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IClassifierInstance |
---|
conformsTo, constructor, copySlots, copySlots, destroy, destructor, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getClassifier, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMyID, getSlot, getSlot, getSlot, getSlot, getSlots, isClassInstance, isDataTypeInstance, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isMarkedAsDeleted, markAsDeleted |
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IRTElement |
---|
getMElement, hasIdentity |
Methods inherited from interface rs.sol.soloist.server.uml.concepts.IElement |
---|
isKindOf, isModelElement, isRTElement |
Field Detail |
---|
public static final java.lang.String FQ_TYPE_NAME
public static final IPrimitiveType CLASSIFIER
public static final java.lang.String SECOND_RESOLUTION_PATTERN
public static final java.lang.String MILLISECOND_RESOLUTION_PATTERN
public static final java.util.TimeZone UTC
Constructor Detail |
---|
public DateTime()
public DateTime(long timestamp)
Method Detail |
---|
public boolean isEqualTo(IClassifierInstance ci) throws rs.sol.soloist.server.uml.exceptions.RequestFailedException
IClassifierInstance
isEqualTo
in interface IClassifierInstance
isEqualTo
in class rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
rs.sol.soloist.server.uml.exceptions.RequestFailedException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static DateTime fromCalendar(java.util.Calendar calendar)
public static DateTime fromDate(java.util.Date date)
public java.util.Calendar toCalendar()
public java.util.Calendar toCalendar(java.util.TimeZone zone)
public java.util.Calendar toCalendar(java.util.Locale locale)
public java.util.Calendar toCalendar(java.util.TimeZone zone, java.util.Locale locale)
public void setFieldsOnCalendar(java.util.Calendar cal)
public DateTime addCalendarField(int calendarField, int amount)
public java.util.Date toDate()
public java.sql.Timestamp toTimestamp()
public IClassifierInstance makeClone() throws rs.sol.soloist.server.uml.exceptions.ActionExecutionFailedException
IClassifierInstance
rs.sol.soloist.server.uml.exceptions.ActionExecutionFailedException
public long getTimestamp()
public java.lang.String toString()
toString
in interface IDataTypeInstance
toString
in class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
public java.lang.String toString(java.util.TimeZone zone)
public java.lang.String toStringMilliseconds()
public java.lang.String toStringMilliseconds(java.util.TimeZone zone)
public java.lang.String toStringSeconds()
public java.lang.String toStringSeconds(java.util.TimeZone zone)
public static DateTime fromString(java.lang.String string)
string
- - yyyy-MM-dd HH:mm:ss.SSS (in local timezone)public static DateTime fromString(java.lang.String string, java.util.TimeZone zone)
string
- - yyyy-MM-dd HH:mm:ss.SSS or yyyy-MM-dd HH:mm:ss (in given timezone)public Date getDate()
public Date getDate(java.util.TimeZone zone)
public Time getTime()
public Time getTime(java.util.TimeZone zone)
public static DateTime fromDateAndTime(Date date, Time time)
public static DateTime fromDateAndTime(Date date, Time time, java.util.TimeZone zone)
public DateTime plus(TimeInterval interval)
public DateTime minus(TimeInterval interval)
public TimeInterval minus(DateTime other)
public DateTime plusYears(int years)
public DateTime minusYears(int years)
public DateTime plusMonths(int months)
public DateTime minusMonths(int months)
public DateTime plusDays(int days)
public DateTime minusDays(int days)
public DateTime plusHours(int hours)
public DateTime minusHours(int hours)
public DateTime plusMinutes(int minutes)
public DateTime minusMinutes(int minutes)
public DateTime plusSeconds(int seconds)
public DateTime minusSeconds(int seconds)
public DateTime plusMilliseconds(int milliseconds)
public DateTime minusMilliseconds(int milliseconds)
public java.util.Date getValue()
getValue
in interface IPrimitiveTypeInstance
getValue
in class InstanceOfPrimitiveType
public static DateTime fromSerializable(java.io.Serializable ser)
public boolean before(DateTime other)
public boolean after(DateTime other)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |