org.apache.olingo.commons.api.data

## Class Entity

- java.lang.Object
- - org.apache.olingo.commons.api.data.Annotatable
  - - org.apache.olingo.commons.api.data.AbstractODataObject
    - - org.apache.olingo.commons.api.data.Linked
      - - org.apache.olingo.commons.api.data.Entity

- Direct Known Subclasses:
    DeletedEntity

      public class Entity
      extends Linked

  Data representation for a single entity.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Entity()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Entity` | `addProperty(Property property)` Add property to this Entity.
    `boolean` | `equals(Object o)`
    `Link` | `getEditLink()` Gets entity edit link.
    `String` | `getETag()` Gets ETag.
    `URI` | `getMediaContentSource()` Gets media content resource.
    `String` | `getMediaContentType()` Gets media content type.
    `List<Link>` | `getMediaEditLinks()` Gets media entity links.
    `String` | `getMediaETag()` ETag of the binary stream represented by this media entity or named stream property.
    `List<Operation>` | `getOperations()` Gets operations.
    `List<Property>` | `getProperties()` Gets properties.
    `Property` | `getProperty(String name)` Gets property with given name.
    `Link` | `getSelfLink()` Gets entity self link.
    `String` | `getType()` Gets entity type.
    `int` | `hashCode()`
    `boolean` | `isMediaEntity()` Checks if the current entity is a media entity.
    `void` | `setEditLink(Link editLink)` Sets entity edit link.
    `void` | `setETag(String eTag)` Sets ETag
    `void` | `setMediaContentSource(URI mediaContentSource)` Set media content source.
    `void` | `setMediaContentType(String mediaContentType)` Set media content type.
    `void` | `setMediaETag(String eTag)` Set media ETag.
    `void` | `setSelfLink(Link selfLink)` Sets entity self link.
    `void` | `setType(String type)` Sets entity type.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.olingo.commons.api.data.Linked

      `getAssociationLink, getAssociationLinks, getNavigationBinding, getNavigationBindings, getNavigationLink, getNavigationLinks, getOneByTitle`

    - ### Methods inherited from class org.apache.olingo.commons.api.data.AbstractODataObject

      `getBaseURI, getId, getTitle, setBaseURI, setCommonProperty, setId`

    - ### Methods inherited from class org.apache.olingo.commons.api.data.Annotatable

      `getAnnotations`

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

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

- - ### Constructor Detail

    - #### Entity

          public Entity()

  - ### Method Detail

    - #### getETag

          public String getETag()

      Gets ETag.
      Returns:
        ETag.

    - #### setETag

          public void setETag(String eTag)

      Sets ETag
      Parameters:
        `eTag` - ETag

    - #### getType

          public String getType()

      Gets entity type.
      Returns:
        entity type.

    - #### setType

          public void setType(String type)

      Sets entity type.
      Parameters:
        `type` - entity type.

    - #### getSelfLink

          public Link getSelfLink()

      Gets entity self link.
      Returns:
        self link.

    - #### setSelfLink

          public void setSelfLink(Link selfLink)

      Sets entity self link.
      Parameters:
        `selfLink` - self link.

    - #### getEditLink

          public Link getEditLink()

      Gets entity edit link.
      Returns:
        edit link.

    - #### setEditLink

          public void setEditLink(Link editLink)

      Sets entity edit link.
      Parameters:
        `editLink` - edit link.

    - #### getMediaEditLinks

          public List<Link> getMediaEditLinks()

      Gets media entity links.
      Returns:
        links.

    - #### getOperations

          public List<Operation> getOperations()

      Gets operations.
      Returns:
        operations.

    - #### addProperty

          public Entity addProperty(Property property)

      Add property to this Entity.
      Parameters:
        `property` - property which is added
      Returns:
        this Entity for fluid/flow adding

    - #### getProperties

          public List<Property> getProperties()

      Gets properties.
      Returns:
        properties.

    - #### getProperty

          public Property getProperty(String name)

      Gets property with given name.
      Parameters:
        `name` - property name
      Returns:
        property with given name if found, null otherwise

    - #### getMediaContentType

          public String getMediaContentType()

      Gets media content type.
      Returns:
        media content type.

    - #### setMediaContentType

          public void setMediaContentType(String mediaContentType)

      Set media content type.
      Parameters:
        `mediaContentType` - media content type.

    - #### getMediaContentSource

          public URI getMediaContentSource()

      Gets media content resource.
      Returns:
        media content resource.

    - #### setMediaContentSource

          public void setMediaContentSource(URI mediaContentSource)

      Set media content source.
      Parameters:
        `mediaContentSource` - media content source.

    - #### getMediaETag

          public String getMediaETag()

      ETag of the binary stream represented by this media entity or named stream property.
      Returns:
        media ETag value

    - #### setMediaETag

          public void setMediaETag(String eTag)

      Set media ETag.
      Parameters:
        `eTag` - media ETag value

    - #### isMediaEntity

          public boolean isMediaEntity()

      Checks if the current entity is a media entity.
      Returns:
        'TRUE' if is a media entity; 'FALSE' otherwise.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Linked`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Linked`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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