Class EntitySetInvocationHandler<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
java.lang.Object
org.apache.olingo.ext.proxy.commons.AbstractCollectionInvocationHandler<T,EC>
org.apache.olingo.ext.proxy.commons.AbstractEntityCollectionInvocationHandler<T,EC>
org.apache.olingo.ext.proxy.commons.EntitySetInvocationHandler<T,KEY,EC>
- All Implemented Interfaces:
Serializable,Iterable<T>,InvocationHandler,Collection<T>,AbstractEntitySet<T,KEY, EC>
public class EntitySetInvocationHandler<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
extends AbstractEntityCollectionInvocationHandler<T,EC>
implements AbstractEntitySet<T,KEY,EC>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.LoggerLogger.protected AbstractService<?>Fields inherited from class org.apache.olingo.ext.proxy.commons.AbstractEntityCollectionInvocationHandler
collItemRef, targetEntitySetURIFields inherited from class org.apache.olingo.ext.proxy.commons.AbstractCollectionInvocationHandler
annotations, baseURI, itemRef, items, nextPageURI, referenceItems, uri -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntitySetInvocationHandler(Class<?> ref, AbstractService<?> service, URIBuilder uri) -
Method Summary
Modifier and TypeMethodDescriptionprotected static URIBuilderbuildEntitySetURI(Class<?> ref, AbstractService<?> service) protected static URIBuilderbuildEntitySetURI(String entitySetName, AbstractService<?> service) count()Returns the number of entities available.Create an instance of Search.<S extends T,SEC extends EntityCollection<S, ?, ?>>
Search<S,SEC> createSearch(Class<SEC> reference) Create an instance of Search.<S extends T>
voidDeletes the given entities in a batch.voidDeletes the entity with the given key.<S extends T>
voiddelete(S entity) Deletes the given entity in a batch.protected <S extends EntityType<?>>
voiddeleteEntity(EntityInvocationHandler handler, URI entitySetURI) booleanexecute()<S extends T,SEC extends EntityCollection<S, ?, ?>>
SEC<S extends T,SEC extends EntityCollection<S, ?, ?>>
Future<SEC>executeAsync(Class<SEC> collTypeRef) Returns whether an entity with the given id exists.<S extends T,SEC extends EntityCollection<S, ?, ?>>
SECfetchWholeEntitySet(URIBuilder uriBuilder, Class<S> typeRef, Class<SEC> collTypeRef) Retrieves an entity by its key.<S extends T>
SRetrieves an entity by its key, considering polymorphism.protected EdmEnabledODataClientprotected ComplexType<?>getComplex(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem) protected Contextstatic EntitySetInvocationHandlergetInstance(Class<?> ref, AbstractService<?> service) static EntitySetInvocationHandlergetInstance(Class<?> ref, AbstractService<?> service, URI uri) inthashCode()protected ObjectinvokeSelfMethod(Method method, Object[] args) protected booleanisDeleted(EntityInvocationHandler handler) protected booleanisSelfMethod(Method method) iterator()toString()Methods inherited from class org.apache.olingo.ext.proxy.commons.AbstractEntityCollectionInvocationHandler
fetchPartialMethods inherited from class org.apache.olingo.ext.proxy.commons.AbstractCollectionInvocationHandler
add, addAll, addRef, clear, clearQueryOptions, contains, containsAll, executeAsync, expand, filter, filter, getAnnotation, getAnnotationTerms, getRequestURI, getTypeRef, getURI, hasNextPage, isEmpty, nextPage, orderBy, orderBy, refs, remove, removeAll, retainAll, select, setAnnotations, size, skip, toArray, toArray, topMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.olingo.ext.proxy.api.AbstractEntitySet
addMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGLogger. -
service
-
-
Constructor Details
-
EntitySetInvocationHandler
-
-
Method Details
-
getInstance
-
getInstance
public static EntitySetInvocationHandler getInstance(Class<?> ref, AbstractService<?> service, URI uri) -
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
count
Description copied from interface:AbstractEntitySetReturns the number of entities available.- Specified by:
countin interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Returns:
- the number of entities
-
exists
Description copied from interface:AbstractEntitySetReturns whether an entity with the given id exists.- Specified by:
existsin interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
key- must not be null- Returns:
- true if an entity with the given id exists, false otherwise
- Throws:
IllegalArgumentException- in case the given key is null
-
getByKey
Description copied from interface:AbstractEntitySetRetrieves an entity by its key.- Specified by:
getByKeyin interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
key- must not be null- Returns:
- the entity with the given id or null if none found
- Throws:
IllegalArgumentException- in case the given key is null
-
getByKey
Description copied from interface:AbstractEntitySetRetrieves an entity by its key, considering polymorphism.- Specified by:
getByKeyin interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
key- must not be nulltypeRef- entity class to be returned- Returns:
- the entity with the given id or null if none found
- Throws:
IllegalArgumentException- in case the given key is null
-
execute
- Overrides:
executein classAbstractCollectionInvocationHandler<T extends EntityType<?>,EC extends EntityCollection<T, ?, ?>>
-
executeAsync
public <S extends T,SEC extends EntityCollection<S, Future<SEC> executeAsync?, ?>> (Class<SEC> collTypeRef) -
execute
-
createSearch
Description copied from interface:AbstractEntitySetCreate an instance of Search.- Specified by:
createSearchin interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Returns:
- the new search instance
-
createSearch
public <S extends T,SEC extends EntityCollection<S, Search<S,?, ?>> SEC> createSearch(Class<SEC> reference) Description copied from interface:AbstractEntitySetCreate an instance of Search.- Specified by:
createSearchin interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Returns:
- the new search instance
-
fetchWholeEntitySet
public <S extends T,SEC extends EntityCollection<S, SEC fetchWholeEntitySet?, ?>> (URIBuilder uriBuilder, Class<S> typeRef, Class<SEC> collTypeRef) -
delete
Description copied from interface:AbstractEntitySetDeletes the entity with the given key.- Specified by:
deletein interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
key- must not be null- Throws:
IllegalArgumentException- in case the given key is null
-
delete
Description copied from interface:AbstractEntitySetDeletes the given entity in a batch.- Specified by:
deletein interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
entity- to be deleted
-
delete
Description copied from interface:AbstractEntitySetDeletes the given entities in a batch.- Specified by:
deletein interfaceAbstractEntitySet<T extends EntityType<?>,KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
entities- to be deleted
-
iterator
- Specified by:
iteratorin interfaceCollection<T extends EntityType<?>>- Specified by:
iteratorin interfaceIterable<T extends EntityType<?>>- Overrides:
iteratorin classAbstractCollectionInvocationHandler<T extends EntityType<?>,EC extends EntityCollection<T, ?, ?>>
-
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
-