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.
SqlDate obj = (SqlDate) 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 SqlDate object to the
specified value.
this.makeDirty();
super.setDate(date);
|
public void | setMonth(int month)Sets the month of this date to the specified value.
this.makeDirty();
super.setMonth(month);
|
public 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.
this.makeDirty();
super.setTime(time);
|
public void | setTimeInternal(long time)Sets the SqlDate 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 SqlDate 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.Date as the designated object to be used when writing
this object to the stream.
return new java.sql.Date(getTime());
|