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

Class DynaBeanPropertyPointer

Implemented Interfaces:
Cloneable, Comparable, Pointer, Serializable

public class DynaBeanPropertyPointer
extends PropertyPointer

Pointer pointing to a property of a DynaBean.
Version:
$Revision: 1.12 $ $Date: 2004/04/04 22:06:35 $
Author:
Dmitri Plotnikov

Field Summary

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

UNSPECIFIED_PROPERTY, bean, propertyIndex

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

UNKNOWN_NAMESPACE, WHOLE_COLLECTION, index, locale, parent

Constructor Summary

DynaBeanPropertyPointer(NodePointer parent, DynaBean dynaBean)

Method Summary

Object
getBaseValue()
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.
String
getPropertyName()
Returns the name of the currently selected property or "*" if none has been selected.
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()
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, getImmediateNode, getImmediateValuePointer, getLength, getName, getPropertyCount, getPropertyIndex, getPropertyName, getPropertyNames, hashCode, isActual, isActualProperty, isCollection, isLeaf, setPropertyIndex, setPropertyName

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

asPath, attributeIterator, childIterator, clone, compareChildNodePointers, compareTo, createAttribute, createChild, createChild, createPath, createPath, getBaseValue, getDefaultNamespaceURI, getImmediateNode, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLength, getLocale, getName, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, isActual, isAttribute, isCollection, isContainer, isDefaultNamespace, isLanguage, isLeaf, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, remove, setAttribute, setIndex, setNamespaceResolver, setValue, testNode, toString

Constructor Details

DynaBeanPropertyPointer

public DynaBeanPropertyPointer(NodePointer parent,
                               DynaBean dynaBean)

Method Details

getBaseValue

public Object getBaseValue()
Overrides:
getBaseValue in interface NodePointer

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 interface PropertyPointer

getPropertyCount

public int getPropertyCount()
Number of the DP object's properties.
Overrides:
getPropertyCount in interface PropertyPointer

getPropertyIndex

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

getPropertyName

public String getPropertyName()
Returns the name of the currently selected property or "*" if none has been selected.
Overrides:
getPropertyName in interface PropertyPointer

getPropertyNames

public String[] getPropertyNames()
Names of all properties, sorted alphabetically
Overrides:
getPropertyNames in interface PropertyPointer

isActualProperty

protected boolean isActualProperty()
Returns true if the bean has the currently selected property
Overrides:
isActualProperty in interface PropertyPointer

isContainer

public boolean isContainer()
This type of node is auxiliary.
Overrides:
isContainer in interface NodePointer

isIndexedProperty

protected boolean isIndexedProperty()

remove

public void remove()
Overrides:
remove in interface NodePointer

setPropertyIndex

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

setPropertyName

public void setPropertyName(String propertyName)
Select a property by name.
Overrides:
setPropertyName in interface PropertyPointer

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
Overrides:
setValue in interface NodePointer