org.appng.api.model

## Class SimpleProperty

- java.lang.Object
- - org.appng.api.model.SimpleProperty

- All Implemented Interfaces:
    Serializable, Comparable<Property>, Identifiable<String>, Property
  Direct Known Subclasses:
    PropertyImpl

      public class SimpleProperty
      extends Object
      implements Property, Identifiable<String>, Comparable<Property>

  Default `Property`-implementation
  Author:
    Matthias Müller
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.appng.api.model.Property

      `Property.Type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleProperty()`
    `SimpleProperty(String name, String value)`
    `SimpleProperty(String name, String value, String defaultValue)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Property other)`
    `void` | `determineType()`
    `String` | `getActualString()`
    `byte[]` | `getBlob()` If this `Property` contains BLOB data, this data is being returned.
    `Boolean` | `getBoolean()` Returns the `Boolean`-value of this `Property`: `Boolean.TRUE` if `Property.getString()` returns `true` or `1` `Boolean.FALSE` if the `Property.getString()` returns a non-null `String` `null` otherwise
    `Boolean` | `getChangedValue()`
    `String` | `getClob()` If this `Property` contains CLOB data, this data is being returned.
    `String` | `getDefaultString()` Returns the default `String`-value of this `Property`.
    `String` | `getDescription()` Returns the description of this `Property`.
    `Double` | `getDouble()` Returns the `Double`-value of this `Property` using `Double.parseDouble(String)`, if `Property.getString()` returns a non-null `String`, `null` otherwise.
    `Float` | `getFloat()` Returns the `Float`-value of this `Property` using `Float.parseFloat(String)`, if `Property.getString()` returns a non-null `String`, `null` otherwise.
    `String` | `getId()` Returns the id.
    `Integer` | `getInteger()` Returns the `Integer`-value of this `Property` using `Integer.parseInt(String)`, if `Property.getString()` returns a non-null `String`, `null` otherwise.
    `@NotNull @Size(min=3,max=255) String` | `getName()` Returns the name of this `Property`, as used in `Properties.getXXX(String)`.
    `String` | `getString()` Returns the `String`-value of this `Property`
    `Property.Type` | `getType()` Returns the type of this property
    `Object` | `getValue()`
    `Date` | `getVersion()`
    `boolean` | `isMandatory()`
    `void` | `setActualString(String value)`
    `void` | `setBlob(byte[] blob)`
    `void` | `setClob(String clob)`
    `void` | `setDefaultString(String defaultValue)`
    `void` | `setDescription(String description)`
    `void` | `setId(String id)`
    `void` | `setMandatory(boolean mandatory)`
    `void` | `setName(String name)`
    `void` | `setString(String value)`
    `void` | `setType(Property.Type type)`
    `void` | `setValue(Object value)`
    `void` | `setVersion(Date version)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SimpleProperty

          public SimpleProperty()

    - #### SimpleProperty

          public SimpleProperty(String name,
                                String value)

    - #### SimpleProperty

          public SimpleProperty(String name,
                                String value,
                                String defaultValue)

  - ### Method Detail

    - #### getName

          @NotNull
           @Size(min=3,
                max=255)
          public @NotNull @Size(min=3,max=255) String getName()

      Description copied from interface: `Property`
      Returns the name of this `Property`, as used in `Properties.getXXX(String)`.
      Specified by:
        `getName` in interface `Property`
      Returns:
        the name

    - #### setName

          public void setName(String name)

    - #### isMandatory

          public boolean isMandatory()

      Specified by:
        `isMandatory` in interface `Property`

    - #### setMandatory

          public void setMandatory(boolean mandatory)

    - #### getId

          public String getId()

      Description copied from interface: `Identifiable`
      Returns the id.
      Specified by:
        `getId` in interface `Identifiable<String>`
      Returns:
        the id

    - #### setId

          public void setId(String id)

    - #### getVersion

          public Date getVersion()

    - #### setVersion

          public void setVersion(Date version)

    - #### getActualString

          public String getActualString()

    - #### setActualString

          public void setActualString(String value)

    - #### getDefaultString

          public String getDefaultString()

      Description copied from interface: `Property`
      Returns the default `String`-value of this `Property`.
      Specified by:
        `getDefaultString` in interface `Property`
      Returns:
        the default `String`-value

    - #### setDefaultString

          public void setDefaultString(String defaultValue)

    - #### getDescription

          public String getDescription()

      Description copied from interface: `Property`
      Returns the description of this `Property`.
      Specified by:
        `getDescription` in interface `Property`
      Returns:
        the description

    - #### setDescription

          public void setDescription(String description)

    - #### getBlob

          public byte[] getBlob()

      Description copied from interface: `Property`
      If this `Property` contains BLOB data, this data is being returned.
      Specified by:
        `getBlob` in interface `Property`
      Returns:
        the BLOB data, (may be `null`)
      See Also:
        `Properties.getBlob(String)`

    - #### setBlob

          public void setBlob(byte[] blob)

    - #### getClob

          public String getClob()

      Description copied from interface: `Property`
      If this `Property` contains CLOB data, this data is being returned.
      Specified by:
        `getClob` in interface `Property`
      Returns:
        the CLOB data, (may be `null`)
      See Also:
        `Properties.getClob(String)`, `Properties.getClob(String, String)`

    - #### setClob

          public void setClob(String clob)

    - #### getString

          public String getString()

      Description copied from interface: `Property`
      Returns the `String`-value of this `Property`
      Specified by:
        `getString` in interface `Property`
      Returns:
        the `String`-value
      See Also:
        `Properties.getString(String)`, `Properties.getString(String, String)`

    - #### setString

          public void setString(String value)

    - #### getInteger

          public Integer getInteger()

      Description copied from interface: `Property`
      Returns the `Integer`-value of this `Property` using `Integer.parseInt(String)`, if `Property.getString()` returns a non-null `String`, `null` otherwise.
      Specified by:
        `getInteger` in interface `Property`
      Returns:
        the `Integer`-value (may be `null`)
      See Also:
        `Properties.getInteger(String)`, `Properties.getInteger(String, Integer)`

    - #### getFloat

          public Float getFloat()

      Description copied from interface: `Property`
      Returns the `Float`-value of this `Property` using `Float.parseFloat(String)`, if `Property.getString()` returns a non-null `String`, `null` otherwise.
      Specified by:
        `getFloat` in interface `Property`
      Returns:
        the `Float`-value (may be `null`)
      See Also:
        `Properties.getFloat(String)`, `Properties.getFloat(String, Float)`

    - #### getDouble

          public Double getDouble()

      Description copied from interface: `Property`
      Returns the `Double`-value of this `Property` using `Double.parseDouble(String)`, if `Property.getString()` returns a non-null `String`, `null` otherwise.
      Specified by:
        `getDouble` in interface `Property`
      Returns:
        the `Double`-value (may be `null`)
      See Also:
        `Properties.getDouble(String)`, `Properties.getDouble(String, Double)`

    - #### getBoolean

          public Boolean getBoolean()

      Description copied from interface: `Property`
      Returns the `Boolean`-value of this `Property`:
    - - `Boolean.TRUE` if `Property.getString()` returns `true` or `1`
      - `Boolean.FALSE` if the `Property.getString()` returns a non-null `String`
      - `null` otherwise

Specified by:
  `getBoolean` in interface `Property`
Returns:
  the `Boolean`-value (may be `null`)
See Also:
  `Properties.getBoolean(String)`, `Properties.getBoolean(String, Boolean)`

- #### getChangedValue

      public Boolean getChangedValue()

- #### getType

      public Property.Type getType()

  Description copied from interface: `Property`
  Returns the type of this property
  Specified by:
    `getType` in interface `Property`
  Returns:
    the type

- #### setType

      public void setType(Property.Type type)

- #### getValue

      public Object getValue()

- #### setValue

      public void setValue(Object value)

- #### determineType

      public void determineType()

- #### toString

      public String toString()

  Overrides:
    `toString` in class `Object`

- #### compareTo

      public int compareTo(Property other)

  Specified by:
    `compareTo` in interface `Comparable<Property>`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.