Class AttributeDateTimeValue
java.lang.Object
com.aquima.interactions.foundation.types.AbstractValue
com.aquima.interactions.foundation.types.DateValue
com.aquima.interactions.foundation.types.DateTimeValue
com.aquima.interactions.profile.model.value.AttributeDateTimeValue
- All Implemented Interfaces:
IConvertable
,IPrimitiveValue
,ISingleValue
,IValue
,Serializable
,Comparable<Object>
Profile value object for the datetime type.
This class is introduced to provide more information (attribute/instance) in case of a ConversionException.
- Since:
- 7.0
- Author:
- Jon van Leuven
- See Also:
-
Field Summary
Fields inherited from class com.aquima.interactions.foundation.types.DateTimeValue
UNKNOWN
Fields inherited from class com.aquima.interactions.foundation.types.DateValue
ISO8601_CUSTOM_LOCAL_DATE_TIME, MILLISECONDS_PER_DAY, MILLISECONDS_PER_HOUR, MILLISECONDS_PER_MINUTE, MILLISECONDS_PER_SECOND
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AttributeDateTimeValue
(DateTimeValue delegateValue, ValueReference reference) Construct an attribute value based on a value and an attribute reference. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This method converts the internal value to a boolean primitive.This method converts the internal value to a date object.double
This method converts the internal value to a double primitive.int
This method converts the internal value to an integer primitive.long
This method converts the internal value to a long primitive.Format this DateTimeValue to a String in the format 'yyyy-MM-ddTHH:mm:ss'.This method will attempt to convert the value to a range value.This method will attempt to convert the value to a single value.Methods inherited from class com.aquima.interactions.foundation.types.DateTimeValue
createNow, duplicate, forType, getDataType, getHour, getMillisecond, getMinute, getSecond, parseDateTime, toString, valueOf
Methods inherited from class com.aquima.interactions.foundation.types.DateValue
compareSimple, contains, createFor, createToday, daysBefore, equals, finalize, getDayOfMonth, getDayOfWeek, getLeanDateFormat, getMonthOfYear, getValue, getWeekOfYear, getYear, hashCode, hourOfDay, hoursBefore, isUnknown, millisBefore, millisecond, minute, minutesBefore, monthsBefore, now, parseDate, second, secondsBefore, toDateTimeValue, toDateValue, toISO8601, weeksBefore, withDays, withHours, withMilliseconds, withMinutes, withMonths, withSeconds, withWeeks, withYears, workingDaysBetween, workingDaysBetween, yearsBefore
Methods inherited from class com.aquima.interactions.foundation.types.AbstractValue
compareTo, getDisplayValue, getTypeName, isRangeValue, isSingleValue, toListValue
-
Constructor Details
-
AttributeDateTimeValue
Construct an attribute value based on a value and an attribute reference.- Parameters:
delegateValue
- The original value.reference
- The reference to the attribute of an instance that has this value.
-
-
Method Details
-
booleanValue
public boolean booleanValue()Description copied from interface:IConvertable
This method converts the internal value to a boolean primitive.- Specified by:
booleanValue
in interfaceIConvertable
- Overrides:
booleanValue
in classDateValue
- Returns:
- Boolean primitive of the internal value.
-
dateValue
Description copied from interface:IConvertable
This method converts the internal value to a date object.- Specified by:
dateValue
in interfaceIConvertable
- Overrides:
dateValue
in classDateValue
- Returns:
- Date object of the internal value.
-
doubleValue
public double doubleValue()Description copied from interface:IConvertable
This method converts the internal value to a double primitive.- Specified by:
doubleValue
in interfaceIConvertable
- Overrides:
doubleValue
in classDateValue
- Returns:
- Double primitive of the internal value.
-
integerValue
public int integerValue()Description copied from interface:IConvertable
This method converts the internal value to an integer primitive.- Specified by:
integerValue
in interfaceIConvertable
- Overrides:
integerValue
in classDateValue
- Returns:
- Integer primitive of the internal value.
-
longValue
public long longValue()Description copied from interface:IConvertable
This method converts the internal value to a long primitive.- Specified by:
longValue
in interfaceIConvertable
- Overrides:
longValue
in classDateValue
- Returns:
- Long primitive of the internal value.
-
stringValue
Description copied from class:DateTimeValue
Format this DateTimeValue to a String in the format 'yyyy-MM-ddTHH:mm:ss'.- Dates are always formatted using the (proleptic) Gregorian calendar rules. Before 17.0, dates before 1582-10-15 where formatted using the Julian calendar rules.
- The system default timezone is used.
- Specified by:
stringValue
in interfaceIConvertable
- Overrides:
stringValue
in classDateTimeValue
- Returns:
- A String representation of this DateTimeValue
-
toRangeValue
Description copied from interface:IValue
This method will attempt to convert the value to a range value. The conversion might fail and raise an exception when the value this method is called on is either a list value. The method isRangeValue can be used to determine if this value can safely be converted to a range value. When the value this method is called on already implements the IRangeValue interface, the implementation may return the same value.- Specified by:
toRangeValue
in interfaceIValue
- Overrides:
toRangeValue
in classAbstractValue
- Returns:
- The same value as a range value.
-
toSingleValue
Description copied from interface:IValue
This method will attempt to convert the value to a single value. The conversion might fail and raise an exception when the value this method is called on is either a range or a list value. The method isSingleValue can be used to determine if this value can safely be converted to a single value. When the value this method is called on already implements the ISingleValue interface, the implementation may return the same value.- Specified by:
toSingleValue
in interfaceIValue
- Overrides:
toSingleValue
in classAbstractValue
- Returns:
- The same value as single value.
-