public class SqlTimestamp extends Timestamp implements SCODate
Timestamp,
Serialized Form| Constructor and Description |
|---|
SqlTimestamp(Object owner,
String fieldName)
Creates a
SqlTimestamp object that represents the time at which
it was allocated. |
SqlTimestamp(Object owner,
String fieldName,
long date)
Creates a
SqlTimestamp 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 |
setNanos(int n)
Sets this
Timestamp object's nanos value
to the given value. |
void |
setNanosInternal(int n)
Sets the SqlTimestamp object's
nanos value without
notification of the Owner field. |
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 SqlTimestamp 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 SqlTimestamp 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, compareTo, equals, equals, from, getNanos, getTime, hashCode, toInstant, toLocalDateTime, toString, valueOf, valueOfafter, before, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, toGMTString, toLocaleString, UTCpublic SqlTimestamp(Object owner, String fieldName)
SqlTimestamp 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 void setNanos(int n)
Timestamp object's nanos value
to the given value.setNanos in class Timestampn - the new fractional seconds componentIllegalArgumentException - if the given argument
is greater than 999999999 or less than 0Timestamppublic 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,
Timestamppublic void setSeconds(int seconds)
Calendar.set(Calendar.SECOND, int seconds).setSeconds in class Dateseconds - the seconds value.Calendar,
Timestamppublic Object cloneInternal()
cloneInternal in interface SCOpublic void setTimeInternal(long time)
setTimeInternal in interface SCODatetime - the number of milliseconds.Timestamppublic void setNanosInternal(int n)
nanos value without
notification of the Owner field. Used internaly to populate date from DBn - the new fractional seconds componentIllegalArgumentException - if the given argument
is greater than 999999999 or less than 0Timestamppublic 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.