Class InlineEntitySetInvocationHandler<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.InlineEntitySetInvocationHandler<T,KEY,EC>
- All Implemented Interfaces:
Serializable
,Iterable<T>
,InvocationHandler
,Collection<T>
,AbstractEntitySet<T,
KEY, EC>
public class InlineEntitySetInvocationHandler<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.Logger
Logger.protected AbstractService<?>
Fields inherited from class org.apache.olingo.ext.proxy.commons.AbstractEntityCollectionInvocationHandler
collItemRef, targetEntitySetURI
Fields inherited from class org.apache.olingo.ext.proxy.commons.AbstractCollectionInvocationHandler
annotations, baseURI, itemRef, items, nextPageURI, referenceItems, uri
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InlineEntitySetInvocationHandler
(Class<?> ref, AbstractService<?> service, URIBuilder uri, Collection<T> items) -
Method Summary
Modifier and TypeMethodDescriptionprotected static URIBuilder
buildEntitySetURI
(Class<?> ref, AbstractService<?> service) protected static URIBuilder
buildEntitySetURI
(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.void
Deletes 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) boolean
execute()
<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.Retrieves an entity by its key.<S extends T>
SRetrieves an entity by its key, considering polymorphism.protected EdmEnabledODataClient
protected ComplexType<?>
getComplex
(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem) protected Context
getInstance
(Class<?> ref, AbstractService<?> service, URI uri, List<Object> items) int
hashCode()
protected Object
invokeSelfMethod
(Method method, Object[] args) protected boolean
isDeleted
(EntityInvocationHandler handler) protected boolean
isSelfMethod
(Method method) toString()
Methods inherited from class org.apache.olingo.ext.proxy.commons.AbstractEntityCollectionInvocationHandler
fetchPartial
Methods 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, iterator, nextPage, orderBy, orderBy, refs, remove, removeAll, retainAll, select, setAnnotations, size, skip, toArray, toArray, top
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.olingo.ext.proxy.api.AbstractEntitySet
add
Methods 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
-
InlineEntitySetInvocationHandler
protected InlineEntitySetInvocationHandler(Class<?> ref, AbstractService<?> service, URIBuilder uri, Collection<T> items)
-
-
Method Details
-
getInstance
public static InlineEntitySetInvocationHandler getInstance(Class<?> ref, AbstractService<?> service, URI uri, List<Object> items) -
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
count
Description copied from interface:AbstractEntitySet
Returns the number of entities available.- Specified by:
count
in interfaceAbstractEntitySet<T extends EntityType<?>,
KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Returns:
- the number of entities
-
exists
Description copied from interface:AbstractEntitySet
Returns whether an entity with the given id exists.- Specified by:
exists
in 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:AbstractEntitySet
Retrieves an entity by its key.- Specified by:
getByKey
in 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:AbstractEntitySet
Retrieves an entity by its key, considering polymorphism.- Specified by:
getByKey
in 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:
execute
in 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:AbstractEntitySet
Create an instance of Search.- Specified by:
createSearch
in 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:AbstractEntitySet
Create an instance of Search.- Specified by:
createSearch
in interfaceAbstractEntitySet<T extends EntityType<?>,
KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Returns:
- the new search instance
-
delete
Description copied from interface:AbstractEntitySet
Deletes the entity with the given key.- Specified by:
delete
in 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:AbstractEntitySet
Deletes the given entity in a batch.- Specified by:
delete
in interfaceAbstractEntitySet<T extends EntityType<?>,
KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
entity
- to be deleted
-
delete
Description copied from interface:AbstractEntitySet
Deletes the given entities in a batch.- Specified by:
delete
in interfaceAbstractEntitySet<T extends EntityType<?>,
KEY extends Serializable, EC extends EntityCollection<T, ?, ?>> - Parameters:
entities
- to be deleted
-
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
-