net.spy.db
Class Saver

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.db.Saver

public class Saver
extends SpyObject

Transactional object saver.


Constructor Summary
Saver(SpyConfig conf)
          Get an instance of Saver with the given database config.
Saver(SpyConfig conf, SaveContext ctx)
          Get an instance of saver with the given database config and context.
 
Method Summary
 void save(Savable o)
          Save this Savabale and everything it contains at the default isolation level.
 void save(Savable o, int level)
          Save this Savabale and everything it contains at the default isolation level.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Saver

public Saver(SpyConfig conf)
Get an instance of Saver with the given database config.


Saver

public Saver(SpyConfig conf,
             SaveContext ctx)
Get an instance of saver with the given database config and context.

Method Detail

save

public void save(Savable o)
          throws SaveException
Save this Savabale and everything it contains at the default isolation level.

Throws:
SaveException

save

public void save(Savable o,
                 int level)
          throws SaveException
Save this Savabale and everything it contains at the default isolation level.

Parameters:
o - the savable
level - the isolation level (as defined in java.sql.Connection)
Throws:
SaveException


Copyright © 1995-2006 SPY Internetworking. All Rights Reserved.