public class InlineEntitySetInvocationHandler<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>> extends AbstractEntityCollectionInvocationHandler<T,EC> implements AbstractEntitySet<T,KEY,EC>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG
Logger.
|
protected AbstractService<?> |
service |
collItemRef, targetEntitySetURI
annotations, baseURI, itemRef, items, nextPageURI, referenceItems, uri
Modifier | Constructor and Description |
---|---|
protected |
InlineEntitySetInvocationHandler(Class<?> ref,
AbstractService<?> service,
URIBuilder uri,
Collection<T> items) |
Modifier and Type | Method and Description |
---|---|
protected static URIBuilder |
buildEntitySetURI(Class<?> ref,
AbstractService<?> service) |
protected static URIBuilder |
buildEntitySetURI(String entitySetName,
AbstractService<?> service) |
Long |
count()
Returns the number of entities available.
|
Search<T,EC> |
createSearch()
Create an instance of Search.
|
<S extends T,SEC extends EntityCollection<S,?,?>> |
createSearch(Class<SEC> reference)
Create an instance of Search.
|
<S extends T> |
delete(Iterable<S> entities)
Deletes the given entities in a batch.
|
void |
delete(KEY key)
Deletes the entity with the given key.
|
<S extends T> |
delete(S entity)
Deletes the given entity in a batch.
|
protected <S extends EntityType<?>> |
deleteEntity(EntityInvocationHandler handler,
URI entitySetURI) |
boolean |
equals(Object obj) |
EC |
execute() |
<S extends T,SEC extends EntityCollection<S,?,?>> |
execute(Class<SEC> collTypeRef) |
<S extends T,SEC extends EntityCollection<S,?,?>> |
executeAsync(Class<SEC> collTypeRef) |
Boolean |
exists(KEY key)
Returns whether an entity with the given id exists.
|
T |
getByKey(KEY key)
Retrieves an entity by its key.
|
<S extends T> |
getByKey(KEY key,
Class<S> typeRef)
Retrieves an entity by its key, considering polymorphism.
|
protected EdmEnabledODataClient |
getClient() |
protected ComplexType<?> |
getComplex(String name,
ClientValue value,
Class<?> ref,
EntityInvocationHandler handler,
URI baseURI,
boolean collectionItem) |
protected Context |
getContext() |
static InlineEntitySetInvocationHandler |
getInstance(Class<?> ref,
AbstractService<?> service,
URI uri,
List<Object> items) |
int |
hashCode() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
protected Object |
invokeSelfMethod(Method method,
Object[] args) |
protected boolean |
isDeleted(EntityInvocationHandler handler) |
protected boolean |
isSelfMethod(Method method) |
String |
toString() |
fetchPartial
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add
forEach, iterator, spliterator
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected static final org.slf4j.Logger LOG
protected AbstractService<?> service
protected InlineEntitySetInvocationHandler(Class<?> ref, AbstractService<?> service, URIBuilder uri, Collection<T> items)
public static InlineEntitySetInvocationHandler getInstance(Class<?> ref, AbstractService<?> service, URI uri, List<Object> items)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public Long count()
AbstractEntitySet
count
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
public Boolean exists(KEY key) throws IllegalArgumentException
AbstractEntitySet
exists
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
key
- must not be nullIllegalArgumentException
- in case the given key is nullpublic T getByKey(KEY key) throws IllegalArgumentException
AbstractEntitySet
getByKey
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
key
- must not be nullIllegalArgumentException
- in case the given key is nullpublic <S extends T> S getByKey(KEY key, Class<S> typeRef) throws IllegalArgumentException
AbstractEntitySet
getByKey
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
key
- must not be nulltypeRef
- entity class to be returnedIllegalArgumentException
- in case the given key is nullpublic EC execute()
execute
in class AbstractCollectionInvocationHandler<T extends EntityType<?>,EC extends EntityCollection<T,?,?>>
public <S extends T,SEC extends EntityCollection<S,?,?>> Future<SEC> executeAsync(Class<SEC> collTypeRef)
public <S extends T,SEC extends EntityCollection<S,?,?>> SEC execute(Class<SEC> collTypeRef)
public Search<T,EC> createSearch()
AbstractEntitySet
createSearch
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
public <S extends T,SEC extends EntityCollection<S,?,?>> Search<S,SEC> createSearch(Class<SEC> reference)
AbstractEntitySet
createSearch
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
public void delete(KEY key) throws IllegalArgumentException
AbstractEntitySet
delete
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
key
- must not be nullIllegalArgumentException
- in case the given key is nullpublic <S extends T> void delete(S entity)
AbstractEntitySet
delete
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
entity
- to be deletedpublic <S extends T> void delete(Iterable<S> entities)
AbstractEntitySet
delete
in interface AbstractEntitySet<T extends EntityType<?>,KEY extends Serializable,EC extends EntityCollection<T,?,?>>
entities
- to be deletedprotected EdmEnabledODataClient getClient()
protected Context getContext()
protected boolean isSelfMethod(Method method)
protected Object invokeSelfMethod(Method method, Object[] args) throws Throwable
Throwable
protected ComplexType<?> getComplex(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem)
protected boolean isDeleted(EntityInvocationHandler handler)
protected <S extends EntityType<?>> void deleteEntity(EntityInvocationHandler handler, URI entitySetURI)
protected static URIBuilder buildEntitySetURI(Class<?> ref, AbstractService<?> service)
protected static URIBuilder buildEntitySetURI(String entitySetName, AbstractService<?> service)
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.