org.apache.myfaces.trinidad.bean

## Class PropertyKey

- java.lang.Object
- - org.apache.myfaces.trinidad.bean.PropertyKey

-     public class PropertyKey
      extends Object

  Key for an entry in a FacesBean.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PropertyKey.Mutable` Indicates whether or not a property is mutable, and if so how likely it is to actually be mutated.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CAP_LIST` Capability indicating this property describes a list.
    `static int` | `CAP_NOT_BOUND` Capability indicating this property does not support bindings.
    `static int` | `CAP_PARTIAL_STATE_HOLDER` Capability indicating this property can use the PartialStateHolder API.
    `static int` | `CAP_STATE_HOLDER` Capability indicating this property can use the StateHolder API.
    `static int` | `CAP_TRANSIENT` Capability indicating this property is transient.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PropertyKey(String name, Class<?> type, Object defaultValue, int capabilities, int index)`
    `protected` | `PropertyKey(String name, Class<?> type, Object defaultValue, int capabilities, int index, PropertyKey.Mutable mutable)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PropertyKey` | `createPropertyKey(String name)` Create a named PropertyKey, not attached to any type.
    `boolean` | `equals(Object o)`
    `Object` | `getDefault()` Returns the default value of this property.
    `static PropertyKey` | `getDefaultPropertyKey(String name)` Returns a named PropertyKey of type Object
    `int` | `getIndex()` Returns the index of this property.
    `PropertyKey.Mutable` | `getMutable()` Returns true if the type of this property is mutable
    `String` | `getName()` Returns the name of this property.
    `FacesBean.Type` | `getOwner()` Returns the owning type for this property key.
    `boolean` | `getSupportsBinding()` Returns true if the property supports being bound.
    `Class<?>` | `getType()` Returns the type of this property.
    `int` | `hashCode()`
    `boolean` | `isList()` Returns true if the property is used to store a list.
    `boolean` | `isPartialStateHolder()` Returns true if the property is used to store a PartialStateHolder.
    `boolean` | `isTransient()` Returns true if the property is transient.
    `Object` | `restoreValue(javax.faces.context.FacesContext context, Object savedValue)`
    `Object` | `saveValue(javax.faces.context.FacesContext context, Object value)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### CAP_NOT_BOUND

          public static final int CAP_NOT_BOUND

      Capability indicating this property does not support bindings.
      See Also:
        Constant Field Values

    - #### CAP_TRANSIENT

          public static final int CAP_TRANSIENT

      Capability indicating this property is transient.
      See Also:
        Constant Field Values

    - #### CAP_LIST

          public static final int CAP_LIST

      Capability indicating this property describes a list. List PropertyKeys will automatically be marked as not supporting bindings.
      See Also:
        Constant Field Values

    - #### CAP_STATE_HOLDER

          public static final int CAP_STATE_HOLDER

      Capability indicating this property can use the StateHolder API.
      See Also:
        Constant Field Values

    - #### CAP_PARTIAL_STATE_HOLDER

          public static final int CAP_PARTIAL_STATE_HOLDER

      Capability indicating this property can use the PartialStateHolder API.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PropertyKey

          protected PropertyKey(String name,
                     Class<?> type,
                     Object defaultValue,
                     int capabilities,
                     int index)

    - #### PropertyKey

          protected PropertyKey(String name,
                     Class<?> type,
                     Object defaultValue,
                     int capabilities,
                     int index,
                     PropertyKey.Mutable mutable)

  - ### Method Detail

    - #### createPropertyKey

          public static PropertyKey createPropertyKey(String name)

      Create a named PropertyKey, not attached to any type.
      See Also:
        `getDefaultPropertyKey(java.lang.String)`

    - #### getDefaultPropertyKey

          public static PropertyKey getDefaultPropertyKey(String name)

      Returns a named PropertyKey of type Object

    - #### getType

          public Class<?> getType()

      Returns the type of this property.

    - #### getDefault

          public Object getDefault()

      Returns the default value of this property.

    - #### getOwner

          public FacesBean.Type getOwner()

      Returns the owning type for this property key.

    - #### getSupportsBinding

          public boolean getSupportsBinding()

      Returns true if the property supports being bound.

    - #### isTransient

          public boolean isTransient()

      Returns true if the property is transient.

    - #### isList

          public boolean isList()

      Returns true if the property is used to store a list.

    - #### getMutable

          public PropertyKey.Mutable getMutable()

      Returns true if the type of this property is mutable

    - #### isPartialStateHolder

          public boolean isPartialStateHolder()

      Returns true if the property is used to store a PartialStateHolder.

    - #### getName

          public String getName()

      Returns the name of this property.

    - #### getIndex

          public int getIndex()

      Returns the index of this property.

    - #### saveValue

          public Object saveValue(javax.faces.context.FacesContext context,
                         Object value)

    - #### restoreValue

          public Object restoreValue(javax.faces.context.FacesContext context,
                            Object savedValue)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.