All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fuchss.objectcasket.objectpacker.port.SessionObserver Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 0.20.17
Show newest version
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