|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.collection.lyophil.jdbc.JDBCBackedMutableSetTray
A simple backing for MutableSets that uses the jdbc kit. A jdbc-based Freezer or a Frozen EJB for MutableSets can use this class for database access.
On freeze, all this particular tray does is maintain the set's existence. MutableSet methods do all the work.
Field Summary | |
static java.lang.String |
PROPKEY
|
Fields inherited from interface net.walend.lyophil.Tray |
TRAY |
Constructor Summary | |
JDBCBackedMutableSetTray()
|
Method Summary | |
boolean |
add(java.io.Serializable id,
java.io.Serializable member)
|
protected java.lang.Long |
castIdentifier(java.io.Serializable identifier)
|
boolean |
checkSetUp()
make sure the backing storage is set up correctly |
void |
clear(java.io.Serializable id)
|
boolean |
contains(java.io.Serializable identifier,
java.io.Serializable member)
|
void |
delete(java.io.Serializable id)
Remove everything about this id from the Tray. |
void |
freeze(Freezable object)
Puts the Freezable in cold storage. |
Set |
getAllIdentifiersInTray()
Get a Set containing all the identifiers in this Tray. |
protected java.lang.String |
getDatabaseName()
|
protected PropertySource |
getPropertySource()
|
java.util.Iterator |
identifierIterator(java.io.Serializable id)
|
Set |
identifierSet(java.io.Serializable id)
|
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? |
boolean |
remove(java.io.Serializable id,
java.io.Serializable member)
|
void |
setUp()
Set up the backing storage |
int |
size(java.io.Serializable id)
|
void |
tearDown()
clean up the backing storage |
Freezable |
thaw(java.io.Serializable identifier)
Gets a Freezable out of cold storage. |
void |
throwOut(java.io.Serializable identifier)
Remove a frozen instance from cold 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPKEY
Constructor Detail |
public JDBCBackedMutableSetTray()
Method Detail |
protected java.lang.String getDatabaseName()
protected PropertySource getPropertySource()
protected java.lang.Long castIdentifier(java.io.Serializable identifier)
public boolean isPresent(java.io.Serializable id)
Tray
isPresent
in interface Tray
public boolean isAbsent(java.io.Serializable id)
Tray
isAbsent
in interface Tray
public void insertNew(Freezable object)
Tray
insertNew
in interface Tray
public void updateOld(Freezable object)
Tray
updateOld
in interface Tray
public void delete(java.io.Serializable id)
Tray
A recursive method.
delete
in interface Tray
public void validate(java.io.Serializable id, InvalidFrozenMap ifm)
Tray
validate
in interface Tray
public void validateAll(InvalidFrozenMap ifm, Caster caster)
Tray
validateAll
in interface Tray
public Set getAllIdentifiersInTray()
Tray
getAllIdentifiersInTray
in interface Tray
public void freeze(Freezable object)
ConcreteTray
freeze
in interface ConcreteTray
public Freezable thaw(java.io.Serializable identifier)
ConcreteTray
thaw
in interface ConcreteTray
public void throwOut(java.io.Serializable identifier) throws NotInFreezerException
throwOut
in interface ConcreteTray
CannotThrowOutException
NotInFreezerException
public boolean checkSetUp()
Tray
checkSetUp
in interface Tray
public void setUp()
Tray
setUp
in interface Tray
public void tearDown()
Tray
tearDown
in interface Tray
public int size(java.io.Serializable id)
public boolean contains(java.io.Serializable identifier, java.io.Serializable member)
public java.util.Iterator identifierIterator(java.io.Serializable id)
public Set identifierSet(java.io.Serializable id)
public boolean add(java.io.Serializable id, java.io.Serializable member)
public boolean remove(java.io.Serializable id, java.io.Serializable member)
public void clear(java.io.Serializable id)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |