|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
java.sql.Timestamp
org.jpox.sco.SqlTimestamp
A mutable second-class SQL timestamp object.
Constructor Summary | |
SqlTimestamp(StateManager ownerSM,
java.lang.String fieldName)
Creates a SqlTimestamp object that represents the time at
which it was allocated. |
Method Summary | |
void |
attachCopy(java.lang.Object value)
Method to return an attached version for the passed StateManager and field, using the passed value. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
detach(FetchPlanState state)
Method to detach this object. |
java.lang.Object |
detachCopy(FetchPlanState state)
Method to detach a copy of this object. |
java.lang.String |
getFieldName()
Accessor for the field name |
java.lang.Object |
getOwner()
Accessor for the owner. |
void |
makeDirty()
Utility to mark the object as dirty |
void |
makeTransient(FetchPlanState state)
Method to make transient this object. |
void |
runReachability(java.util.Set reachables)
Method to run reachability on this SCO. |
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 |
setValueFrom(java.lang.Object o,
boolean forUpdate)
Mutator for the value, using an object. |
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 java.lang.Object |
writeReplace()
The writeReplace method is called when ObjectOutputStream is preparing to write the object to the stream. |
Methods inherited from class java.sql.Timestamp |
after, before, compareTo, compareTo, equals, equals, getNanos, getTime, toString, valueOf |
Methods inherited from class java.util.Date |
after, before, compareTo, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, hashCode, parse, toGMTString, toLocaleString, UTC |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SqlTimestamp(StateManager ownerSM, java.lang.String fieldName)
SqlTimestamp
object that represents the time at
which it was allocated. Assigns owning object and field name.
ownerSM
- the owning objectfieldName
- the owning field nameMethod Detail |
public java.lang.Object clone()
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.
clone
in interface SCO
public void setTime(long time)
time
- The time (millisecs)public void setNanos(int time_nanos)
time_nanos
- The 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.)
year
- the year value.Calendar
public void setMonth(int month)
Calendar.set(Calendar.MONTH, int month)
.
month
- the month value between 0-11.Calendar
public void setDate(int date)
Calendar.set(Calendar.DAY_OF_MONTH, int date)
.
date
- the day of the month value between 1-31.Calendar
public void setHours(int hours)
Calendar.set(Calendar.HOUR_OF_DAY, int hours)
.
hours
- the hour value.Calendar
public void setMinutes(int minutes)
Calendar.set(Calendar.MINUTE, int minutes)
.
minutes
- the value of the minutes.Calendar
public void setSeconds(int seconds)
Calendar.set(Calendar.SECOND, int seconds)
.
seconds
- the seconds value.Calendar
public void setValueFrom(java.lang.Object o, boolean forUpdate)
setValueFrom
in interface SCO
o
- The ObjectforUpdate
- Whether to update the datastore with this valuepublic void unsetOwner()
unsetOwner
in interface SCO
public java.lang.Object getOwner()
getOwner
in interface SCO
public java.lang.String getFieldName()
getFieldName
in interface SCO
public void makeDirty()
public void makeTransient(FetchPlanState state)
makeTransient
in interface SCO
state
- State for the fetchplan processpublic void detach(FetchPlanState state)
detach
in interface SCO
state
- State for the detachment processpublic void runReachability(java.util.Set reachables)
runReachability
in interface SCO
reachables
- List of StateManagers reachable so farpublic java.lang.Object detachCopy(FetchPlanState state)
detachCopy
in interface SCO
state
- State for detachment process
public void attachCopy(java.lang.Object value)
attachCopy
in interface SCO
value
- The new valueprotected java.lang.Object writeReplace() throws java.io.ObjectStreamException
java.io.ObjectStreamException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |