public class GregorianCalendar extends GregorianCalendar implements SCO<GregorianCalendar>
Calendar.Builder
Modifier and Type | Field and Description |
---|---|
protected AbstractMemberMetaData |
ownerMmd |
protected ObjectProvider |
ownerOP |
AD, BC
ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, LONG_FORMAT, LONG_STANDALONE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NARROW_FORMAT, NARROW_STANDALONE, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SHORT_FORMAT, SHORT_STANDALONE, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
Constructor and Description |
---|
GregorianCalendar(ObjectProvider op,
AbstractMemberMetaData mmd)
Creates a GregorianCalendar object that represents the time at which it was allocated.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int field,
int amount)
Method to add an amount to a field
|
void |
attachCopy(GregorianCalendar value)
Method to return an attached version for the passed ObjectProvider and
field, using the passed value.
|
Object |
clone()
Creates and returns a copy of this object.
|
GregorianCalendar |
detachCopy(FetchPlanState state)
Method to return a detached copy of the value object.
|
String |
getFieldName()
Accessor for the field name
|
Object |
getOwner()
Accessor for the owner.
|
GregorianCalendar |
getValue()
Accessor for the unwrapped value that we are wrapping.
|
void |
initialise()
Method to initialise the SCO for use.
|
void |
initialise(GregorianCalendar cal,
boolean forInsert,
boolean forUpdate)
Method to initialise the SCO from an existing value.
|
void |
makeDirty()
Utility to mark the object as dirty
|
void |
roll(int field,
boolean up)
Method to roll a field by 1.
|
void |
roll(int field,
int amount)
Method to roll the value of a field
|
void |
set(int field,
int value)
Method to set a field
|
void |
setFirstDayOfWeek(int value)
Method to set the first day of the week
|
void |
setGregorianChange(Date date)
Method to set the gregorian cal change date
|
void |
setLenient(boolean lenient)
Method to set the lenient setting
|
void |
setMinimalDaysInFirstWeek(int value)
Method to set the minimal days in the week
|
void |
setTimeInMillis(long millis)
Method to set the time in milliseconds
|
void |
setTimeZone(TimeZone value)
Method to set the timezone
|
void |
unsetOwner()
Utility to unset the owner.
|
protected Object |
writeReplace()
The writeReplace method is called when ObjectOutputStream is preparing to
write the object to the stream.
|
computeFields, computeTime, equals, from, getActualMaximum, getActualMinimum, getCalendarType, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, getWeeksInWeekYear, getWeekYear, hashCode, isLeapYear, isWeekDateSupported, setWeekDate, toZonedDateTime
after, before, clear, clear, compareTo, complete, get, getAvailableCalendarTypes, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, setTime, toInstant, toString
protected transient ObjectProvider ownerOP
protected transient AbstractMemberMetaData ownerMmd
public GregorianCalendar(ObjectProvider op, AbstractMemberMetaData mmd)
op
- ObjectProvider for the owning objectmmd
- Metadata for the memberpublic void initialise()
initialise
in interface SCO<GregorianCalendar>
public void initialise(GregorianCalendar cal, boolean forInsert, boolean forUpdate)
initialise
in interface SCO<GregorianCalendar>
cal
- The ObjectforInsert
- Whether the object needs inserting in the datastore with this valueforUpdate
- Whether to update the datastore with this valuepublic GregorianCalendar getValue()
getValue
in interface SCO<GregorianCalendar>
public void unsetOwner()
unsetOwner
in interface SCO<GregorianCalendar>
public Object getOwner()
getOwner
in interface SCO<GregorianCalendar>
public String getFieldName()
getFieldName
in interface SCO<GregorianCalendar>
public void makeDirty()
public GregorianCalendar detachCopy(FetchPlanState state)
detachCopy
in interface SCO<GregorianCalendar>
state
- State for detachment processpublic void attachCopy(GregorianCalendar value)
attachCopy
in interface SCO<GregorianCalendar>
value
- The new valuepublic Object clone()
Mutable second-class Objects are required to provide a public clone method in order to allow for copying persistable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.
clone
in interface SCO<GregorianCalendar>
clone
in class GregorianCalendar
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
- if an error occurspublic void add(int field, int amount)
add
in class GregorianCalendar
field
- The fieldamount
- The amount to addpublic void roll(int field, boolean up)
roll
in class GregorianCalendar
field
- The fieldup
- The whether to move it uppublic void roll(int field, int amount)
roll
in class GregorianCalendar
field
- The fieldamount
- The amount to roll bypublic void set(int field, int value)
public void setGregorianChange(Date date)
setGregorianChange
in class GregorianCalendar
date
- The new change datepublic void setFirstDayOfWeek(int value)
setFirstDayOfWeek
in class Calendar
value
- The first day of the weekpublic void setLenient(boolean lenient)
setLenient
in class Calendar
lenient
- Whether it is lenientpublic void setMinimalDaysInFirstWeek(int value)
setMinimalDaysInFirstWeek
in class Calendar
value
- The minimal days in the weekpublic void setTimeInMillis(long millis)
setTimeInMillis
in class Calendar
millis
- The new time in millisecspublic void setTimeZone(TimeZone value)
setTimeZone
in class GregorianCalendar
value
- The new timezoneCopyright © 2015. All rights reserved.