public class SqlTimestamp extends Timestamp implements SCO<Timestamp>
Modifier and Type | Field and Description |
---|---|
protected AbstractMemberMetaData |
ownerMmd |
protected ObjectProvider |
ownerOP |
Constructor and Description |
---|
SqlTimestamp(ObjectProvider op,
AbstractMemberMetaData mmd)
Creates a
SqlTimestamp object that represents the time at which it was allocated. |
Modifier and Type | Method and Description |
---|---|
void |
attachCopy(Timestamp 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.
|
Timestamp |
detachCopy(FetchPlanState state)
Method to detach a copy of this object.
|
String |
getFieldName()
Accessor for the field name
|
Object |
getOwner()
Accessor for the owner.
|
Timestamp |
getValue()
Accessor for the unwrapped value that we are wrapping.
|
void |
initialise()
Method to initialise the SCO for use, and allowing the SCO to be loaded from the datastore (when we have a backing store).
|
void |
initialise(Timestamp ts)
Method to initialise the SCO for use with the provided initial value.
|
void |
initialise(Timestamp newValue,
Object oldValue)
Method to initialise the SCO for use, where replacing an old value with a new value such as when calling a setter field
passing in a new value.
|
void |
makeDirty()
Utility to mark the object as dirty
|
void |
setDate(int date)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.DAY_OF_MONTH, int date) . |
void |
setHours(int hours)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.HOUR_OF_DAY, int hours) . |
void |
setMinutes(int minutes)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.MINUTE, int minutes) . |
void |
setMonth(int month)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.MONTH, int month) . |
void |
setNanos(int time_nanos)
Mutator for the time in nanos.
|
void |
setSeconds(int seconds)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.SECOND, int seconds) . |
void |
setTime(long time)
Mutator for the time.
|
void |
setYear(int year)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.YEAR, year + 1900) . |
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.
|
after, before, compareTo, compareTo, equals, equals, from, getNanos, getTime, hashCode, toInstant, toLocalDateTime, toString, valueOf, valueOf
after, before, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, toGMTString, toLocaleString, UTC
protected transient ObjectProvider ownerOP
protected transient AbstractMemberMetaData ownerMmd
public SqlTimestamp(ObjectProvider op, AbstractMemberMetaData mmd)
SqlTimestamp
object that represents the time at which it was allocated.op
- ObjectProvider for the owning objectmmd
- Metadata for the memberpublic void initialise()
SCO
initialise
in interface SCO<Timestamp>
public void initialise(Timestamp newValue, Object oldValue)
SCO
initialise
in interface SCO<Timestamp>
newValue
- New value (to wrap)oldValue
- Old value (to use in deciding what needs deleting etc)public void initialise(Timestamp ts)
SCO
initialise
in interface SCO<Timestamp>
ts
- the object from which to copy the value.public Timestamp getValue()
public void unsetOwner()
unsetOwner
in interface SCO<Timestamp>
public Object getOwner()
public String getFieldName()
getFieldName
in interface SCO<Timestamp>
public void makeDirty()
public Timestamp detachCopy(FetchPlanState state)
detachCopy
in interface SCO<Timestamp>
state
- State for detachment processpublic void attachCopy(Timestamp value)
attachCopy
in interface SCO<Timestamp>
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.
public void setTime(long time)
public void setNanos(int time_nanos)
public void setYear(int year)
Calendar.set(Calendar.YEAR, year + 1900)
.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.)public void setMonth(int month)
Calendar.set(Calendar.MONTH, int month)
.public void setDate(int date)
Calendar.set(Calendar.DAY_OF_MONTH, int date)
.public void setHours(int hours)
Calendar.set(Calendar.HOUR_OF_DAY, int hours)
.public void setMinutes(int minutes)
Calendar.set(Calendar.MINUTE, int minutes)
.setMinutes
in class Date
minutes
- the value of the minutes.Calendar
public void setSeconds(int seconds)
Calendar.set(Calendar.SECOND, int seconds)
.setSeconds
in class Date
seconds
- the seconds value.Calendar
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
- if an error occursCopyright © 2018. All rights reserved.