org.apache.olingo.ext.proxy.commons

## Class EntityInvocationHandler

- java.lang.Object
- - org.apache.olingo.ext.proxy.commons.AbstractStructuredInvocationHandler
  - - org.apache.olingo.ext.proxy.commons.EntityInvocationHandler

- All Implemented Interfaces:
    Serializable, InvocationHandler, Annotatable

      public class EntityInvocationHandler
      extends AbstractStructuredInvocationHandler
      implements Annotatable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `LOG` Logger.
    `protected AbstractService<?>` | `service`

    - ### Fields inherited from class org.apache.olingo.ext.proxy.commons.AbstractStructuredInvocationHandler

      `baseURI, entityHandler, internal, linkCache, linkChanges, propertyCache, propertyChanges, streamedPropertyCache, streamedPropertyChanges, typeRef, uri`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAnnotation(Class<? extends AbstractTerm> term, Object value)`
    `protected static URIBuilder` | `buildEntitySetURI(Class<?> ref, AbstractService<?> service)`
    `protected static URIBuilder` | `buildEntitySetURI(String entitySetName, AbstractService<?> service)`
    `protected void` | `cacheLink(NavigationProperty navProp, Object value)`
    `protected <S extends EntityType<?>> void` | `deleteEntity(EntityInvocationHandler handler, URI entitySetURI)`
    `boolean` | `equals(Object obj)`
    `Map<Class<? extends AbstractTerm>,Object>` | `getAnnotations()`
    `protected EdmEnabledODataClient` | `getClient()`
    `protected ComplexType<?>` | `getComplex(String name, ClientValue value, Class<?> ref, EntityInvocationHandler handler, URI baseURI, boolean collectionItem)`
    `protected Context` | `getContext()`
    `ClientEntity` | `getEntity()`
    `URI` | `getEntitySetURI()`
    `URI` | `getEntityURI()`
    `String` | `getETag()` Gets the current ETag defined into the wrapped entity.
    `static EntityInvocationHandler` | `getInstance(Class<?> typeRef, AbstractService<?> service)`
    `static EntityInvocationHandler` | `getInstance(ClientEntity entity, URI entitySetURI, Class<?> typeRef, AbstractService<?> service)`
    `static EntityInvocationHandler` | `getInstance(ClientEntity entity, URI entitySetURI, URI entityURI, Class<?> typeRef, AbstractService<?> service)`
    `static EntityInvocationHandler` | `getInstance(URI entityURI, Class<?> typeRef, AbstractService<?> service)`
    `protected <T extends ClientProperty> List<T>` | `getInternalProperties()`
    `protected ClientProperty` | `getInternalProperty(String name)`
    `protected Object` | `getNavigationPropertyValue(NavigationProperty property, Method getter)`
    `EdmStreamValue` | `getStreamChanges()`
    `EntityUUID` | `getUUID()`
    `int` | `hashCode()`
    `protected Object` | `invokeSelfMethod(Method method, Object[] args)`
    `boolean` | `isChanged()`
    `boolean` | `isChanged(boolean considerStreamProperties)`
    `protected boolean` | `isDeleted(EntityInvocationHandler handler)`
    `protected boolean` | `isSelfMethod(Method method)`
    `protected void` | `load()`
    `EdmStreamValue` | `loadStream()`
    `Object` | `readAnnotation(Class<? extends AbstractTerm> term)`
    `Collection<Class<? extends AbstractTerm>>` | `readAnnotationTerms()`
    `String` | `readEntityReferenceID()`
    `void` | `removeAnnotation(Class<? extends AbstractTerm> term)`
    `void` | `setEntity(ClientEntity entity)`
    `void` | `setETag(String eTag)` Overrides ETag value defined into the wrapped entity.
    `String` | `toString()`
    `EntityUUID` | `updateEntityUUID(URI entitySetURI, Class<?> type, ClientEntity entity)`
    `EntityUUID` | `updateUUID(URI entitySetURI, Class<?> type, Object key)`
    `void` | `uploadStream(EdmStreamValue stream)`

    - ### Methods inherited from class org.apache.olingo.ext.proxy.commons.AbstractStructuredInvocationHandler

      `addAdditionalProperty, addLinkChanges, addPropertyChanges, applyChanges, applyChanges, applyChangesOnChildren, attach, attach, attach, clearQueryOptions, delete, delete, expand, getEntityHandler, getInternal, getLinkChanges, getNavPropAnnotatableHandlers, getPropAnnotatableHandlers, getPropertyChanges, getPropertyValue, getStreamedPropertyChanges, getStructuredInvocationHandler, getTypeRef, hasCachedPropertyChanged, hasDeepPropertyChanges, hasPropertyChanges, invoke, putNavPropAnnotatableHandler, putPropAnnotatableHandler, readAdditionalProperty, readAdditionalPropertyNames, refs, removeAdditionalProperty, retrieveNavigationProperty, select, setEntityHandler, setPropertyValue`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LOG

          protected static final org.slf4j.Logger LOG

      Logger.

    - #### service

          protected AbstractService<?> service

  - ### Method Detail

    - #### getInstance

          public static EntityInvocationHandler getInstance(ClientEntity entity,
                                                            URI entitySetURI,
                                                            Class<?> typeRef,
                                                            AbstractService<?> service)

    - #### getInstance

          public static EntityInvocationHandler getInstance(ClientEntity entity,
                                                            URI entitySetURI,
                                                            URI entityURI,
                                                            Class<?> typeRef,
                                                            AbstractService<?> service)

    - #### getInstance

          public static EntityInvocationHandler getInstance(URI entityURI,
                                                            Class<?> typeRef,
                                                            AbstractService<?> service)

    - #### getInstance

          public static EntityInvocationHandler getInstance(Class<?> typeRef,
                                                            AbstractService<?> service)

    - #### setEntity

          public void setEntity(ClientEntity entity)

    - #### getUUID

          public EntityUUID getUUID()

    - #### updateEntityUUID

          public EntityUUID updateEntityUUID(URI entitySetURI,
                                             Class<?> type,
                                             ClientEntity entity)

    - #### updateUUID

          public EntityUUID updateUUID(URI entitySetURI,
                                       Class<?> type,
                                       Object key)

    - #### getEntitySetURI

          public URI getEntitySetURI()

    - #### getEntity

          public final ClientEntity getEntity()

    - #### getEntityURI

          public URI getEntityURI()

    - #### getETag

          public String getETag()

      Gets the current ETag defined into the wrapped entity.
      Returns:
        the current etag

    - #### setETag

          public void setETag(String eTag)

      Overrides ETag value defined into the wrapped entity.
      Parameters:
        `eTag` - ETag.

    - #### getAnnotations

          public Map<Class<? extends AbstractTerm>,Object> getAnnotations()

    - #### isChanged

          public boolean isChanged()

      Overrides:
        `isChanged` in class `AbstractStructuredInvocationHandler`

    - #### isChanged

          public boolean isChanged(boolean considerStreamProperties)

    - #### uploadStream

          public void uploadStream(EdmStreamValue stream)

    - #### getStreamChanges

          public EdmStreamValue getStreamChanges()

    - #### loadStream

          public EdmStreamValue loadStream()

    - #### getNavigationPropertyValue

          protected Object getNavigationPropertyValue(NavigationProperty property,
                                                      Method getter)

      Specified by:
        `getNavigationPropertyValue` in class `AbstractStructuredInvocationHandler`

    - #### cacheLink

          protected void cacheLink(NavigationProperty navProp,
                                   Object value)

    - #### addAnnotation

          public void addAnnotation(Class<? extends AbstractTerm> term,
                                    Object value)

      Specified by:
        `addAnnotation` in interface `Annotatable`

    - #### removeAnnotation

          public void removeAnnotation(Class<? extends AbstractTerm> term)

      Specified by:
        `removeAnnotation` in interface `Annotatable`

    - #### readAnnotation

          public Object readAnnotation(Class<? extends AbstractTerm> term)

      Specified by:
        `readAnnotation` in interface `Annotatable`

    - #### readAnnotationTerms

          public Collection<Class<? extends AbstractTerm>> readAnnotationTerms()

      Specified by:
        `readAnnotationTerms` in interface `Annotatable`

    - #### load

          protected void load()

      Specified by:
        `load` in class `AbstractStructuredInvocationHandler`

    - #### getInternalProperties

          protected <T extends ClientProperty> List<T> getInternalProperties()

      Specified by:
        `getInternalProperties` in class `AbstractStructuredInvocationHandler`

    - #### getInternalProperty

          protected ClientProperty getInternalProperty(String name)

      Specified by:
        `getInternalProperty` in class `AbstractStructuredInvocationHandler`

    - #### readEntityReferenceID

          public String readEntityReferenceID()

    - #### toString

          public String toString()

    - #### hashCode

          public int hashCode()

    - #### equals

          public boolean equals(Object obj)

    - #### getClient

          protected EdmEnabledODataClient getClient()

    - #### getContext

          protected Context getContext()

    - #### isSelfMethod

          protected boolean isSelfMethod(Method method)

    - #### invokeSelfMethod

          protected Object invokeSelfMethod(Method method,
                                            Object[] args)
                                     throws Throwable

      Throws:
        `Throwable`

    - #### getComplex

          protected ComplexType<?> getComplex(String name,
                                              ClientValue value,
                                              Class<?> ref,
                                              EntityInvocationHandler handler,
                                              URI baseURI,
                                              boolean collectionItem)

    - #### isDeleted

          protected boolean isDeleted(EntityInvocationHandler handler)

    - #### deleteEntity

          protected <S extends EntityType<?>> void deleteEntity(EntityInvocationHandler handler,
                                                                URI entitySetURI)

    - #### buildEntitySetURI

          protected static URIBuilder buildEntitySetURI(Class<?> ref,
                                                        AbstractService<?> service)

    - #### buildEntitySetURI

          protected static URIBuilder buildEntitySetURI(String entitySetName,
                                                        AbstractService<?> service)

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.