SRJRCFrames
v0.1.296

de.schwarzrot.data.access
Class PropertyAccessor

java.lang.Object
  extended by de.schwarzrot.data.access.PropertyAccessor

public class PropertyAccessor
extends Object

helper class to allow anonymous access to a property of a bean. Opposed to the means of DataAccessor this class is not the anonymous access to the properties of a certain bean. Instead it is used to define an access rule to beans properties, when the bean is unknown or subject to heavy changes.

Primary use of this class is the BeanListCellRenderer, which has to extract a beans property for display. As the beans are most likely to be part of a Collection, it doesn't make much sense, to define an accessor for each bean.

propertyName may be the name of a property or the path to a property of a embedded bean. This accessor also handles knownChildren as well as unknownChildren, which means, a segment of the property path may be a key to the map (for known children) or an index (for unknwon children). All segments should be separated by "." like java classes.

Author:
Reinhard Mantey

Constructor Summary
PropertyAccessor(String propertyName)
           
 
Method Summary
 Object getPropertyValue(Object bean)
           
protected  void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyAccessor

public PropertyAccessor(String propertyName)
Method Detail

getPropertyValue

public Object getPropertyValue(Object bean)

setup

protected void setup()

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.