public class EntitySetInvocationHandler<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 |
EntitySetInvocationHandler(Class<?> ref,
AbstractService<?> service,
CommonURIBuilder<?> uri) |
Modifier and Type | Method and Description |
---|---|
protected static CommonURIBuilder<?> |
buildEntitySetURI(Class<?> ref,
AbstractService<?> service) |
protected static CommonURIBuilder<?> |
buildEntitySetURI(String containerNS,
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.
|
<S extends T,SEC extends EntityCollection<S,?,?>> |
fetchWholeEntitySet(CommonURIBuilder<?> uriBuilder,
Class<S> typeRef,
Class<SEC> collTypeRef) |
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 CommonEdmEnabledODataClient<?> |
getClient() |
protected ComplexType<?> |
getComplex(String name,
ODataValue value,
Class<?> ref,
EntityInvocationHandler handler,
URI baseURI,
boolean collectionItem) |
protected Context |
getContext() |
static EntitySetInvocationHandler |
getInstance(Class<?> ref,
AbstractService<?> service) |
static EntitySetInvocationHandler |
getInstance(Class<?> ref,
AbstractService<?> service,
URI uri) |
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,
Object[] args) |
org.apache.olingo.ext.proxy.commons.EntitySetIterator<T,KEY,EC> |
iterator() |
String |
toString() |
fetchPartial
add, addAll, addRef, clear, clearQueryOptions, contains, containsAll, executeAsync, expand, filter, filter, getAnnotation, getAnnotationTerms, getRequestURI, getTypeRef, getURI, hasNextPage, isChanged, isEmpty, nextPage, orderBy, orderBy, refs, remove, removeAll, retainAll, select, setAnnotations, size, skip, toArray, toArray, top
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add
equals, hashCode
protected static final org.slf4j.Logger LOG
protected AbstractService<?> service
protected EntitySetInvocationHandler(Class<?> ref, AbstractService<?> service, CommonURIBuilder<?> uri)
public static EntitySetInvocationHandler getInstance(Class<?> ref, AbstractService<?> service)
public static EntitySetInvocationHandler getInstance(Class<?> ref, AbstractService<?> service, URI uri)
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 <S extends T,SEC extends EntityCollection<S,?,?>> SEC fetchWholeEntitySet(CommonURIBuilder<?> uriBuilder, Class<S> typeRef, Class<SEC> collTypeRef)
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 deletedpublic org.apache.olingo.ext.proxy.commons.EntitySetIterator<T,KEY,EC> iterator()
iterator
in interface Iterable<T extends EntityType<?>>
iterator
in interface Collection<T extends EntityType<?>>
iterator
in class AbstractCollectionInvocationHandler<T extends EntityType<?>,EC extends EntityCollection<T,?,?>>
protected CommonEdmEnabledODataClient<?> getClient()
protected Context getContext()
protected Object invokeSelfMethod(Method method, Object[] args) throws Throwable
Throwable
protected ComplexType<?> getComplex(String name, ODataValue 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 CommonURIBuilder<?> buildEntitySetURI(Class<?> ref, AbstractService<?> service)
protected static CommonURIBuilder<?> buildEntitySetURI(String containerNS, String entitySetName, AbstractService<?> service)
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.