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

com.vaadin.addon.jpacontainer.EntityProviderChangeNotifier Maven / Gradle / Ivy

The newest version!
/*
 * JPAContainer
 * Copyright (C) 2010 Oy IT Mill Ltd
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see .
 */
package com.vaadin.addon.jpacontainer;

import java.io.Serializable;

/**
 * Interface to be implemented by {@link EntityProvider}s that wish to notify
 * clients (in practice EntityContainers) when their contents change.
 * 

* The EntityProvider should at least notify its listeners of the following events: * *

    *
  • An entity is added to the entity provider
  • *
  • An already existing entity is updated
  • *
  • An entity is removed from the entity provider
  • *
  • The contents of the entity provider is changed completely
  • *
*

* This is useful in situations where several EntityContainers share the same * entity provider. * * * @author Petter Holmström (IT Mill) * @since 1.0 */ public interface EntityProviderChangeNotifier extends Serializable { /** * Registers listener to be notified of * {@link EntityProviderChangeEvent}s. * * @param listener * the listener to register (must not be null). */ public void addListener(EntityProviderChangeListener listener); /** * Removes the previously registered listener. * * @param listener * the listener to remove (must not be null). */ public void removeListener(EntityProviderChangeListener listener); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy