org.ioc.commons.integration.common.ObjectState Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ioc-commons Show documentation
Show all versions of ioc-commons Show documentation
This project defines a set of useful java interfaces for helping you in the definition of the structure of your developments in Java-projects which are designed using a Inversion-Of-Control (IOC) pattern. Useful for MVP-Pattern designs in applications coded on GWT, SWT, Android, etc.
package org.ioc.commons.integration.common;
import org.ioc.commons.integration.service.ServiceObjectManager;
/**
* The possible states of an object given by {@link ServiceObjectManager}.
*
* @author Jesús Lunar Pérez
*
*/
public enum ObjectState {
/**
* The implementation of {@link ServiceObjectManager} cannot determine the
* object state.
*/
UNKNOWN,
/**
* The object has never been persistent
*/
TRANSIENT,
/**
* The object is persistent.
*
* On implementations which differentiate between client and server sides,
* changes made on a client side persistent object will be collected and
* held until entity is sent to the server, which will be responsible of
* effectively persist them.
*/
PERSISTENT,
/**
* The object is no longer persistent and no changes will be collected as in
* {@link ObjectState#PERSISTENT} state.
*
* On implementations which differentiate between client and server sides,
* no changes will be sent to the server side
*/
DETACHED
}