Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.jxpath.ri.model.dynabeans
Class DynaBeanPropertyPointer  view DynaBeanPropertyPointer download DynaBeanPropertyPointer.java

java.lang.Object
  extended byorg.apache.commons.jxpath.ri.model.NodePointer
      extended byorg.apache.commons.jxpath.ri.model.beans.PropertyPointer
          extended byorg.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPropertyPointer
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, org.apache.commons.jxpath.Pointer, java.io.Serializable

public class DynaBeanPropertyPointer
extends org.apache.commons.jxpath.ri.model.beans.PropertyPointer

Pointer pointing to a property of a DynaBean.

Version:
$Revision: 1.12 $ $Date: 2004/04/04 22:06:35 $

Field Summary
private  org.apache.commons.beanutils.DynaBean dynaBean
           
private  java.lang.String name
           
private  java.lang.String[] names
           
 
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
DynaBeanPropertyPointer(org.apache.commons.jxpath.ri.model.NodePointer parent, org.apache.commons.beanutils.DynaBean dynaBean)
           
 
Method Summary
private  java.lang.Object convert(java.lang.Object value, boolean element)
           
 java.lang.Object getBaseValue()
          Returns the value represented by the pointer before indexing.
 java.lang.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()
          Number of the DP object's properties.
 int getPropertyIndex()
          Index of the currently selected property in the list of all properties sorted alphabetically.
 java.lang.String getPropertyName()
          Returns the name of the currently selected property or "*" if none has been selected.
 java.lang.String[] getPropertyNames()
          Names of all properties, sorted alphabetically
protected  boolean isActualProperty()
          Returns true if the bean has the currently selected property
 boolean isContainer()
          This type of node is auxiliary.
protected  boolean isIndexedProperty()
           
 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(java.lang.String propertyName)
          Select a property by name.
private  void setValue(int index, java.lang.Object value)
           
 void setValue(java.lang.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, getDefaultNamespaceURI, getImmediateParentPointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setIndex, setNamespaceResolver, testNode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dynaBean

private org.apache.commons.beanutils.DynaBean dynaBean

name

private java.lang.String name

names

private java.lang.String[] names
Constructor Detail

DynaBeanPropertyPointer

public DynaBeanPropertyPointer(org.apache.commons.jxpath.ri.model.NodePointer parent,
                               org.apache.commons.beanutils.DynaBean dynaBean)
Method Detail

getBaseValue

public java.lang.Object getBaseValue()
Description copied from class: org.apache.commons.jxpath.ri.model.NodePointer
Returns the value represented by the pointer before indexing. So, if the node represents an element of a collection, this method returns the collection itself.


isContainer

public boolean isContainer()
This type of node is auxiliary.


getPropertyCount

public int getPropertyCount()
Number of the DP object's properties.


getPropertyNames

public java.lang.String[] getPropertyNames()
Names of all properties, sorted alphabetically


getPropertyName

public java.lang.String getPropertyName()
Returns the name of the currently selected property or "*" if none has been selected.


setPropertyName

public void setPropertyName(java.lang.String propertyName)
Select a property by name.


getPropertyIndex

public int getPropertyIndex()
Index of the currently selected property in the list of all properties sorted alphabetically.


setPropertyIndex

public void setPropertyIndex(int index)
Index a property by its index in the list of all properties sorted alphabetically.


getImmediateNode

public java.lang.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.


isActualProperty

protected boolean isActualProperty()
Returns true if the bean has the currently selected property


isIndexedProperty

protected boolean isIndexedProperty()

setValue

public void setValue(java.lang.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.


remove

public void remove()
Description copied from class: org.apache.commons.jxpath.ri.model.NodePointer
Remove the node of the object graph this pointer points to.


setValue

private void setValue(int index,
                      java.lang.Object value)

convert

private java.lang.Object convert(java.lang.Object value,
                                 boolean element)