net.walend.lyophil
Interface Tray

All Known Subinterfaces:
ConcreteTray
All Known Implementing Classes:
JDBCAoNMutableSetTray, JDBCBackedMutableSetTray, JDBCStringTray, JDBCTypableKeyTray

public interface Tray

An interface for stateless back-end storage peers.

Since:
20010407
Author:
David Walend

Field Summary
static java.lang.String TRAY
           
 
Method Summary
 boolean checkSetUp()
          make sure the backing storage is set up correctly
 void delete(java.io.Serializable id)
          Remove everything about this id from the Tray.
 Set getAllIdentifiersInTray()
          Get a Set containing all the identifiers in this Tray.
 void insertNew(Freezable object)
          Stick a new Freezable into the database.
 boolean isAbsent(java.io.Serializable id)
          For this tray only, is the id not represented by data? In most cases, this is simply !isPresent(id).
 boolean isPresent(java.io.Serializable id)
          For this tray only, is the tray ready for data about this id?
 void setUp()
          Set up the backing storage
 void tearDown()
          clean up the backing storage
 void updateOld(Freezable object)
          Update an old Freezable in the database.
 void validate(java.io.Serializable id, InvalidFrozenMap ifm)
          Validates identifier.
 void validateAll(InvalidFrozenMap ifm, Caster caster)
          Validates all the identifiers in the Caster.
 

Field Detail

TRAY

public static final java.lang.String TRAY
Method Detail

isPresent

public boolean isPresent(java.io.Serializable id)
For this tray only, is the tray ready for data about this id?


isAbsent

public boolean isAbsent(java.io.Serializable id)
For this tray only, is the id not represented by data? In most cases, this is simply !isPresent(id). For empty sets, both can return true.


insertNew

public void insertNew(Freezable object)
Stick a new Freezable into the database. Don't look at it first to make sure it's not there.


updateOld

public void updateOld(Freezable object)
Update an old Freezable in the database. Don't look first to make sure that it's there.


delete

public void delete(java.io.Serializable id)
Remove everything about this id from the Tray.

A recursive method.


validate

public void validate(java.io.Serializable id,
                     InvalidFrozenMap ifm)
Validates identifier.


validateAll

public void validateAll(InvalidFrozenMap ifm,
                        Caster caster)
Validates all the identifiers in the Caster.


getAllIdentifiersInTray

public Set getAllIdentifiersInTray()
Get a Set containing all the identifiers in this Tray. It doesn't use the Freezables table.


checkSetUp

public boolean checkSetUp()
make sure the backing storage is set up correctly

Throws:
PersistenceFailureException

setUp

public void setUp()
Set up the backing storage

Throws:
PersistenceFailureException

tearDown

public void tearDown()
clean up the backing storage

Throws:
PersistenceFailureException


Copyright (c) 2000, 2001, David Walend