EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.model
Class ListChangeEvent<T>

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.model.ListChangeEvent<T>
All Implemented Interfaces:
IListChangeEvent<T>

public class ListChangeEvent<T>
extends java.lang.Object
implements IListChangeEvent<T>

The default implementation of IListChangeListener where the generics is the type of the items.

Version:
2.4
Author:
Pascal Filion
Since:
2.4

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.persistence.jpa.jpql.model.IListChangeEvent
IListChangeEvent.EventType
 
Constructor Summary
ListChangeEvent(StateObject source, java.util.List<? extends T> list, IListChangeEvent.EventType eventType, java.lang.String listName, java.util.List<? extends T> items, int startIndex, int endIndex)
          Creates a new ListChangeEvent.
 
Method Summary
 int getEndIndex()
          Returns the index of where the change occurred in the list.
 IListChangeEvent.EventType getEventType()
          Returns the type of change that occurred in the list.
 java.util.List<T> getList()
          Returns a copy of the actual list after the change has happened.
 java.lang.String getListName()
          Returns the name describing the list.
<S extends ListHolderStateObject<? extends T>>
S
getSource()
          Returns the source where the modification occurred and that fired the event.
 int getStartIndex()
          Returns the index of where the change occurred in the list.
 IterableListIterator<T> items()
          Returns the list of items that have caused the original list to change.
 int itemsSize()
          Returns the number of items that caused the original list to change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListChangeEvent

public ListChangeEvent(StateObject source,
                       java.util.List<? extends T> list,
                       IListChangeEvent.EventType eventType,
                       java.lang.String listName,
                       java.util.List<? extends T> items,
                       int startIndex,
                       int endIndex)
Creates a new ListChangeEvent.

Parameters:
source - The source where the modification occurred and that fired the event
Method Detail

getEndIndex

public int getEndIndex()
Returns the index of where the change occurred in the list.

Specified by:
getEndIndex in interface IListChangeEvent<T>
Returns:
The index of where the change occurred in the list

getEventType

public IListChangeEvent.EventType getEventType()
Returns the type of change that occurred in the list.

Specified by:
getEventType in interface IListChangeEvent<T>
Returns:
One of the possible types of changes

getList

public java.util.List<T> getList()
Returns a copy of the actual list after the change has happened.

Specified by:
getList in interface IListChangeEvent<T>
Returns:
The copy of the list that got changed

getListName

public java.lang.String getListName()
Returns the name describing the list.

Specified by:
getListName in interface IListChangeEvent<T>
Returns:
The name of the list for which IListChangeListeners have been registered with the source to be notified upon changes

getSource

public <S extends ListHolderStateObject<? extends T>> S getSource()
Returns the source where the modification occurred and that fired the event.

Specified by:
getSource in interface IListChangeEvent<T>
Type Parameters:
S - The type of the source owning the list
Returns:
The source of the event

getStartIndex

public int getStartIndex()
Returns the index of where the change occurred in the list.

Specified by:
getStartIndex in interface IListChangeEvent<T>
Returns:
The index of where the change occurred in the list

items

public IterableListIterator<T> items()
Returns the list of items that have caused the original list to change. Depending on the even type:

Specified by:
items in interface IListChangeEvent<T>
Returns:
The list of items associated with the IListChangeEvent.EventType

itemsSize

public int itemsSize()
Returns the number of items that caused the original list to change.

Specified by:
itemsSize in interface IListChangeEvent<T>
Returns:
The count of items triggering this event

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference