au.com.zip.cs
Interface Dated

All Known Implementing Classes:
EntityAdaptor, Group, RelatedEntity, UserEntity, WrappedEntity

public interface Dated

An object with start and end dates. Dates represented as longs are millisecond values representing the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

Author:
Cameron Simpson <cs@zip.com.au> 26jun2003
See Also:
Date

Field Summary
static long DATE_NOW
          Sentinel value indicating "today" or "now" when using longs for dates.
static long DATE_NULL
          Sentinel value indicating "no date" when using longs for dates.
static String DFLT_END_DATE_ATTRIBUTE
          The default attribute indicating the end of an entity's date range.
static String DFLT_START_DATE_ATTRIBUTE
          The default attribute indicating the start of an entity's date range.
 
Method Summary
 long getEndDate()
          Return the end date.
 long getStartDate()
          Return the start date.
 void setEndDate(long when)
          Set the end date.
 void setStartDate(long when)
          Set the start date.
 

Field Detail

DFLT_START_DATE_ATTRIBUTE

static final String DFLT_START_DATE_ATTRIBUTE
The default attribute indicating the start of an entity's date range.

See Also:
Constant Field Values

DFLT_END_DATE_ATTRIBUTE

static final String DFLT_END_DATE_ATTRIBUTE
The default attribute indicating the end of an entity's date range.

See Also:
Constant Field Values

DATE_NULL

static final long DATE_NULL
Sentinel value indicating "no date" when using longs for dates.

See Also:
Constant Field Values

DATE_NOW

static final long DATE_NOW
Sentinel value indicating "today" or "now" when using longs for dates.

See Also:
Constant Field Values
Method Detail

getStartDate

long getStartDate()
Return the start date.

Returns:
the start date

setStartDate

void setStartDate(long when)
Set the start date. The sentinel value DATE_NOW is not a valid value.

Parameters:
when - the new start date

getEndDate

long getEndDate()
Return the end date.

Returns:
the end date

setEndDate

void setEndDate(long when)
Set the end date. The sentinel value DATE_NOW is not a valid value.

Parameters:
when - the new end date