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
FieldsModifier and TypeFieldDescriptionprotected final List<ClientAnnotation>
protected final URI
protected Collection<T>
protected static final org.slf4j.Logger
Logger.protected URI
protected Collection<String>
protected AbstractService<?>
protected URIBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractCollectionInvocationHandler
(AbstractService<?> service, Collection<T> items, Class<T> itemRef, URIBuilder uri) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends T> collection) <ET extends EntityType<?>>
booleanaddRef
(ET element) protected static URIBuilder
buildEntitySetURI
(Class<?> ref, AbstractService<?> service) protected static URIBuilder
buildEntitySetURI
(String entitySetName, AbstractService<?> service) void
clear()
void
boolean
boolean
containsAll
(Collection<?> collection) protected <S extends EntityType<?>>
voiddeleteEntity
(EntityInvocationHandler handler, URI entitySetURI) boolean
execute()
void
abstract org.apache.commons.lang3.tuple.Triple<List<T>,
URI, List<ClientAnnotation>> fetchPartial
(URI uri, Class<T> typeRef) void
void
getAnnotation
(Class<? extends AbstractTerm> term) Collection<Class<? extends AbstractTerm>>
protected EdmEnabledODataClient
protected ComplexType<?>
getComplex
(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem) protected Context
protected URI
getURI()
int
hashCode()
boolean
protected Object
invokeSelfMethod
(Method method, Object[] args) protected boolean
isDeleted
(EntityInvocationHandler handler) boolean
isEmpty()
protected boolean
isSelfMethod
(Method method) iterator()
void
nextPage()
void
void
void
refs()
boolean
boolean
removeAll
(Collection<?> collection) boolean
retainAll
(Collection<?> collection) void
void
setAnnotations
(List<ClientAnnotation> annotations) int
size()
void
skip
(int skip) Object[]
toArray()
<U> U[]
toArray
(U[] array) void
top
(int top) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
Methods inherited from interface java.lang.reflect.InvocationHandler
invoke
-
Field Details
-
nextPageURI
-
items
-
referenceItems
-
baseURI
-
uri
-
itemRef
-
annotations
-
LOG
protected static final org.slf4j.Logger LOGLogger. -
service
-
-
Constructor Details
-
AbstractCollectionInvocationHandler
public AbstractCollectionInvocationHandler(AbstractService<?> service, Collection<T> items, Class<T> itemRef, URIBuilder uri)
-
-
Method Details
-
executeAsync
-
execute
-
fetchPartial
-
setAnnotations
-
getTypeRef
-
getURI
-
nextPage
public void nextPage() -
hasNextPage
public boolean hasNextPage() -
getAnnotation
-
add
- Specified by:
add
in interfaceCollection<T extends Serializable>
-
addRef
-
refs
public void refs() -
size
public int size()- Specified by:
size
in interfaceCollection<T extends Serializable>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<T extends Serializable>
-
contains
- Specified by:
contains
in interfaceCollection<T extends Serializable>
-
iterator
- Specified by:
iterator
in interfaceCollection<T extends Serializable>
- Specified by:
iterator
in interfaceIterable<T extends Serializable>
-
toArray
- Specified by:
toArray
in interfaceCollection<T extends Serializable>
-
toArray
public <U> U[] toArray(U[] array) - Specified by:
toArray
in interfaceCollection<T extends Serializable>
-
getAnnotationTerms
-
remove
- Specified by:
remove
in interfaceCollection<T extends Serializable>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T extends Serializable>
-
addAll
- Specified by:
addAll
in interfaceCollection<T extends Serializable>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<T extends Serializable>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<T extends Serializable>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<T extends Serializable>
-
filter
-
filter
-
orderBy
-
orderBy
-
top
- Throws:
IllegalArgumentException
-
skip
- Throws:
IllegalArgumentException
-
expand
-
select
-
getRequestURI
-
clearQueryOptions
public void clearQueryOptions() -
getClient
-
getContext
-
isSelfMethod
-
invokeSelfMethod
- Throws:
Throwable
-
getComplex
protected ComplexType<?> getComplex(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem) -
isDeleted
-
deleteEntity
protected <S extends EntityType<?>> void deleteEntity(EntityInvocationHandler handler, URI entitySetURI) -
buildEntitySetURI
-
buildEntitySetURI
-
equals
-
hashCode
public int hashCode() -
toString
-