Rollback transaction on fail test. Check existed entities count.
1 package ru.indvdum.jpa.collections
3 import java.util.Collection
4 import java.util.Iterator
6 import java.util.ListIterator
9 * E realization of List interface with support of change notifications
11 * @author indvdum (gotoindvdum[at]gmail[dot]com)
12 * @since 12.01.2012 13:57:48
16 abstract class TriggeredList<E> extends ArrayList<E> {
19 * Invoked after changes in list
21 abstract protected void afterChange();
26 public boolean add(E e) {
27 boolean result = super.add(e);
33 public boolean remove(Object o) {
34 boolean result = super.remove(o);
40 public boolean addAll(Collection<? extends E> c) {
41 boolean result = super.addAll(c);
47 public boolean addAll(int index, Collection<? extends E> c) {
48 boolean result = super.addAll(index, c);
54 public boolean removeAll(Collection<?> c) {
55 boolean result = super.removeAll(c);
61 public boolean retainAll(Collection<?> c) {
62 boolean result = super.retainAll(c);
74 public E set(int index, E element) {
75 E result = super.set(index, element);
81 public void add(int index, E element) {
82 super.add(index, element);
87 public E remove(int index) {
88 E result = super.remove(index);