|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
java.sql.Date
com.triactive.jdo.sco.SqlDate
A mutable second-class SQL date object.
Field Summary |
Fields inherited from class java.sql.Date |
|
Constructor Summary | |
SqlDate(java.lang.Object owner,
java.lang.String fieldName)
Creates a SqlDate object that represents the time at which it was allocated. |
|
SqlDate(java.lang.Object owner,
java.lang.String fieldName,
java.sql.Date date)
Creates a SqlDate object that represents the same time as the given java.sql.Date. |
Method Summary | |
void |
applyUpdates()
Applies any pending updates for this object to the data store. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
java.lang.String |
getFieldName()
Returns the field name. |
java.lang.Object |
getOwner()
Returns the owner object of the SCO instance. |
void |
makeDirty()
Marks object dirty. |
void |
setDate(int date)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date) . |
void |
setMonth(int month)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month) . |
void |
setTime(long time)
|
void |
setValueFrom(java.lang.Object o)
Assigns the value of this second-class object from an existing object of the same or compatible type. |
void |
setYear(int year)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900) . |
void |
unsetOwner()
Nullifies references to the owner Object and Field. |
Methods inherited from class java.sql.Date |
getHours, getMinutes, getSeconds, setHours, setMinutes, setSeconds, toString, valueOf |
Methods inherited from class java.util.Date |
after, before, compareTo, compareTo, equals, getDate, getDay, getMonth, getTime, getTimezoneOffset, getYear, hashCode, parse, toGMTString, toLocaleString, UTC |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SqlDate(java.lang.Object owner, java.lang.String fieldName)
owner
- the owning objectfieldName
- the owning field namepublic SqlDate(java.lang.Object owner, java.lang.String fieldName, java.sql.Date date)
owner
- the owning objectfieldName
- the owning field namedate
- the initial date valueMethod 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.
public void setTime(long time)
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 setValueFrom(java.lang.Object o)
SCO
setValueFrom
in interface SCO
o
- the object from which to copy the value.public void unsetOwner()
SCO
unsetOwner
in interface SCO
public java.lang.Object getOwner()
SCO
getOwner
in interface SCO
public java.lang.String getFieldName()
SCO
getFieldName
in interface SCO
public void applyUpdates()
SCO
applyUpdates
in interface SCO
public void makeDirty()
SCO
makeDirty
in interface SCO
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |