org.appng.api

## Class FieldWrapper

- java.lang.Object
- - org.appng.xml.BaseObject
  - - org.appng.xml.platform.FieldDef
    - - org.appng.api.FieldWrapper

- All Implemented Interfaces:
    Serializable

      public class FieldWrapper
      extends FieldDef

  A `FieldWrapper` extends a `FieldDef` and adds the ability to read and set the field's string-representation ( `getStringValue()`/`setStringValue(String)`) and also the object-representation ( `getObject()`/ `setObject(Object)`). This is achieved by using a `BeanWrapper`.
  Author:
    Matthias Müller
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.appng.xml.platform.FieldDef

      `binding, condition, displayLength, fields, format, hidden, icons, label, messages, name, permissions, readonly, sort, tooltip, type, validation`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldWrapper(FieldDef fieldDef, org.springframework.beans.BeanWrapper beanWrapper)` Creates a new `FieldWrapper` for the given `FieldDef`, using the given `BeanWrapper`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `backupFields()`
    `boolean` | `equals(Object obj)`
    `org.springframework.beans.BeanWrapper` | `getBeanWrapper()` Returns the `BeanWrapper` used by this `FieldWrapper` to access the property.
    `String` | `getBinding()` This is the name of the property used with the JavaBeans API.
    `Condition` | `getCondition()` Gets the value of the condition property.
    `BigInteger` | `getDisplayLength()` The maximum number of characters when displaying the field's value as string.
    `List<FieldDef>` | `getFields()` Gets the value of the fields property.
    `String` | `getFormat()` The format used for this field, presuming the `FieldDef.type` supports formatting.
    `String` | `getHidden()` If evaluating to `true`, the field will not be visible to the user.
    `List<Icon>` | `getIcons()` Gets the value of the icons property.
    `Label` | `getLabel()` Gets the value of the label property.
    `Linkpanel` | `getLinkpanel()`
    `Messages` | `getMessages()` Gets the value of the messages property.
    `String` | `getName()` The name of the field.
    `Object` | `getObject()` Returns the property that this `FieldWrapper` handles.
    `List<FieldPermissions>` | `getPermissions()` Gets the value of the permissions property.
    `String` | `getReadonly()` If evaluating to `true`, the field's value is readonly.
    `Sort` | `getSort()` Gets the value of the sort property.
    `String` | `getStringValue()` Returns the `String`-value of the property that this `FieldWrapper` handles.
    `Class<?>` | `getTargetClass()` Returns the target-type for the property that this `FieldWrapper` handles.
    `FieldType` | `getType()` The `FieldType`, which decides about how the field is being displayed.
    `Validation` | `getValidation()` Gets the value of the validation property.
    `int` | `hashCode()`
    `void` | `restoreFields()`
    `void` | `setBinding(String value)` Sets the value of the binding property.
    `void` | `setCondition(Condition value)` Sets the value of the condition property.
    `void` | `setDisplayLength(BigInteger value)` Sets the value of the displayLength property.
    `void` | `setFormat(String value)` Sets the value of the format property.
    `void` | `setHidden(String value)` Sets the value of the hidden property.
    `void` | `setLabel(Label value)` Sets the value of the label property.
    `void` | `setLinkpanel(Linkpanel linkpanel)`
    `void` | `setMessages(Messages value)` Sets the value of the messages property.
    `void` | `setName(String value)` Sets the value of the name property.
    `void` | `setObject(Object object)` Sets the property that this `FieldWrapper` handles.
    `void` | `setReadonly(String value)` Sets the value of the readonly property.
    `void` | `setSort(Sort value)` Sets the value of the sort property.
    `void` | `setStringValue(String stringValue)` Sets the `String`-value of the property that this `FieldWrapper` handles.
    `void` | `setType(FieldType value)` Sets the value of the type property.
    `void` | `setValidation(Validation value)` Sets the value of the validation property.
    `String` | `toString()`
    `static String` | `toString(FieldDef fieldDef)`

    - ### Methods inherited from class org.appng.xml.platform.FieldDef

      `getTooltip, setTooltip`

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

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

- - ### Constructor Detail

    - #### FieldWrapper

          public FieldWrapper(FieldDef fieldDef,
                              org.springframework.beans.BeanWrapper beanWrapper)

      Creates a new `FieldWrapper` for the given `FieldDef`, using the given `BeanWrapper`.
      Parameters:
        `fieldDef` - the `FieldDef`
        `beanWrapper` - the `BeanWrapper`

  - ### Method Detail

    - #### getObject

          public Object getObject()

      Returns the property that this `FieldWrapper` handles.
      Returns:
        the property

    - #### setObject

          public void setObject(Object object)

      Sets the property that this `FieldWrapper` handles.
      Parameters:
        `object` - the property

    - #### getStringValue

          public String getStringValue()

      Returns the `String`-value of the property that this `FieldWrapper` handles.
      Returns:
        the `String`-value

    - #### setStringValue

          public void setStringValue(String stringValue)

      Sets the `String`-value of the property that this `FieldWrapper` handles.
      Parameters:
        `stringValue` - the `String`-value to set

    - #### getBeanWrapper

          public org.springframework.beans.BeanWrapper getBeanWrapper()

      Returns the `BeanWrapper` used by this `FieldWrapper` to access the property.
      Returns:
        the `BeanWrapper`

    - #### getTargetClass

          public Class<?> getTargetClass()

      Returns the target-type for the property that this `FieldWrapper` handles.
      Returns:
        the target-type

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getSort

          public Sort getSort()

      Description copied from class: `FieldDef`
      Gets the value of the sort property.
      Overrides:
        `getSort` in class `FieldDef`
      Returns:
        possible object is `Sort`

    - #### setSort

          public void setSort(Sort value)

      Description copied from class: `FieldDef`
      Sets the value of the sort property.
      Overrides:
        `setSort` in class `FieldDef`
      Parameters:
        `value` - allowed object is `Sort`

    - #### getLabel

          public Label getLabel()

      Description copied from class: `FieldDef`
      Gets the value of the label property.
      Overrides:
        `getLabel` in class `FieldDef`
      Returns:
        possible object is `Label`

    - #### setLabel

          public void setLabel(Label value)

      Description copied from class: `FieldDef`
      Sets the value of the label property.
      Overrides:
        `setLabel` in class `FieldDef`
      Parameters:
        `value` - allowed object is `Label`

    - #### getIcons

          public List<Icon> getIcons()

      Description copied from class: `FieldDef`
      Gets the value of the icons property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a `set` method for the icons property.

      For example, to add a new item, do as follows:

              getIcons().add(newItem);

      Objects of the following type(s) are allowed in the list `Icon`

      Overrides:
        `getIcons` in class `FieldDef`

    - #### getCondition

          public Condition getCondition()

      Description copied from class: `FieldDef`
      Gets the value of the condition property.
      Overrides:
        `getCondition` in class `FieldDef`
      Returns:
        possible object is `Condition`

    - #### setCondition

          public void setCondition(Condition value)

      Description copied from class: `FieldDef`
      Sets the value of the condition property.
      Overrides:
        `setCondition` in class `FieldDef`
      Parameters:
        `value` - allowed object is `Condition`

    - #### getPermissions

          public List<FieldPermissions> getPermissions()

      Description copied from class: `FieldDef`
      Gets the value of the permissions property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a `set` method for the permissions property.

      For example, to add a new item, do as follows:

              getPermissions().add(newItem);

      Objects of the following type(s) are allowed in the list `FieldPermissions`

      Overrides:
        `getPermissions` in class `FieldDef`

    - #### getValidation

          public Validation getValidation()

      Description copied from class: `FieldDef`
      Gets the value of the validation property.
      Overrides:
        `getValidation` in class `FieldDef`
      Returns:
        possible object is `Validation`

    - #### setValidation

          public void setValidation(Validation value)

      Description copied from class: `FieldDef`
      Sets the value of the validation property.
      Overrides:
        `setValidation` in class `FieldDef`
      Parameters:
        `value` - allowed object is `Validation`

    - #### getMessages

          public Messages getMessages()

      Description copied from class: `FieldDef`
      Gets the value of the messages property.
      Overrides:
        `getMessages` in class `FieldDef`
      Returns:
        possible object is `Messages`

    - #### setMessages

          public void setMessages(Messages value)

      Description copied from class: `FieldDef`
      Sets the value of the messages property.
      Overrides:
        `setMessages` in class `FieldDef`
      Parameters:
        `value` - allowed object is `Messages`

    - #### getFields

          public List<FieldDef> getFields()

      Description copied from class: `FieldDef`
      Gets the value of the fields property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a `set` method for the fields property.

      For example, to add a new item, do as follows:

              getFields().add(newItem);

      Objects of the following type(s) are allowed in the list `FieldDef`

      Overrides:
        `getFields` in class `FieldDef`

    - #### getName

          public String getName()

      Description copied from class: `FieldDef`
      The name of the field.
      Overrides:
        `getName` in class `FieldDef`
      Returns:
        possible object is `String`

    - #### setName

          public void setName(String value)

      Description copied from class: `FieldDef`
      Sets the value of the name property.
      Overrides:
        `setName` in class `FieldDef`
      Parameters:
        `value` - allowed object is `String`

    - #### getType

          public FieldType getType()

      Description copied from class: `FieldDef`
      The `FieldType`, which decides about how the field is being displayed.
      Overrides:
        `getType` in class `FieldDef`
      Returns:
        possible object is `FieldType`

    - #### setType

          public void setType(FieldType value)

      Description copied from class: `FieldDef`
      Sets the value of the type property.
      Overrides:
        `setType` in class `FieldDef`
      Parameters:
        `value` - allowed object is `FieldType`

    - #### getDisplayLength

          public BigInteger getDisplayLength()

      Description copied from class: `FieldDef`
      The maximum number of characters when displaying the field's value as string.
      Overrides:
        `getDisplayLength` in class `FieldDef`
      Returns:
        possible object is `BigInteger`

    - #### setDisplayLength

          public void setDisplayLength(BigInteger value)

      Description copied from class: `FieldDef`
      Sets the value of the displayLength property.
      Overrides:
        `setDisplayLength` in class `FieldDef`
      Parameters:
        `value` - allowed object is `BigInteger`

    - #### getFormat

          public String getFormat()

      Description copied from class: `FieldDef`
      The format used for this field, presuming the `FieldDef.type` supports formatting.
      Overrides:
        `getFormat` in class `FieldDef`
      Returns:
        possible object is `String`

    - #### setFormat

          public void setFormat(String value)

      Description copied from class: `FieldDef`
      Sets the value of the format property.
      Overrides:
        `setFormat` in class `FieldDef`
      Parameters:
        `value` - allowed object is `String`

    - #### getReadonly

          public String getReadonly()

      Description copied from class: `FieldDef`
      If evaluating to `true`, the field's value is readonly.
      Overrides:
        `getReadonly` in class `FieldDef`
      Returns:
        possible object is `String`

    - #### setReadonly

          public void setReadonly(String value)

      Description copied from class: `FieldDef`
      Sets the value of the readonly property.
      Overrides:
        `setReadonly` in class `FieldDef`
      Parameters:
        `value` - allowed object is `String`

    - #### getHidden

          public String getHidden()

      Description copied from class: `FieldDef`
      If evaluating to `true`, the field will not be visible to the user.
      Overrides:
        `getHidden` in class `FieldDef`
      Returns:
        possible object is `String`

    - #### setHidden

          public void setHidden(String value)

      Description copied from class: `FieldDef`
      Sets the value of the hidden property.
      Overrides:
        `setHidden` in class `FieldDef`
      Parameters:
        `value` - allowed object is `String`

    - #### getBinding

          public String getBinding()

      Description copied from class: `FieldDef`
      This is the name of the property used with the JavaBeans API. If no value is set, the binding is the combination of `MetaData.getBindClass()` (if any, separated with a dot) and the field's name.
      Overrides:
        `getBinding` in class `FieldDef`
      Returns:
        possible object is `String`

    - #### setBinding

          public void setBinding(String value)

      Description copied from class: `FieldDef`
      Sets the value of the binding property.
      Overrides:
        `setBinding` in class `FieldDef`
      Parameters:
        `value` - allowed object is `String`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public static String toString(FieldDef fieldDef)

    - #### getLinkpanel

          public Linkpanel getLinkpanel()

    - #### backupFields

          public void backupFields()

    - #### restoreFields

          public void restoreFields()

    - #### setLinkpanel

          public void setLinkpanel(Linkpanel linkpanel)

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