Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.model

public Class ListChangeEvent<T>

extends Object
implements IListChangeEvent<T>
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent
Imports
java.util.List, org.eclipse.persistence.jpa.jpql.tools.model.query.ListHolderStateObject, .StateObject, org.eclipse.persistence.jpa.jpql.utility.iterable.ListIterable, .SnapshotCloneListIterable

The default implementation of IListChangeListener where the generics is the type of the items.
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Modifier and TypeField and Description
private int
private IListChangeEvent.EventType
private List<? extends T>
private List<? extends T>
private String
private StateObject
source

The source where the modification occurred and that fired the event.

private int

Constructor Summary

AccessConstructor and Description
public
ListChangeEvent(StateObject
The source where the modification occurred and that fired the event
source
,
List<? extends T> list, IListChangeEvent.EventType eventType, String listName, List<? extends T> items, int startIndex, int endIndex)

Creates a new ListChangeEvent.

Method Summary

Modifier and TypeMethod and Description
public int
getEndIndex()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getEndIndex.

Returns the index of where the change occurred in the list.
public IListChangeEvent.EventType
getEventType()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getEventType.

Returns the type of change that occurred in the list.
public List<T>
getList()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getList.

Returns a copy of the actual list after the change has happened.
public String
public <S extends ListHolderStateObject<? extends T>> S
getSource()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getSource.

Returns the source where the modification occurred and that fired the event.
public int
getStartIndex()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getStartIndex.

Returns the index of where the change occurred in the list.
public ListIterable<T>
items()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.items.

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

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.itemsSize.

Returns the number of items that caused the original list to change.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

endIndexback to summary
private int endIndex
eventTypeback to summary
private IListChangeEvent.EventType eventType
itemsback to summary
private List<? extends T> items
listback to summary
private List<? extends T> list
listNameback to summary
private String listName
sourceback to summary
private StateObject source

The source where the modification occurred and that fired the event.

startIndexback to summary
private int startIndex

Constructor Detail

ListChangeEventback to summary
public ListChangeEvent(StateObject source, List<? extends T> list, IListChangeEvent.EventType eventType, String listName, List<? extends T> items, int startIndex, int endIndex)

Creates a new ListChangeEvent.

Parameters
source:StateObject

The source where the modification occurred and that fired the event

Method Detail

getEndIndexback to summary
public int getEndIndex()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getEndIndex.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getEndIndex.

Returns the index of where the change occurred in the list.

Returns:int

The index of where the change occurred in the list

Annotations
@Override
getEventTypeback to summary
public IListChangeEvent.EventType getEventType()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getEventType.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getEventType.

Returns the type of change that occurred in the list.

Returns:IListChangeEvent.EventType

One of the possible types of changes

Annotations
@Override
getListback to summary
public List<T> getList()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getList.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getList.

Returns a copy of the actual list after the change has happened.

Returns:List<T>

The copy of the list that got changed

Annotations
@Override
@SuppressWarnings:unchecked
getListNameback to summary
public String getListName()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getListName.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getListName.

Returns the name describing the list.

Returns:String

The name of the list for which IListChangeListeners have been registered with the source to be notified upon changes

Annotations
@Override
getSourceback to summary
public <S extends ListHolderStateObject<? extends T>> S getSource()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getSource.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getSource.

Returns the source where the modification occurred and that fired the event.

Parameters
<S>
The type of the source owning the list
Returns:S

The source of the event

Annotations
@Override
@SuppressWarnings:unchecked
getStartIndexback to summary
public int getStartIndex()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getStartIndex.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.getStartIndex.

Returns the index of where the change occurred in the list.

Returns:int

The index of where the change occurred in the list

Annotations
@Override
itemsback to summary
public ListIterable<T> items()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.items.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.items.

Returns the list of items that have caused the original list to change. Depending on the even type:

Returns:ListIterable<T>

The list of items associated with the EventType

Annotations
@Override
itemsSizeback to summary
public int itemsSize()

Implements org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.itemsSize.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.IListChangeEvent.itemsSize.

Returns the number of items that caused the original list to change.

Returns:int

The count of items triggering this event

Annotations
@Override