|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Date
java.sql.Date
org.datanucleus.sco.simple.SqlDate
public class SqlDate
A mutable second-class SQL date object.
| Field Summary | |
|---|---|
protected java.lang.String |
fieldName
|
protected java.lang.Object |
owner
|
protected StateManager |
ownerSM
|
| Constructor Summary | |
|---|---|
SqlDate(StateManager ownerSM,
java.lang.String fieldName)
Creates a SqlDate 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. |
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. |
java.lang.Object |
getValue()
Accessor for the unwrapped value that we are wrapping. |
void |
initialise()
Method to initialise the SCO for use. |
void |
initialise(java.lang.Object o,
boolean forInsert,
boolean forUpdate)
Method to initialise the SCO from an existing 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 |
setMonth(int month)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month). |
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 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.Date |
|---|
getHours, getMinutes, getSeconds, setHours, setMinutes, setSeconds, toString, valueOf |
| Methods inherited from class java.util.Date |
|---|
after, before, 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 |
| Field Detail |
|---|
protected transient java.lang.Object owner
protected transient StateManager ownerSM
protected transient java.lang.String fieldName
| Constructor Detail |
|---|
public SqlDate(StateManager ownerSM,
java.lang.String fieldName)
ownerSM - the owning objectfieldName - the owning field name| Method Detail |
|---|
public void initialise()
initialise in interface SCO
public void initialise(java.lang.Object o,
boolean forInsert,
boolean forUpdate)
initialise in interface SCOo - The ObjectforInsert - Whether the object needs inserting in the datastore with this valueforUpdate - Whether to update the datastore with this valuepublic java.lang.Object getValue()
getValue in interface SCOpublic void unsetOwner()
unsetOwner in interface SCOpublic java.lang.Object getOwner()
getOwner in interface SCOpublic java.lang.String getFieldName()
getFieldName in interface SCOpublic void makeDirty()
public java.lang.Object detachCopy(FetchPlanState state)
detachCopy in interface SCOstate - State for detachment process
public void attachCopy(java.lang.Object value)
attachCopy in interface SCOvalue - The new valuepublic 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.Datetime - The time (millisecs)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.)
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.Calendar
protected 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 | |||||||||