org.fuchss.objectcasket.objectpacker.port.SessionObserver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of object-casket Show documentation
Show all versions of object-casket Show documentation
Object Casket is a simple O/R mapper that can be used together with the Java Persistence API (JPA). The aim is to provide a simple solution for small projects to store multi-related
entities in a simple manner.
package org.fuchss.objectcasket.objectpacker.port;
/**
* To avoid magic surprises, it is possible to assign a SessionObserver to any
* {@link Session}. These observers will be informed if managed objects changed
* in background by some concurrent session.
*
* @see Session#resync(Object)
* @see Session#register(SessionObserver)
* @see Session#deregister(SessionObserver)
*/
public interface SessionObserver {
/**
* @param deleted -a managed object which was deleted in another session.
* @see Session#delete(Object)
*/
void externDeleted(Object deleted);
/**
* @param changed - a managed object which was modified in another session.
* @see Session#persist(Object)
*/
void externChanged(Object changed);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy