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

org.sklsft.commons.model.patterns.StateManager Maven / Gradle / Ivy

package org.sklsft.commons.model.patterns;

import java.io.Serializable;

import org.sklsft.commons.model.interfaces.Entity;

/**
 * A basic interface to control states
 * 
 * @author Nicolas Thibault
 *
 * @param  : the object {@link Entity}
 * @param  : the type of id used by the object
 */
public interface StateManager, U extends Serializable> {

	/**
	 * can save
	 */
	boolean canSave(T obj);
	
	/**
	 * check can save
	 */
	void checkCanSave(T obj);

	/**
	 * can update
	 */
	boolean canUpdate(T obj);

	/**
	 * check can update
	 */
	void checkCanUpdate(T obj);

	/**
	 * can delete
	 */
	boolean canDelete(T obj);

	/**
	 * check can delete
	 */
	void checkCanDelete(T obj);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy