SPT Object Database API

com.sptci.prevayler
Interface DatabaseSystem

All Superinterfaces:
AbstractDatabase<PrevalentObject>, Serializable
All Known Implementing Classes:
ConstraintSystem, IndexSystem, ObjectGraphSystem, PrevalentSystem, SearchSystem, StorageSystem

public interface DatabaseSystem
extends AbstractDatabase<PrevalentObject>

An interface that captures the interactions supported by the object database system.

© Copyright 2008 Sans Pareil Technologies, Inc.

Version:
$Id: DatabaseSystem.java 22 2008-11-24 19:04:25Z sptrakesh $
Author:
Rakesh 2008-11-19

Method Summary
 PrevalentObject delete(PrevalentObject object, Date executionTime)
          Delete the specified prevalent object from the prevalent system.
 PrevalentObject save(PrevalentObject object, Date executionTime)
          Save the specified prevalent object to the prevalent system.
 
Methods inherited from interface com.sptci.prevayler.AbstractDatabase
count, fetch, fetch, fetch, fetchIntersection, fetchUnion, search
 

Method Detail

save

PrevalentObject save(PrevalentObject object,
                     Date executionTime)
                     throws PrevalentException
Save the specified prevalent object to the prevalent system. Objects not already persistent are added to the system, while already persistent objects are updated.

Parameters:
object - The prevalent object to be saved in the system.
executionTime - The time at which the transaction was executed.
Returns:
The potentially modified prevalent object.
Throws:
PrevalentException - If errors are encountered while adding/updating the object. Errors thrown could indicate constraint violations.

delete

PrevalentObject delete(PrevalentObject object,
                       Date executionTime)
                       throws PrevalentException
Delete the specified prevalent object from the prevalent system. Processes cascading delete rules if so configured.

Parameters:
object - The prevalent object to delete.
executionTime - The datetime at which the transaction was executed.
Returns:
The deleted object with potential modifications.
Throws:
PrevalentException - If errors are encountered while deleting the prevalent object.

SPT Object Database API