org.apache.ojb.odmg.states
Class StateNewDelete

java.lang.Object
  extended byorg.apache.ojb.odmg.states.ModificationState
      extended byorg.apache.ojb.odmg.states.StateNewDelete
All Implemented Interfaces:
java.io.Serializable

public class StateNewDelete
extends ModificationState

this state represents new objects which have been mrked for deletion during tx.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ojb.odmg.states.ModificationState
serialVersionUID
 
Method Summary
 void checkpoint(ObjectEnvelope mod, PersistenceBroker broker)
          rollback the ObjectModification
 void commit(ObjectEnvelope mod, PersistenceBroker broker)
          commit ObjectModification
static StateNewDelete getInstance()
          perform a checkpoint, i.e.
 ModificationState markClean()
          return resulting state after marking clean
 ModificationState markDelete()
          return resulting state after marking delete
 ModificationState markDirty()
          return resulting state after marking dirty
 ModificationState markNew()
          return resulting state after marking new
 ModificationState markOld()
          return resulting state after marking old
 boolean needsDelete()
          returns true is this state requires DELETE * @return boolean
 void rollback(ObjectEnvelope mod, PersistenceBroker broker)
           
 
Methods inherited from class org.apache.ojb.odmg.states.ModificationState
needsInsert, needsUpdate, removeFromCache, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

markClean

public ModificationState markClean()
return resulting state after marking clean

Specified by:
markClean in class ModificationState

markDelete

public ModificationState markDelete()
return resulting state after marking delete

Specified by:
markDelete in class ModificationState

markDirty

public ModificationState markDirty()
return resulting state after marking dirty

Specified by:
markDirty in class ModificationState

markNew

public ModificationState markNew()
return resulting state after marking new

Specified by:
markNew in class ModificationState

markOld

public ModificationState markOld()
return resulting state after marking old

Specified by:
markOld in class ModificationState

needsDelete

public boolean needsDelete()
returns true is this state requires DELETE * @return boolean

Overrides:
needsDelete in class ModificationState
Returns:
boolean

getInstance

public static StateNewDelete getInstance()
perform a checkpoint, i.e. perform updates on underlying db but keep locks on objects


checkpoint

public void checkpoint(ObjectEnvelope mod,
                       PersistenceBroker broker)
rollback the ObjectModification

Specified by:
checkpoint in class ModificationState

commit

public void commit(ObjectEnvelope mod,
                   PersistenceBroker broker)
commit ObjectModification

Specified by:
commit in class ModificationState

rollback

public void rollback(ObjectEnvelope mod,
                     PersistenceBroker broker)
Specified by:
rollback in class ModificationState


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14