org.apache.olingo.commons.api.data

## Class Property

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

-     public class Property
      extends Valuable

  Data representation for a property.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Property()` Creates a new property
    `Property(String type, String name)` Creates a new property
    `Property(String type, String name, ValueType valueType, Object value)` Creates a new property

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getName()` Get name of property.
    `List<Operation>` | `getOperations()` Gets operations.
    `int` | `hashCode()`
    `boolean` | `isNull()` Check if this property is `null` (value == null) or the type is `"Edm.Null"`.
    `void` | `setName(String name)` Set name of property.
    `String` | `toString()`

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

      `asCollection, asComplex, asEnum, asGeospatial, asPrimitive, getType, getValue, getValueType, isCollection, isComplex, isEnum, isGeospatial, isPrimitive, setType, setValue`

    - ### 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

    - #### Property

          public Property()

      Creates a new property

    - #### Property

          public Property(String type,
                          String name)

      Creates a new property
      Parameters:
        `type` - String representation of type (can be null)
        `name` - Name of the property

    - #### Property

          public Property(String type,
                          String name,
                          ValueType valueType,
                          Object value)

      Creates a new property
      Parameters:
        `type` - String representation of type (can be null)
        `name` - Name of the property
        `valueType` - Kind of the property e.g. primitive property, complex property
        `value` - Value of the property.

  - ### Method Detail

    - #### getName

          public String getName()

      Get name of property.
      Returns:
        name of property

    - #### setName

          public void setName(String name)

      Set name of property.
      Parameters:
        `name` - name of property

    - #### isNull

          public boolean isNull()

      Check if this property is `null` (value == null) or the type is `"Edm.Null"`.
      Overrides:
        `isNull` in class `Valuable`
      Returns:
        `true` if this property is `null` (value == null) or the type is `"Edm.Null"`. Otherwise `false`.

    - #### getOperations

          public List<Operation> getOperations()

      Gets operations.
      Returns:
        operations.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Valuable`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Valuable`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Valuable`

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