| java.lang.Object java.util.Date org.jpox.sco.Date
Date | public class Date extends java.util.Date implements SCO(Code) | | A mutable second-class date object.
version: $Revision: 1.26 $ |
Constructor Summary | |
public | Date(StateManager ownerSM, String fieldName) Creates a Date object that represents the time at which it was allocated. |
Method Summary | |
public void | attachCopy(Object value) Method to attached the passed value. | public Object | clone() Creates and returns a copy of this object.
Mutable second-class Objects are required to provide a public
clone method in order to allow for copying PersistenceCapable
objects. | public Object | detachCopy(FetchPlanState state) Method to detach a copy of this object. | public String | getFieldName() | public Object | getOwner() Accessor for the owner. | public Object | getValue() Accessor for the unwrapped value that we are wrapping. | public void | initialise() Method to initialise the SCO for use. | public void | initialise(Object o, boolean forInsert, boolean forUpdate) Method to initialise the SCO from an existing value. | public void | makeDirty() | public void | setDate(int date) Sets the day of the month of this Date object to the
specified value. | public void | setHours(int hours) Sets the hour of this Date object to the specified value. | public void | setMinutes(int minutes) Sets the minutes of this Date object to the specified value. | public void | setMonth(int month) Sets the month of this date to the specified value. | public void | setSeconds(int seconds) Sets the seconds of this Date to the specified value. | public void | setTime(long time) Mutator for the time. | public void | setYear(int year) Sets the year of this Date object to be the specified
value plus 1900. | public 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. |
Date | public Date(StateManager ownerSM, String fieldName)(Code) | | Creates a Date object that represents the time at which it was allocated.
Assigns owning object and field name.
Parameters: ownerSM - the owning object Parameters: fieldName - the owning field name |
attachCopy | public void attachCopy(Object value)(Code) | | Method to attached the passed value.
Parameters: value - The new value |
clone | public Object clone()(Code) | | Creates and returns a copy of this object.
Mutable second-class Objects are required to provide a public
clone method in order to allow for copying PersistenceCapable
objects. In contrast to Object.clone(), this method must not throw a
CloneNotSupportedException.
A clone of the object |
detachCopy | public Object detachCopy(FetchPlanState state)(Code) | | Method to detach a copy of this object.
Parameters: state - State for detachment process The detached object |
getFieldName | public String getFieldName()(Code) | | Accessor for the field name
The field name |
getOwner | public Object getOwner()(Code) | | Accessor for the owner.
The owner |
getValue | public Object getValue()(Code) | | Accessor for the unwrapped value that we are wrapping.
The unwrapped value |
initialise | public void initialise()(Code) | | Method to initialise the SCO for use.
|
initialise | public void initialise(Object o, boolean forInsert, boolean forUpdate)(Code) | | Method to initialise the SCO from an existing value.
Parameters: o - The Object Parameters: forInsert - Whether the object needs inserting in the datastore with this value Parameters: forUpdate - Whether to update the datastore with this value |
makeDirty | public void makeDirty()(Code) | | Utility to mark the object as dirty
|
setDate | public void setDate(int date)(Code) | | Sets the day of the month of this Date object to the
specified value. This Date object is modified so that
it represents a point in time within the specified day of the
month, with the year, month, hour, minute, and second the same
as before, as interpreted in the local time zone. If the date
was April 30, for example, and the date is set to 31, then it
will be treated as if it were on May 1, because April has only
30 days.
Parameters: date - the day of the month value between 1-31. See Also: java.util.Calendar |
setHours | public void setHours(int hours)(Code) | | Sets the hour of this Date object to the specified value.
This Date object is modified so that it represents a point
in time within the specified hour of the day, with the year, month,
date, minute, and second the same as before, as interpreted in the
local time zone.
Parameters: hours - the hour value. See Also: java.util.Calendar |
setMinutes | public void setMinutes(int minutes)(Code) | | Sets the minutes of this Date object to the specified value.
This Date object is modified so that it represents a point
in time within the specified minute of the hour, with the year, month,
date, hour, and second the same as before, as interpreted in the
local time zone.
Parameters: minutes - the value of the minutes. See Also: java.util.Calendar |
setMonth | public void setMonth(int month)(Code) | | Sets the month of this date to the specified value. This
Date object is modified so that it represents a point
in time within the specified month, with the year, date, hour,
minute, and second the same as before, as interpreted in the
local time zone. If the date was October 31, for example, and
the month is set to June, then the new date will be treated as
if it were on July 1, because June has only 30 days.
Parameters: month - the month value between 0-11. See Also: java.util.Calendar |
setSeconds | public void setSeconds(int seconds)(Code) | | Sets the seconds of this Date to the specified value.
This Date object is modified so that it represents a
point in time within the specified second of the minute, with
the year, month, date, hour, and minute the same as before, as
interpreted in the local time zone.
Parameters: seconds - the seconds value. See Also: java.util.Calendar |
setTime | public void setTime(long time)(Code) | | Mutator for the time.
Parameters: time - The time (millisecs) |
setYear | public void setYear(int year)(Code) | | Sets the year of this Date object to be the specified
value plus 1900. This Date object is modified so
that it represents a point in time within the specified year,
with the month, date, hour, minute, and second the same as
before, as interpreted in the local time zone. (Of course, if
the date was February 29, for example, and the year is set to a
non-leap year, then the new date will be treated as if it were
on March 1.)
Parameters: year - the year value. See Also: java.util.Calendar |
unsetOwner | public void unsetOwner()(Code) | | Utility to unset the owner.
|
writeReplace | protected Object writeReplace() throws ObjectStreamException(Code) | | The writeReplace method is called when ObjectOutputStream is preparing to write the object to the stream. The
ObjectOutputStream checks whether the class defines the writeReplace method. If the method is defined, the
writeReplace method is called to allow the object to designate its replacement in the stream. The object returned
should be either of the same type as the object passed in or an object that when read and resolved will result in
an object of a type that is compatible with all references to the object.
the replaced object throws: ObjectStreamException - |
|
|