Class ClientEntityImpl

All Implemented Interfaces:
ClientAnnotatable, ClientEntity, ClientInvokeResult, ClientLinked, ClientSingleton

public class ClientEntityImpl extends AbstractClientPayload implements ClientEntity, ClientSingleton
  • Constructor Details

  • Method Details

    • getTypeName

      public FullQualifiedName getTypeName()
      Specified by:
      getTypeName in interface ClientEntity
      Returns:
      the type name of this entity.
    • getETag

      public String getETag()
      Description copied from interface: ClientEntity
      Gets ETag.
      Specified by:
      getETag in interface ClientEntity
      Returns:
      ETag.
    • setETag

      public void setETag(String eTag)
      Description copied from interface: ClientEntity
      Sets ETag.
      Specified by:
      setETag in interface ClientEntity
      Parameters:
      eTag - ETag.
    • getOperation

      public ClientOperation getOperation(String title)
      Description copied from interface: ClientEntity
      Searches for operation with given title.
      Specified by:
      getOperation in interface ClientEntity
      Parameters:
      title - operation to look for
      Returns:
      operation if found with given title, null otherwise
    • getOperations

      public List<ClientOperation> getOperations()
      Gets operations.
      Specified by:
      getOperations in interface ClientEntity
      Returns:
      operations.
    • getProperty

      public ClientProperty getProperty(String name)
      Description copied from interface: ClientEntity
      Searches for property with given name.
      Specified by:
      getProperty in interface ClientEntity
      Parameters:
      name - property to look for
      Returns:
      property if found with given name, null otherwise
    • addLink

      public boolean addLink(ClientLink link)
      Description copied from interface: ClientLinked
      Puts the given link into one of available lists, based on its type.
      Specified by:
      addLink in interface ClientLinked
      Parameters:
      link - to be added
      Returns:
      true if the given link was added in one of available lists
    • removeLink

      public boolean removeLink(ClientLink link)
      Description copied from interface: ClientLinked
      Removes the given link from any list (association, navigation, edit-media).
      Specified by:
      removeLink in interface ClientLinked
      Parameters:
      link - to be removed
      Returns:
      true if the given link was contained in one of available lists
    • getNavigationLink

      public ClientLink getNavigationLink(String name)
      Description copied from interface: ClientLinked
      Gets navigation link with given name, if available, otherwise null.
      Specified by:
      getNavigationLink in interface ClientLinked
      Parameters:
      name - candidate link name
      Returns:
      navigation link with given name, if available, otherwise null
    • getNavigationLinks

      public List<ClientLink> getNavigationLinks()
      Description copied from interface: ClientLinked
      Returns all entity navigation links (including inline entities / entity sets).
      Specified by:
      getNavigationLinks in interface ClientLinked
      Returns:
      OData entity links.
    • getAssociationLink

      public ClientLink getAssociationLink(String name)
      Description copied from interface: ClientLinked
      Gets association link with given name, if available, otherwise null.
      Specified by:
      getAssociationLink in interface ClientLinked
      Parameters:
      name - candidate link name
      Returns:
      association link with given name, if available, otherwise null
    • getAssociationLinks

      public List<ClientLink> getAssociationLinks()
      Description copied from interface: ClientLinked
      Returns all entity association links.
      Specified by:
      getAssociationLinks in interface ClientLinked
      Returns:
      OData entity links.
    • getMediaEditLink

      public ClientLink getMediaEditLink(String name)
      Description copied from interface: ClientEntity
      Gets media-edit link with given name, if available, otherwise null.
      Specified by:
      getMediaEditLink in interface ClientEntity
      Parameters:
      name - candidate link name
      Returns:
      media-edit link with given name, if available, otherwise null
    • getMediaEditLinks

      public List<ClientLink> getMediaEditLinks()
      Description copied from interface: ClientEntity
      Returns entity media edit links.
      Specified by:
      getMediaEditLinks in interface ClientEntity
      Returns:
      OData entity links.
    • getEditLink

      public URI getEditLink()
      Description copied from interface: ClientEntity
      Returns OData entity edit link.
      Specified by:
      getEditLink in interface ClientEntity
      Returns:
      entity edit link.
    • setEditLink

      public void setEditLink(URI editLink)
      Description copied from interface: ClientEntity
      Sets OData entity edit link.
      Specified by:
      setEditLink in interface ClientEntity
      Parameters:
      editLink - edit link.
    • getLink

      public URI getLink()
      Specified by:
      getLink in interface ClientEntity
      Overrides:
      getLink in class ClientItem
      Returns:
      ODataItem link (it's edit link for ClientEntity).
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: ClientEntity
      TRUE if read-only entity.
      Specified by:
      isReadOnly in interface ClientEntity
      Returns:
      TRUE if read-only; FALSE otherwise.
    • isMediaEntity

      public boolean isMediaEntity()
      Description copied from interface: ClientEntity
      Checks if the current entity is a media entity.
      Specified by:
      isMediaEntity in interface ClientEntity
      Returns:
      'TRUE' if media entity; 'FALSE' otherwise.
    • setMediaEntity

      public void setMediaEntity(boolean isMediaEntity)
      Description copied from interface: ClientEntity
      Sets media entity flag.
      Specified by:
      setMediaEntity in interface ClientEntity
      Parameters:
      isMediaEntity - media entity flag value.
    • getMediaContentType

      public String getMediaContentType()
      Description copied from interface: ClientEntity
      Gets media content type.
      Specified by:
      getMediaContentType in interface ClientEntity
      Returns:
      media content type.
    • setMediaContentType

      public void setMediaContentType(String mediaContentType)
      Description copied from interface: ClientEntity
      Sets media content type.
      Specified by:
      setMediaContentType in interface ClientEntity
      Parameters:
      mediaContentType - media content type.
    • getMediaContentSource

      public URI getMediaContentSource()
      Description copied from interface: ClientEntity
      Gets media content source.
      Specified by:
      getMediaContentSource in interface ClientEntity
      Returns:
      media content source.
    • setMediaContentSource

      public void setMediaContentSource(URI mediaContentSource)
      Description copied from interface: ClientEntity
      Sets media content source.
      Specified by:
      setMediaContentSource in interface ClientEntity
      Parameters:
      mediaContentSource - media content source.
    • getMediaETag

      public String getMediaETag()
      Description copied from interface: ClientEntity
      ETag of the binary stream represented by this media entity or named stream property.
      Specified by:
      getMediaETag in interface ClientEntity
      Returns:
      media ETag value
    • setMediaETag

      public void setMediaETag(String eTag)
      Description copied from interface: ClientEntity
      Set media ETag.
      Specified by:
      setMediaETag in interface ClientEntity
      Parameters:
      eTag - media ETag value
    • getId

      public URI getId()
      Description copied from interface: ClientEntity
      To request entity references in place of the actual entities, the client issues a GET request with /$ref appended to the resource path.
      If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.
      If the resource path terminates on a collection, the response MUST be the format-specific representation of a collection of entity references pointing to the related entities. If no entities are related, the response is the format-specific representation of an empty collection.
      If the resource path terminates on a single entity, the response MUST be the format-specific representation of an entity reference pointing to the related single entity. If the resource path terminates on a single entity and no such entity exists, the service returns 404 Not Found.
      Specified by:
      getId in interface ClientEntity
      Returns:
      entity reference.
    • setId

      public void setId(URI id)
      Description copied from interface: ClientEntity
      Set id for this OData entity.
      Specified by:
      setId in interface ClientEntity
      Parameters:
      id - the if for this entity
    • getProperties

      public List<ClientProperty> getProperties()
      Description copied from interface: ClientEntity
      Returns OData entity properties.
      Specified by:
      getProperties in interface ClientEntity
      Returns:
      OData entity properties.
    • getAnnotations

      public List<ClientAnnotation> getAnnotations()
      Specified by:
      getAnnotations in interface ClientAnnotatable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractClientPayload
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractClientPayload
    • toString

      public String toString()
      Overrides:
      toString in class AbstractClientPayload