com.vaadin.addon.jpacontainer
Interface EntityProviderChangeEvent<T>

All Superinterfaces:
Serializable
All Known Subinterfaces:
EntityProviderChangeEvent.EntitiesAddedEvent<T>, EntityProviderChangeEvent.EntitiesRemovedEvent<T>, EntityProviderChangeEvent.EntitiesUpdatedEvent<T>, EntityProviderChangeEvent.EntityPropertyUpdatedEvent<T>
All Known Implementing Classes:
BatchUpdatePerformedEvent

public interface EntityProviderChangeEvent<T>
extends Serializable

Event indicating that the contents of a EntityProvider has been changed (e.g. entities have been added or removed).

Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)

Nested Class Summary
static interface EntityProviderChangeEvent.EntitiesAddedEvent<T>
          Event indicating that one or more entities have been added to the entity provider.
static interface EntityProviderChangeEvent.EntitiesRemovedEvent<T>
          Event indicating that one or more entities have been removed from the entity provider.
static interface EntityProviderChangeEvent.EntitiesUpdatedEvent<T>
          Event indicating that one or more entities have been updated in the entity provider.
static interface EntityProviderChangeEvent.EntityPropertyUpdatedEvent<T>
          Event indicating that one or more entities have been updated a specific property in the entity provider.
 
Method Summary
 Collection<T> getAffectedEntities()
          Gets the affected entities, if supported by the implementation.
 EntityProvider<T> getEntityProvider()
          Gets the entity provider whose contents has been changed.
 

Method Detail

getEntityProvider

EntityProvider<T> getEntityProvider()
Gets the entity provider whose contents has been changed.

Returns:
the entity manager (never null).

getAffectedEntities

Collection<T> getAffectedEntities()
Gets the affected entities, if supported by the implementation. If entities have been modified, this collection may contain all modified entities, if entities have been added, this collection may contain all added entities, etc. If the number of changed entities is very large, e.g. due to a major change in the entire data source, the collection may be empty.

Returns:
an unmodifiable collection of affected entities (never null, but may be empty).


Copyright © 2013 Vaadin Ltd. All rights reserved.