|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Date
java.sql.Timestamp
com.triactive.jdo.sco.SqlTimestamp
public class SqlTimestamp
A mutable second-class SQL timestamp object.
| Constructor Summary | |
|---|---|
SqlTimestamp(java.lang.Object owner,
java.lang.String fieldName,
java.sql.Timestamp ts)
Creates a SqlTimestamp object that represents the same time
as the given java.sql.Timestamp. |
|
| Method Summary | |
|---|---|
void |
applyUpdates()
Called to indicate that the owning object is being made persistent, or that the persistent state of this field is being updated. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
java.lang.String |
getFieldName()
Returns the field name in the owner object. |
java.lang.Object |
getOwner()
Returns the owner object of the SCO instance. |
void |
makeDirty()
Marks this object 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 n)
|
void |
setSeconds(int seconds)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds). |
void |
setTime(long time)
|
void |
setYear(int year)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900). |
void |
unsetOwner()
Disconnects this object from its owner. |
protected java.lang.Object |
writeReplace()
Replaces the object to be serialized with a java.sql.Timestamp object. |
| 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, 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(java.lang.Object owner,
java.lang.String fieldName,
java.sql.Timestamp ts)
SqlTimestamp object that represents the same time
as the given java.sql.Timestamp. Assigns owning object and field
name.
owner - the owning objectfieldName - the owning field namets - the initial timestamp value| Method Detail |
|---|
public java.lang.Object getOwner()
SCO
getOwner in interface SCOnull if currently unowned.public java.lang.String getFieldName()
SCO
getFieldName in interface SCOnull if currently unowned.public void makeDirty()
SCO
makeDirty in interface SCOpublic void applyUpdates()
SCO
applyUpdates in interface SCOpublic void unsetOwner()
SCO
unsetOwner in interface SCOpublic 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 SCOclone in class java.util.Datepublic void setTime(long time)
setTime in class java.sql.Timestamppublic void setNanos(int n)
setNanos in class java.sql.Timestamppublic 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.)
setYear in class java.util.Dateyear - the year value.Calendarpublic void setMonth(int month)
Calendar.set(Calendar.MONTH, int month).
setMonth in class java.util.Datemonth - the month value between 0-11.Calendarpublic void setDate(int date)
Calendar.set(Calendar.DAY_OF_MONTH, int date).
setDate in class java.util.Datedate - the day of the month value between 1-31.Calendarpublic void setHours(int hours)
Calendar.set(Calendar.HOUR_OF_DAY, int hours).
setHours in class java.util.Datehours - the hour value.Calendarpublic void setMinutes(int minutes)
Calendar.set(Calendar.MINUTE, int minutes).
setMinutes in class java.util.Dateminutes - the value of the minutes.Calendarpublic void setSeconds(int seconds)
Calendar.set(Calendar.SECOND, int seconds).
setSeconds in class java.util.Dateseconds - the seconds value.Calendarprotected java.lang.Object writeReplace()
java.sql.Timestamp to be serialized instead of this
object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||