public class Date extends Date implements SCODate
Date,
Serialized Form| Constructor and Description |
|---|
Date(Object owner,
String fieldName)
Creates a
Date object that represents the time at which
it was allocated. |
Date(Object owner,
String fieldName,
long date)
Creates a
Date 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 |
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 |
setSeconds(int seconds)
Deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.SECOND, int seconds). |
void |
setTime(long time)
Sets the Date 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 Date 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.
|
after, before, compareTo, equals, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, toGMTString, toInstant, toLocaleString, toString, UTCpublic Date(Object owner, String fieldName)
Date 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 void setHours(int hours)
Calendar.set(Calendar.HOUR_OF_DAY, int hours).public void setMinutes(int minutes)
Calendar.set(Calendar.MINUTE, int minutes).setMinutes in class Dateminutes - the value of the minutes.Calendar,
Datepublic void setSeconds(int seconds)
Calendar.set(Calendar.SECOND, int seconds).setSeconds in class Dateseconds - the seconds value.Calendar,
Datepublic 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 © 2019. All rights reserved.