Package org.apache.commons.jxpath.ri.model.dynabeans

# Class DynaBeanPropertyPointer

java.lang.Object
org.apache.commons.jxpath.ri.model.NodePointer
org.apache.commons.jxpath.ri.model.beans.PropertyPointer
org.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPropertyPointer

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Comparable`, `Pointer`

public class DynaBeanPropertyPointer extends PropertyPointer
Pointer to a property of a `DynaBean`. If the target DynaBean is Serializable, so should this instance be.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyPointer

  `bean, propertyIndex, UNSPECIFIED_PROPERTY`

  ### Fields inherited from class org.apache.commons.jxpath.ri.model.NodePointer

  `index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DynaBeanPropertyPointer(NodePointer parent, org.apache.commons.beanutils.DynaBean dynaBean)`
  Constructs a new DynaBeanPropertyPointer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getBaseValue()`
  Gets the value represented by the pointer before indexing.
  `Object`
  `getImmediateNode()`
  If index == WHOLE_COLLECTION, the value of the property, otherwise the value of the index'th element of the collection represented by the property.
  `int`
  `getPropertyCount()`
  Count the number of properties represented.
  `int`
  `getPropertyIndex()`
  Index of the currently selected property in the list of all properties sorted alphabetically.
  `String`
  `getPropertyName()`
  Returns the name of the currently selected property or "*" if none has been selected.
  `String[]`
  `getPropertyNames()`
  Gets the names of the included properties.
  `protected boolean`
  `isActualProperty()`
  Returns true if the bean has the currently selected property.
  `boolean`
  `isContainer()`
  This type of node is auxiliary.
  `protected boolean`
  `isIndexedProperty()`
  Tests whether the property referenced is an indexed property.
  `void`
  `remove()`
  Remove the node of the object graph this pointer points to.
  `void`
  `setPropertyIndex(int index)`
  Index a property by its index in the list of all properties sorted alphabetically.
  `void`
  `setPropertyName(String propertyName)`
  Select a property by name.
  `void`
  `setValue(Object value)`
  If index == WHOLE_COLLECTION, change the value of the property, otherwise change the value of the index'th element of the collection represented by the property.

  ### Methods inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyPointer

  `compareChildNodePointers, createChild, createChild, createPath, createPath, equals, getBean, getImmediateValuePointer, getLength, getName, hashCode, isActual, isCollection, isLeaf`

  ### Methods inherited from class org.apache.commons.jxpath.ri.model.NodePointer

  `asPath, attributeIterator, childIterator, clone, compareTo, createAttribute, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateParentPointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, handle, handle, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setExceptionHandler, setIndex, setNamespaceResolver, testNode, toString, verify`

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

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

- ## Constructor Details

  - ### DynaBeanPropertyPointer

    public DynaBeanPropertyPointer(NodePointer parent, org.apache.commons.beanutils.DynaBean dynaBean)
    Constructs a new DynaBeanPropertyPointer.
    Parameters:
      `parent` - pointer
      `dynaBean` - pointed

- ## Method Details

  - ### getBaseValue

    public Object getBaseValue()
    Description copied from class: `NodePointer`
    Gets the value represented by the pointer before indexing. So, if the node represents an element of a collection, this method returns the collection itself.
    Specified by:
      `getBaseValue` in class `NodePointer`
    Returns:
      Object value

  - ### getImmediateNode

    public Object getImmediateNode()
    If index == WHOLE_COLLECTION, the value of the property, otherwise the value of the index'th element of the collection represented by the property. If the property is not a collection, index should be zero and the value will be the property itself.
    Overrides:
      `getImmediateNode` in class `PropertyPointer`
    Returns:
      Object

  - ### getPropertyCount

    public int getPropertyCount()
    Description copied from class: `PropertyPointer`
    Count the number of properties represented.
    Specified by:
      `getPropertyCount` in class `PropertyPointer`
    Returns:
      int

  - ### getPropertyIndex

    public int getPropertyIndex()
    Index of the currently selected property in the list of all properties sorted alphabetically.
    Overrides:
      `getPropertyIndex` in class `PropertyPointer`
    Returns:
      int

  - ### getPropertyName

    public String getPropertyName()
    Returns the name of the currently selected property or "*" if none has been selected.
    Specified by:
      `getPropertyName` in class `PropertyPointer`
    Returns:
      String

  - ### getPropertyNames

    public String[] getPropertyNames()
    Description copied from class: `PropertyPointer`
    Gets the names of the included properties.
    Specified by:
      `getPropertyNames` in class `PropertyPointer`
    Returns:
      String[]

  - ### isActualProperty

    protected boolean isActualProperty()
    Returns true if the bean has the currently selected property.
    Specified by:
      `isActualProperty` in class `PropertyPointer`
    Returns:
      boolean

  - ### isContainer

    public boolean isContainer()
    This type of node is auxiliary.
    Overrides:
      `isContainer` in class `NodePointer`
    Returns:
      true

  - ### isIndexedProperty

    protected boolean isIndexedProperty()
    Tests whether the property referenced is an indexed property.
    Returns:
      boolean

  - ### remove

    public void remove()
    Description copied from class: `NodePointer`
    Remove the node of the object graph this pointer points to.
    Overrides:
      `remove` in class `NodePointer`

  - ### setPropertyIndex

    public void setPropertyIndex(int index)
    Index a property by its index in the list of all properties sorted alphabetically.
    Overrides:
      `setPropertyIndex` in class `PropertyPointer`
    Parameters:
      `index` - to set

  - ### setPropertyName

    public void setPropertyName(String propertyName)
    Select a property by name.
    Specified by:
      `setPropertyName` in class `PropertyPointer`
    Parameters:
      `propertyName` - to select

  - ### setValue

    public void setValue(Object value)
    If index == WHOLE_COLLECTION, change the value of the property, otherwise change the value of the index'th element of the collection represented by the property.
    Specified by:
      `setValue` in interface `Pointer`
    Specified by:
      `setValue` in class `NodePointer`
    Parameters:
      `value` - to set