Package org.apache.tapestry5.beanmodel

## Interface PropertyModel

- All Superinterfaces:
    `AnnotationProvider`
  All Known Implementing Classes:
    `PropertyModelImpl`

      public interface PropertyModel
      extends AnnotationProvider

  Part of a `BeanModel` that defines the attributes of a single property of a bean. A PropertyModel is also an `AnnotationProvider`, as long as the `PropertyConduit` is non-null. When there is no property conduit, then `AnnotationProvider.getAnnotation(Class)` will return null.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `PropertyModel` | `dataType​(java.lang.String dataType)` | Changes the data type for the property.
    `PropertyConduit` | `getConduit()` | Returns an object used to read or update the property.
    `java.lang.String` | `getDataType()` | Returns a logical name for the type of UI needed to view or edit the property.
    `java.lang.String` | `getId()` | Returns the id used to access other resources (this is based on the property name, but with any excess punctuation stripped out).
    `java.lang.String` | `getLabel()` | Returns a user-presentable label for the property.
    `java.lang.String` | `getPropertyName()` | Returns the name of the property (which may, in fact, be a property expression).
    `java.lang.Class` | `getPropertyType()` | Returns the type of the property.
    `boolean` | `isSortable()` | Returns true if the property can be used for sorting.
    `PropertyModel` | `label​(java.lang.String label)` | Changes the label for the property to the provided value.
    `BeanModel` | `model()` | Returns the containing model, often used for "fluent" construction of the model.
    `PropertyModel` | `sortable​(boolean sortable)` | Updates sortable and returns the model for further changes.

    - ### Methods inherited from interface org.apache.tapestry5.commons.AnnotationProvider

      `getAnnotation`

- - ### Method Detail

    - #### getPropertyName

          java.lang.String getPropertyName()

      Returns the name of the property (which may, in fact, be a property expression).

    - #### getId

          java.lang.String getId()

      Returns the id used to access other resources (this is based on the property name, but with any excess punctuation stripped out).

    - #### getLabel

          java.lang.String getLabel()

      Returns a user-presentable label for the property.

    - #### getPropertyType

          java.lang.Class getPropertyType()

      Returns the type of the property.

    - #### getDataType

          java.lang.String getDataType()

      Returns a logical name for the type of UI needed to view or edit the property. This is initially determined from the property type.

    - #### dataType

          PropertyModel dataType​(java.lang.String dataType)

      Changes the data type for the property.
      Parameters:
        `dataType` -
      Returns:
        the property model, for further changes

    - #### getConduit

          PropertyConduit getConduit()

      Returns an object used to read or update the property. For virtual properties (properties that do not actually exist on the bean), the conduit may be null.

    - #### label

          PropertyModel label​(java.lang.String label)

      Changes the label for the property to the provided value.
      Parameters:
        `label` - new label for property
      Returns:
        the property model, for further changes

    - #### model

          BeanModel model()

      Returns the containing model, often used for "fluent" construction of the model.

    - #### isSortable

          boolean isSortable()

      Returns true if the property can be used for sorting. By default, this is true only if the property type implements Comparable.

    - #### sortable

          PropertyModel sortable​(boolean sortable)

      Updates sortable and returns the model for further changes.
      Returns:
        the property model, for further changes