public class SqlDate extends Date implements SCODate
Date,
Serialized Form| Constructor and Description |
|---|
SqlDate(Object owner,
String fieldName)
Creates a
SqlDate object that represents the time at which
it was allocated. |
SqlDate(Object owner,
String fieldName,
long date)
Creates a
SqlDate object that represents the given time
in milliseconds. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyUpdates(StateManager sm,
boolean modified)
Apply changes (no-op)
|
Object |
clone()
Creates and returns a copy of this object.
|
Object |
cloneInternal()
Creates and returns a copy of this object without resetting the owner and field value.
|
String |
getFieldName()
Returns the field name
|
Object |
getOwner()
Returns the owner object of the SCO instance
|
StateManager |
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)
Sets the SqlDate object to represent a point in time that is
time milliseconds after January 1, 1970 00:00:00 GMT.
|
void |
setTimeInternal(long time)
Sets the SqlDate object without notification of the Owner
field.
|
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
NOTE: This method should be called under the locking of
the owener' state manager.
|
getHours, getMinutes, getSeconds, setHours, setMinutes, setSeconds, toInstant, toLocalDate, toString, valueOf, valueOfpublic SqlDate(Object owner, String fieldName)
SqlDate object that represents the time at which
it was allocated. Assigns owning object and field nameowner - the owning objectfieldName - the owning field namepublic void setTime(long time)
public 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 setYear(int year)
Calendar.set(Calendar.YEAR, year + 1900).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 Object cloneInternal()
cloneInternal in interface SCOpublic void setTimeInternal(long time)
setTimeInternal in interface SCODatetime - the number of milliseconds.Datepublic void unsetOwner()
unsetOwner in interface SCOpublic Object getOwner()
public String getFieldName()
getFieldName in interface SCOpublic StateManager makeDirty()
public void applyUpdates(StateManager sm, boolean modified)
applyUpdates in interface SCOCopyright © 2017. All rights reserved.