net.spy.db
Class Saver

java.lang.Object
  extended bynet.spy.SpyObject
      extended bynet.spy.db.Saver

public class Saver
extends SpyObject

Transactional object saver.


Constructor Summary
Saver(SpyConfig config)
          Get an instance of Saver with the given database config.
Saver(SpyConfig config, SaveContext context)
          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 config)
Get an instance of Saver with the given database config.


Saver

public Saver(SpyConfig config,
             SaveContext context)
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