|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.impl.AbstractModelElement | +--org.joda.property.impl.AbstractProperty | +--org.joda.property.impl.type.AbstractDateTimeProperty
Abstract class useful for Date and Time property implementations.
Nested Class Summary |
Nested classes inherited from class org.joda.property.Property |
Property.Internal |
Field Summary | |
protected static long |
JAN_1ST_10000
|
protected static long |
JAN_1ST_1583
|
protected static long |
MILLIS_PER_DAY
|
protected static long |
MILLIS_PER_HOUR
|
protected static long |
MILLIS_PER_MINUTE
|
protected static long |
MILLIS_PER_SECOND
|
protected static long |
MILLIS_PER_WEEK
|
Constructor Summary | |
AbstractDateTimeProperty()
Constructor |
Method Summary | |
void |
add(org.joda.time.DateTimeField field,
int value)
|
void |
add(java.lang.Object object)
|
void |
addDays(int days)
|
void |
addHours(int hours)
|
void |
addMillis(long millis)
|
void |
addMillisOfSecond(int milliseconds)
|
void |
addMinutes(int minutes)
|
void |
addMonths(int months)
|
void |
addSeconds(int seconds)
|
void |
addWeeks(int weeks)
|
void |
addWrapped(org.joda.time.DateTimeField field,
int value)
|
void |
addWrappedDayOfMonth(int days)
|
void |
addWrappedDayOfWeek(int days)
|
void |
addWrappedDayOfYear(int days)
|
void |
addWrappedHourOfDay(int hours)
|
void |
addWrappedMillisOfSecond(int millis)
|
void |
addWrappedMinuteOfHour(int minutes)
|
void |
addWrappedMonthOfYear(int months)
|
void |
addWrappedSecondOfMinute(int seconds)
|
void |
addWrappedYear(int years)
|
void |
addYears(int years)
|
int |
compareTo(java.lang.Object object)
|
protected org.joda.time.DateTime |
convertObjectToDate(java.lang.Object object)
Convert an Object to a DateTime representing the time, throwing an exception if unable to convert. |
protected org.joda.time.DateTime |
convertObjectToDateTime(java.lang.Object object)
Convert an Object to a DateTime representing the datetime, throwing an exception if unable to convert. |
protected org.joda.time.DateTime |
convertObjectToTime(java.lang.Object object)
Convert an Object to a DateTime representing the time, throwing an exception if unable to convert. |
org.joda.time.DateTime |
get()
|
int |
get(org.joda.time.DateTimeField field)
|
org.joda.time.Chronology |
getChronology()
Gets the chronology of the instant, ISO. |
org.joda.time.DateTimeZone |
getDateTimeZone()
|
int |
getDayOfMonth()
|
int |
getDayOfWeek()
|
int |
getDayOfYear()
|
int |
getHourOfDay()
|
protected org.joda.time.DateTime |
getInternal()
Get the current immutable datetime object underlying this property. |
long |
getMillis()
|
int |
getMillisOfSecond()
|
int |
getMinuteOfHour()
|
int |
getMonthOfYear()
|
java.lang.Class |
getPropertyType()
Get the type of the property. |
int |
getSecondOfMinute()
|
int |
getWeekOfWeekyear()
|
int |
getWeekyear()
|
int |
getYear()
|
protected long |
getZeroedMillis()
Get the millis, or zero if currently null |
boolean |
isAfter(org.joda.time.ReadableInstant datetime)
Is the current property value after the time passed in |
boolean |
isBefore(org.joda.time.ReadableInstant datetime)
Is the current property value before the time passed in |
boolean |
isEqual(org.joda.time.ReadableInstant datetime)
Is the current property value equal the time passed in |
java.lang.Class |
propertyType()
Get the type of the property |
void |
set(org.joda.time.DateTimeField field,
int value)
|
void |
set(java.lang.Object propertyValue)
Set the property's value as an object. |
void |
setDate(int year,
int month,
int dayOfMonth)
|
void |
setDate(long millis)
|
void |
setDate(java.lang.Object propertyValue)
|
void |
setDateTime(int year,
int monthOfYear,
int dayOfMonth)
|
void |
setDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay)
|
void |
setDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour)
|
void |
setDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute)
|
void |
setDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
|
void |
setDateTime(long millis)
|
void |
setDateTime(java.lang.Object propertyValue)
|
void |
setDayOfMonth(int dayOfMonth)
|
void |
setDayOfWeek(int dayOfWeek)
|
void |
setDayOfYear(int dayOfYear)
|
void |
setHourOfDay(int hour)
|
protected void |
setInternal(org.joda.time.DateTime dt)
Set the datetime, which has been validated |
protected void |
setInternal(long millis)
Set the datetime, which has been validated |
void |
setMillis(long millis)
|
void |
setMillis(java.lang.Object propertyValue)
|
void |
setMillisOfSecond(int millis)
|
void |
setMinuteOfHour(int minute)
|
void |
setMonthOfYear(int month)
|
void |
setSecondOfMinute(int second)
|
void |
setTime(int hour,
int minuteOfHour)
|
void |
setTime(int hour,
int minuteOfHour,
int secondOfMinute)
|
void |
setTime(int hour,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
|
void |
setTime(long millis)
|
void |
setTime(java.lang.Object propertyValue)
|
void |
setWeekOfYear(int week,
int year)
|
void |
setYear(int year)
|
java.util.Calendar |
toCalendar(java.util.Locale locale)
|
org.joda.time.ReadableInstant |
toCopy(org.joda.time.Chronology newChronology)
|
org.joda.time.ReadableInstant |
toCopy(long newMillis)
|
java.util.Date |
toDate()
|
org.joda.time.DateTime |
toDateTime()
|
java.util.GregorianCalendar |
toGregorianCalendar()
|
org.joda.time.Instant |
toInstant()
|
java.lang.Object |
toObject()
Get the property's value as an object. |
Methods inherited from class org.joda.property.impl.AbstractProperty |
addPropertyChangeListener, bean, checkArgumentNotNull, checkModifiable, checkValueNotNull, checkValueNotNull, cloneDeep, convertObject, createClonedProperty, data, equals, equalsValue, firePropertyChange, firePropertyChange, getContentName, getContentType, getPropertyName, getThis, hashCode, initBeanCreated, initPropertyCreated, isModifiable, isNull, isReadOnly, populateClonedProperty, removePropertyChangeListener, setModifiable, setReadOnly, toDataString, toString |
Methods inherited from class org.joda.property.impl.AbstractModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.joda.property.ModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Field Detail |
protected static final long MILLIS_PER_WEEK
protected static final long MILLIS_PER_DAY
protected static final long MILLIS_PER_HOUR
protected static final long MILLIS_PER_MINUTE
protected static final long MILLIS_PER_SECOND
protected static final long JAN_1ST_1583
protected static final long JAN_1ST_10000
Constructor Detail |
public AbstractDateTimeProperty()
Method Detail |
public java.lang.Class getPropertyType()
protected org.joda.time.DateTime getInternal()
protected void setInternal(org.joda.time.DateTime dt)
protected void setInternal(long millis)
public org.joda.time.DateTime get()
InstantProperty#get()
public java.lang.Object toObject()
Property
This method has strong semantics such that where a and b are
properties of the same type, it must be true that:
b.set( a.toObject() );
a.equals(b);
In other words, the object contains all the data necessary to
recreate the property's value.
toObject
in interface Property
toObject
in class AbstractProperty
Property#toObject()
public org.joda.time.Instant toInstant()
ReadableInstant.toInstant()
public org.joda.time.DateTime toDateTime()
ReadableInstant#toDateTime()
public java.util.Calendar toCalendar(java.util.Locale locale)
InstantProperty#toCalendar(Locale)
public java.util.GregorianCalendar toGregorianCalendar()
InstantProperty#toGregorianCalendar()
public java.util.Date toDate()
InstantProperty#toDate()
public java.lang.Class propertyType()
public int compareTo(java.lang.Object object)
Comparable.compareTo(Object)
public boolean isAfter(org.joda.time.ReadableInstant datetime)
datetime
- another date time
public boolean isBefore(org.joda.time.ReadableInstant datetime)
datetime
- another date time
public boolean isEqual(org.joda.time.ReadableInstant datetime)
datetime
- another date time
protected org.joda.time.DateTime convertObjectToDateTime(java.lang.Object object)
object
- the value to convert
protected org.joda.time.DateTime convertObjectToTime(java.lang.Object object)
object
- the value to convert
protected org.joda.time.DateTime convertObjectToDate(java.lang.Object object)
object
- the value to convert
public long getMillis()
InstantProperty#getMillis()
public int getMillisOfSecond()
ReadableTimeOnly#getMillisOfSecond()
public int getSecondOfMinute()
ReadableTimeOnly#getSecondOfMinute()
public int getMinuteOfHour()
ReadableTimeOnly#getMinuteOfHour()
public int getHourOfDay()
ReadableTimeOnly#getHourOfDay()
public int getDayOfWeek()
ReadableDate#getDayOfWeek()
public int getDayOfMonth()
ReadableDate#getDayOfMonth()
public int getDayOfYear()
ReadableDate#getDayOfYear()
public int getWeekOfWeekyear()
ReadableDate#getWeekOfYearWeek()
public int getWeekyear()
ReadableDate#getWeekOfYearYear()
public int getMonthOfYear()
ReadableDate#getMonthOfYear()
public int getYear()
ReadableDate#getYear()
public void set(java.lang.Object propertyValue)
Property
If a String is passed in, it can be parsed in various ways. If the results of toDataString() are passed in, it must reconstitute the original value.
set
in interface Property
set
in class AbstractProperty
Property#set(Object)
public void setMillis(java.lang.Object propertyValue)
ReadWritableDate#setDate(Object)
public void setDate(java.lang.Object propertyValue)
ReadWritableDate#setDate(Object)
public void setTime(java.lang.Object propertyValue)
ReadWritableTime#setTime(Object)
public void setDateTime(java.lang.Object propertyValue)
ReadWritableDateTime#setDateTime(Object)
public void setMillis(long millis)
ReadWritableInstant#setMillis(long)
public void setDate(long millis)
ReadWritableDate#setDate(long)
public void setTime(long millis)
ReadWritableTime#setTime(long)
public void setDateTime(long millis)
ReadWritableDateTime#setDateTime(long)
public void setDate(int year, int month, int dayOfMonth)
ReadWritableDate#setDate(int, int, int)
public void setDayOfWeek(int dayOfWeek)
ReadWritableDate#setDayOfWeek(int)
public void setDayOfMonth(int dayOfMonth)
ReadWritableDate#setDayOfMonth(int)
public void setDayOfYear(int dayOfYear)
ReadWritableDate#setDayOfYear(int)
public void setWeekOfYear(int week, int year)
ReadWritableDate#setWeekOfYear(int,int)
public void setMonthOfYear(int month)
public void setYear(int year)
ReadWritableDate#setYear(int)
public void add(java.lang.Object object)
ReadWritableInstant.add(Object)
public void addMillis(long millis)
ReadWritableInstant#addMillis(long)
public void addYears(int years)
ReadWritableDate#addYears(int)
public void addMonths(int months)
ReadWritableDate#addMonths(int)
public void addWeeks(int weeks)
ReadWritableDate#addWeeks(int)
public void addDays(int days)
ReadWritableDate#addDays(int)
public void addWrappedYear(int years)
ReadWritableDate#addWrappedYear(int)
public void addWrappedMonthOfYear(int months)
ReadWritableDate#addWrappedMonthOfYear(int)
public void addWrappedDayOfYear(int days)
ReadWritableDate#addWrappedDayOfYear(int)
public void addWrappedDayOfMonth(int days)
ReadWritableDate#addWrappedDayOfMonth(int)
public void addWrappedDayOfWeek(int days)
ReadWritableDate#addWrappedDayOfWeek(int)
public void setTime(int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond)
ReadWritableTime#setTime(int, int, int, int)
public void setTime(int hour, int minuteOfHour, int secondOfMinute)
ReadWritableTime#setTime(int, int, int)
public void setTime(int hour, int minuteOfHour)
ReadWritableTime#setTime(int, int)
public void setHourOfDay(int hour)
ReadWritableTime#setHourOfDay(int)
public void setMinuteOfHour(int minute)
ReadWritableTime#setMinuteOfHour(int)
public void setSecondOfMinute(int second)
ReadWritableTime#setSecondOfMinute(int)
public void setMillisOfSecond(int millis)
ReadWritableTime#setMillisOfSecond(int)
public void addHours(int hours)
ReadWritableTime#addHours(int)
public void addMinutes(int minutes)
ReadWritableTime#addMinutes(int)
public void addSeconds(int seconds)
ReadWritableTime#addSeconds(int)
public void addMillisOfSecond(int milliseconds)
ReadWritableTime#addMillisOfSecond(int)
public void addWrappedHourOfDay(int hours)
ReadWritableTime#addWrappedHourOfDay(int)
public void addWrappedMinuteOfHour(int minutes)
ReadWritableTime#addWrappedMinuteOfHour(int)
public void addWrappedSecondOfMinute(int seconds)
ReadWritableTime#addWrappedSecondOfMinute(int)
public void addWrappedMillisOfSecond(int millis)
ReadWritableTime#addWrappedMillisOfSecond(int)
public void setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)
ReadWritableDateTime#setDateTime(int, int, int, int, int, int, int)
public void setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute)
ReadWritableDateTime#setDateTime(int, int, int, int, int, int)
public void setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour)
ReadWritableDateTime#setDateTime(int, int, int, int, int)
public void setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay)
ReadWritableDateTime#setDateTime(int, int, int, int)
public void setDateTime(int year, int monthOfYear, int dayOfMonth)
ReadWritableDateTime#setDateTime(int, int, int)
protected long getZeroedMillis()
public void add(org.joda.time.DateTimeField field, int value)
ReadWritableInstant.add(DateTimeField, int)
public void addWrapped(org.joda.time.DateTimeField field, int value)
ReadWritableInstant.addWrapped(DateTimeField, int)
public void set(org.joda.time.DateTimeField field, int value)
ReadWritableInstant.set(DateTimeField, int)
public int get(org.joda.time.DateTimeField field)
ReadableInstant.get(DateTimeField)
public org.joda.time.Chronology getChronology()
public org.joda.time.DateTimeZone getDateTimeZone()
public org.joda.time.ReadableInstant toCopy(long newMillis)
public org.joda.time.ReadableInstant toCopy(org.joda.time.Chronology newChronology)
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |