Home » JDO » StateManager » replacingStateManager(pc, sm) - JDO StateManager's method

replacingStateManager(pc, sm) - JDO StateManager's method

Method
javax.jdo.spi.StateManager
StateManager replacingStateManager(
  PersistenceCapable pc,
  StateManager sm
)

Replace the current value of jdoStateManager.

This method is called by the PersistenceCapable whenever jdoReplaceStateManager is called and there is already an owning StateManager. This is a security precaution to ensure that the owning StateManager is the only source of any change to its reference in the PersistenceCapable.

Parameters:
pc - the calling PersistenceCapable instance
sm - the proposed new value for the jdoStateManager
Returns:
the new value for the jdoStateManager
Since:
JDO 1.0

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.