org.apache.olingo.ext.proxy.commons

## Class AbstractCollectionInvocationHandler<T extends Serializable,EC extends Collection<T>>

- java.lang.Object
- - org.apache.olingo.ext.proxy.commons.AbstractCollectionInvocationHandler<T,EC>

- All Implemented Interfaces:
    Iterable<T>, InvocationHandler, Collection<T>
  Direct Known Subclasses:
    AbstractEntityCollectionInvocationHandler, ComplexCollectionInvocationHandler, PrimitiveCollectionInvocationHandler

      public abstract class AbstractCollectionInvocationHandler<T extends Serializable,EC extends Collection<T>>
      extends Object
      implements Collection<T>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected List<ClientAnnotation>` | `annotations`
    `protected URI` | `baseURI`
    `protected Class<T>` | `itemRef`
    `protected Collection<T>` | `items`
    `protected static org.slf4j.Logger` | `LOG` Logger.
    `protected URI` | `nextPageURI`
    `protected Collection<String>` | `referenceItems`
    `protected AbstractService<?>` | `service`
    `protected URIBuilder` | `uri`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCollectionInvocationHandler(AbstractService<?> service, Collection<T> items, Class<T> itemRef, URIBuilder uri)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(T element)`
    `boolean` | `addAll(Collection<? extends T> collection)`
    `<ET extends EntityType<?>> boolean` | `addRef(ET element)`
    `protected static URIBuilder` | `buildEntitySetURI(Class<?> ref, AbstractService<?> service)`
    `protected static URIBuilder` | `buildEntitySetURI(String entitySetName, AbstractService<?> service)`
    `void` | `clear()`
    `void` | `clearQueryOptions()`
    `boolean` | `contains(Object object)`
    `boolean` | `containsAll(Collection<?> collection)`
    `protected <S extends EntityType<?>> void` | `deleteEntity(EntityInvocationHandler handler, URI entitySetURI)`
    `boolean` | `equals(Object obj)`
    `Collection<T>` | `execute()`
    `Future<Collection<T>>` | `executeAsync()`
    `void` | `expand(String... expand)`
    `abstract org.apache.commons.lang3.tuple.Triple<List<T>,URI,List<ClientAnnotation>>` | `fetchPartial(URI uri, Class<T> typeRef)`
    `void` | `filter(String filter)`
    `void` | `filter(URIFilter filter)`
    `Object` | `getAnnotation(Class<? extends AbstractTerm> term)`
    `Collection<Class<? extends AbstractTerm>>` | `getAnnotationTerms()`
    `protected EdmEnabledODataClient` | `getClient()`
    `protected ComplexType<?>` | `getComplex(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem)`
    `protected Context` | `getContext()`
    `URI` | `getRequestURI()`
    `protected Class<T>` | `getTypeRef()`
    `protected URI` | `getURI()`
    `int` | `hashCode()`
    `boolean` | `hasNextPage()`
    `protected Object` | `invokeSelfMethod(Method method, Object[] args)`
    `protected boolean` | `isDeleted(EntityInvocationHandler handler)`
    `boolean` | `isEmpty()`
    `protected boolean` | `isSelfMethod(Method method)`
    `Iterator<T>` | `iterator()`
    `void` | `nextPage()`
    `void` | `orderBy(Sort... sort)`
    `void` | `orderBy(String orderBy)`
    `void` | `refs()`
    `boolean` | `remove(Object object)`
    `boolean` | `removeAll(Collection<?> collection)`
    `boolean` | `retainAll(Collection<?> collection)`
    `void` | `select(String... select)`
    `void` | `setAnnotations(List<ClientAnnotation> annotations)`
    `int` | `size()`
    `void` | `skip(int skip)`
    `Object[]` | `toArray()`
    `<U> U[]` | `toArray(U[] array)`
    `void` | `top(int top)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Collection

      `equals, hashCode, parallelStream, removeIf, spliterator, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

    - ### Methods inherited from interface java.lang.reflect.InvocationHandler

      `invoke`

- - ### Field Detail

    - #### nextPageURI

          protected URI nextPageURI

    - #### items

          protected Collection<T extends Serializable> items

    - #### referenceItems

          protected Collection<String> referenceItems

    - #### baseURI

          protected final URI baseURI

    - #### uri

          protected URIBuilder uri

    - #### itemRef

          protected final Class<T extends Serializable> itemRef

    - #### annotations

          protected final List<ClientAnnotation> annotations

    - #### LOG

          protected static final org.slf4j.Logger LOG

      Logger.

    - #### service

          protected AbstractService<?> service

  - ### Constructor Detail

    - #### AbstractCollectionInvocationHandler

          public AbstractCollectionInvocationHandler(AbstractService<?> service,
                                                     Collection<T> items,
                                                     Class<T> itemRef,
                                                     URIBuilder uri)

  - ### Method Detail

    - #### executeAsync

          public Future<Collection<T>> executeAsync()

    - #### execute

          public Collection<T> execute()

    - #### fetchPartial

          public abstract org.apache.commons.lang3.tuple.Triple<List<T>,URI,List<ClientAnnotation>> fetchPartial(URI uri,
                                                                                                                 Class<T> typeRef)

    - #### setAnnotations

          public void setAnnotations(List<ClientAnnotation> annotations)

    - #### getTypeRef

          protected Class<T> getTypeRef()

    - #### getURI

          protected URI getURI()

    - #### nextPage

          public void nextPage()

    - #### hasNextPage

          public boolean hasNextPage()

    - #### getAnnotation

          public Object getAnnotation(Class<? extends AbstractTerm> term)

    - #### add

          public boolean add(T element)

      Specified by:
        `add` in interface `Collection<T extends Serializable>`

    - #### addRef

          public <ET extends EntityType<?>> boolean addRef(ET element)

    - #### refs

          public void refs()

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<T extends Serializable>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `Collection<T extends Serializable>`

    - #### contains

          public boolean contains(Object object)

      Specified by:
        `contains` in interface `Collection<T extends Serializable>`

    - #### iterator

          public Iterator<T> iterator()

      Specified by:
        `iterator` in interface `Iterable<T extends Serializable>`
      Specified by:
        `iterator` in interface `Collection<T extends Serializable>`

    - #### toArray

          public Object[] toArray()

      Specified by:
        `toArray` in interface `Collection<T extends Serializable>`

    - #### toArray

          public <U> U[] toArray(U[] array)

      Specified by:
        `toArray` in interface `Collection<T extends Serializable>`

    - #### getAnnotationTerms

          public Collection<Class<? extends AbstractTerm>> getAnnotationTerms()

    - #### remove

          public boolean remove(Object object)

      Specified by:
        `remove` in interface `Collection<T extends Serializable>`

    - #### containsAll

          public boolean containsAll(Collection<?> collection)

      Specified by:
        `containsAll` in interface `Collection<T extends Serializable>`

    - #### addAll

          public boolean addAll(Collection<? extends T> collection)

      Specified by:
        `addAll` in interface `Collection<T extends Serializable>`

    - #### removeAll

          public boolean removeAll(Collection<?> collection)

      Specified by:
        `removeAll` in interface `Collection<T extends Serializable>`

    - #### retainAll

          public boolean retainAll(Collection<?> collection)

      Specified by:
        `retainAll` in interface `Collection<T extends Serializable>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Collection<T extends Serializable>`

    - #### filter

          public void filter(String filter)

    - #### filter

          public void filter(URIFilter filter)

    - #### orderBy

          public void orderBy(Sort... sort)

    - #### orderBy

          public void orderBy(String orderBy)

    - #### top

          public void top(int top)
                   throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### skip

          public void skip(int skip)
                    throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### expand

          public void expand(String... expand)

    - #### select

          public void select(String... select)

    - #### getRequestURI

          public URI getRequestURI()

    - #### clearQueryOptions

          public void clearQueryOptions()

    - #### getClient

          protected EdmEnabledODataClient getClient()

    - #### getContext

          protected Context getContext()

    - #### isSelfMethod

          protected boolean isSelfMethod(Method method)

    - #### invokeSelfMethod

          protected Object invokeSelfMethod(Method method,
                                            Object[] args)
                                     throws Throwable

      Throws:
        `Throwable`

    - #### getComplex

          protected ComplexType<?> getComplex(String name,
                                              ClientValue value,
                                              Class<?> ref,
                                              EntityInvocationHandler handler,
                                              URI baseURI,
                                              boolean collectionItem)

    - #### isDeleted

          protected boolean isDeleted(EntityInvocationHandler handler)

    - #### deleteEntity

          protected <S extends EntityType<?>> void deleteEntity(EntityInvocationHandler handler,
                                                                URI entitySetURI)

    - #### buildEntitySetURI

          protected static URIBuilder buildEntitySetURI(Class<?> ref,
                                                        AbstractService<?> service)

    - #### buildEntitySetURI

          protected static URIBuilder buildEntitySetURI(String entitySetName,
                                                        AbstractService<?> service)

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.