[OLINGO-567] Add default getOperations() for EntityIterator

This commit is contained in:
Michael Bolz 2016-06-30 16:00:25 +02:00
parent 6afb7fff4b
commit 8d51c870fa
1 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import org.apache.olingo.commons.api.ex.ODataNotSupportedException;
import java.net.URI;
import java.util.Iterator;
import java.util.List;
/**
* Data representation as an Iterator for a collection of single entities.
@ -50,6 +51,17 @@ public abstract class EntityIterator extends AbstractEntityCollection implements
throw new ODataNotSupportedException("Entity Iterator does not support remove()");
}
/**
* {@inheritDoc}
* <p/>
* <b>ATTENTION:</b> <code>getOperations</code> is not supported by default.
*/
@Override
public List<Operation> getOperations() {
//"Remove is not supported for iteration over Entities."
throw new ODataNotSupportedException("Entity Iterator does not support getOperations() by default");
}
/**
* {@inheritDoc}
*/