net.spy.db
Interface Savable

All Known Implementing Classes:
AbstractSavable, CollectionSavable, SavableHashMap, SavableHashSet

public interface Savable

Interface for transactionally savable objects.


Method Summary
 java.util.Collection getPostSavables(SaveContext context)
          Get a Collection of all of the SavableNodes this SavableNode is holding that will need to be saved after this Savable.
 java.util.Collection getPreSavables(SaveContext context)
          Get a Collection of all of the SavableNodes this SavableNode is holding that will need to be saved before this Savable.
 boolean isModified()
          Has this object been modified?
 boolean isNew()
          Is this a new object?
 void save(java.sql.Connection conn, SaveContext context)
          Save this object's state over the given connection.
 

Method Detail

isNew

boolean isNew()
Is this a new object?


isModified

boolean isModified()
Has this object been modified?


save

void save(java.sql.Connection conn,
          SaveContext context)
          throws SaveException,
                 java.sql.SQLException
Save this object's state over the given connection.

Parameters:
conn - the connection to use for saving
context - SaveContext being used in this Saver session
Throws:
SaveException
java.sql.SQLException

getPreSavables

java.util.Collection getPreSavables(SaveContext context)
Get a Collection of all of the SavableNodes this SavableNode is holding that will need to be saved before this Savable.

Parameters:
context - SaveContext being used in this Saver session
Returns:
a collection of objects this SavableNode depends on

getPostSavables

java.util.Collection getPostSavables(SaveContext context)
Get a Collection of all of the SavableNodes this SavableNode is holding that will need to be saved after this Savable.

Parameters:
context - SaveContext being used in this Saver session
Returns:
a collection of objects this SavableNode depends on


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