ojb.server.states
Class StateNewDirty

java.lang.Object
  |
  +--ojb.server.states.ModificationState
        |
        +--ojb.server.states.StateNewDirty

public class StateNewDirty
extends ModificationState

this state represents new objects which have been altered during tx.


Method Summary
 void checkpoint(ObjectTransactionWrapper mod)
          rollback the ObjectModification
 void commit(ObjectTransactionWrapper mod)
          commit the associated transaction
static StateNewDirty getInstance()
          perform a checkpoint, i.e. perform updates on underlying db but keep locks on objects
 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 needsInsert()
          object is new, thus we need an INSERT to store it
 void rollback(ObjectTransactionWrapper mod)
          Method declaration
 
Methods inherited from class ojb.server.states.ModificationState
moveToCache, 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
Overrides:
markClean in class ModificationState

markDelete

public ModificationState markDelete()
return resulting state after marking delete
Overrides:
markDelete in class ModificationState

markDirty

public ModificationState markDirty()
return resulting state after marking dirty
Overrides:
markDirty in class ModificationState

markNew

public ModificationState markNew()
return resulting state after marking new
Overrides:
markNew in class ModificationState

markOld

public ModificationState markOld()
return resulting state after marking old
Overrides:
markOld in class ModificationState

getInstance

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

needsInsert

public boolean needsInsert()
object is new, thus we need an INSERT to store it
Overrides:
needsInsert in class ModificationState
Following copied from class: ojb.server.states.ModificationState
Returns:
 
See Also:

checkpoint

public void checkpoint(ObjectTransactionWrapper mod)
                throws PersistenceBrokerException
rollback the ObjectModification
Overrides:
checkpoint in class ModificationState
Following copied from class: ojb.server.states.ModificationState
Parameters:
mod -  
Throws:
PersistenceBrokerException -  
See Also:

commit

public void commit(ObjectTransactionWrapper mod)
            throws PersistenceBrokerException
commit the associated transaction
Overrides:
commit in class ModificationState
Following copied from class: ojb.server.states.ModificationState
Parameters:
mod -  
Throws:
PersistenceBrokerException -  
See Also:

rollback

public void rollback(ObjectTransactionWrapper mod)
Method declaration
Overrides:
rollback in class ModificationState
Parameters:
mod -  
See Also:


Authors: Thomas Mahler, David Dixon-Peugh. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.1.120, 2001-05-12