Methods Summary |
---|
public void | applyUpdates(com.sun.jdo.spi.persistence.support.sqlstore.StateManager sm, boolean modified)Apply changes (no-op)
|
public java.lang.Object | clone()Creates and returns a copy of this object.
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.
SqlTimestamp obj = (SqlTimestamp) super.clone();
obj.owner = null;
obj.fieldName = null;
return obj;
|
public java.lang.Object | cloneInternal()Creates and returns a copy of this object without resetting the owner and field value.
return super.clone();
|
public java.lang.String | getFieldName()Returns the field name
return this.fieldName;
|
public java.lang.Object | getOwner()Returns the owner object of the SCO instance
return this.owner;
|
public com.sun.jdo.spi.persistence.support.sqlstore.StateManager | makeDirty()Marks object dirty
if (owner != null)
{
StateManager stateManager = owner.jdoGetStateManager();
if (stateManager != null)
{
PersistenceManager pm = (PersistenceManager) stateManager.getPersistenceManagerInternal();
pm.acquireShareLock();
try
{
synchronized (stateManager)
{
//
// Need to recheck owner because it could be set to
// null before we lock the stateManager.
//
if (owner != null)
{
stateManager.makeDirty(fieldName);
return stateManager;
}
}
}
finally
{
pm.releaseShareLock();
}
}
}
return null;
|
public void | setDate(int date)Sets the day of the month of this SqlTimestamp object to the
specified value.
this.makeDirty();
super.setDate(date);
|
public void | setHours(int hours)Sets the hour of this SqlTimestamp object to the specified value.
this.makeDirty();
super.setHours(hours);
|
public void | setMinutes(int minutes)Sets the minutes of this SqlTimestamp object to the specified value.
this.makeDirty();
super.setMinutes(minutes);
|
public void | setMonth(int month)Sets the month of this date to the specified value.
this.makeDirty();
super.setMonth(month);
|
public void | setNanos(int n)Sets this Timestamp object's nanos value
to the given value.
this.makeDirty();
try {
super.setNanos(n);
} catch (IllegalArgumentException e) {
throw e;
}
|
public void | setNanosInternal(int n)Sets the SqlTimestamp object's nanos value without
notification of the Owner field. Used internaly to populate date from DB
super.setNanos(n);
|
public void | setSeconds(int seconds)Sets the seconds of this SqlTimestamp to the specified value.
this.makeDirty();
super.setSeconds(seconds);
|
public 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.
this.makeDirty();
super.setTime(time);
|
public void | setTimeInternal(long time)Sets the SqlTimestamp object without notification of the Owner
field. Used internaly to populate date from DB
super.setTime(time);
|
public void | setYear(int year)Sets the year of this SqlTimestamp object to be the specified
value plus 1900.
this.makeDirty();
super.setYear(year);
|
public void | unsetOwner()Nullifies references to the owner Object and Field
NOTE: This method should be called under the locking of
the owener' state manager.
this.owner = null;
this.fieldName = null;
|
java.lang.Object | writeReplace()Use java.sql.Timestamp as the designated object to be used when writing
this object to the stream.
java.sql.Timestamp t = new java.sql.Timestamp(getTime());
t.setNanos(this.getNanos());
return t;
|