org.apache.olingo.commons.api.data

## Class Link

- java.lang.Object
- - org.apache.olingo.commons.api.data.Annotatable
  - - org.apache.olingo.commons.api.data.Link

-     public class Link
      extends Annotatable

  Data representation for a link.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Link()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getBindingLink()` If this is a "toOne" relationship this method delivers the binding link or `null` if not set.
    `List<String>` | `getBindingLinks()` If this is a "toMany" relationship this method delivers the binding links or `emptyList` if not set.
    `String` | `getHref()` Gets href.
    `Entity` | `getInlineEntity()` Gets in-line entity.
    `EntityCollection` | `getInlineEntitySet()` Gets in-line entity set.
    `String` | `getMediaETag()` Gets Media ETag.
    `String` | `getRel()` Gets rel info.
    `String` | `getTitle()` Gets title.
    `String` | `getType()` Gets type.
    `int` | `hashCode()`
    `void` | `setBindingLink(String bindingLink)` Sets the binding link.
    `void` | `setBindingLinks(List<String> bindingLinks)` Sets the binding links.
    `void` | `setHref(String href)` Sets href.
    `void` | `setInlineEntity(Entity entity)` Sets in-line entity.
    `void` | `setInlineEntitySet(EntityCollection entitySet)` Sets in-line entity set.
    `void` | `setMediaETag(String mediaETag)` Sets Media ETag.
    `void` | `setRel(String rel)` Sets rel info.
    `void` | `setTitle(String title)` Sets title.
    `void` | `setType(String type)` Sets type.

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

      `getAnnotations`

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

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

- - ### Constructor Detail

    - #### Link

          public Link()

  - ### Method Detail

    - #### getTitle

          public String getTitle()

      Gets title.
      Returns:
        title.

    - #### setTitle

          public void setTitle(String title)

      Sets title.
      Parameters:
        `title` - title.

    - #### getRel

          public String getRel()

      Gets rel info.
      Returns:
        rel info.

    - #### setRel

          public void setRel(String rel)

      Sets rel info.
      Parameters:
        `rel` - rel info.

    - #### getHref

          public String getHref()

      Gets href.
      Returns:
        href.

    - #### setHref

          public void setHref(String href)

      Sets href.
      Parameters:
        `href` - href.

    - #### getType

          public String getType()

      Gets type.
      Returns:
        type.

    - #### setType

          public void setType(String type)

      Sets type.
      Parameters:
        `type` - type.

    - #### getMediaETag

          public String getMediaETag()

      Gets Media ETag.
      Returns:
        media ETag

    - #### setMediaETag

          public void setMediaETag(String mediaETag)

      Sets Media ETag.
      Parameters:
        `mediaETag` - media ETag

    - #### getInlineEntity

          public Entity getInlineEntity()

      Gets in-line entity.
      Returns:
        in-line entity.

    - #### setInlineEntity

          public void setInlineEntity(Entity entity)

      Sets in-line entity.
      Parameters:
        `entity` - entity.

    - #### getInlineEntitySet

          public EntityCollection getInlineEntitySet()

      Gets in-line entity set.
      Returns:
        in-line entity set.

    - #### setInlineEntitySet

          public void setInlineEntitySet(EntityCollection entitySet)

      Sets in-line entity set.
      Parameters:
        `entitySet` - entity set.

    - #### getBindingLink

          public String getBindingLink()

      If this is a "toOne" relationship this method delivers the binding link or `null` if not set.
      Returns:
        String the binding link.

    - #### getBindingLinks

          public List<String> getBindingLinks()

      If this is a "toMany" relationship this method delivers the binding links or `emptyList` if not set.
      Returns:
        a list of binding links.

    - #### setBindingLink

          public void setBindingLink(String bindingLink)

      Sets the binding link.
      Parameters:
        `bindingLink` - name of binding link

    - #### setBindingLinks

          public void setBindingLinks(List<String> bindingLinks)

      Sets the binding links. List MUST NOT be `null`.
      Parameters:
        `bindingLinks` - list of binding link names

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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