[ 
https://issues.apache.org/jira/browse/SANDBOX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950541#comment-13950541
 ] 

Benedikt Ritter commented on SANDBOX-464:
-----------------------------------------

Hello André,

I've reviewed you're patch and it looks quite nice. How ever, I've revisited my 
initial thought that there should be a distinct method for property 
expressions. Now I'm thinking: maybe I want to interpret a property expression 
and then get an indexed value using a IndexedPropertyGetterAccessor. Example:

{code:java}
on(myBean).getIndexed("property.path.expression.indexedProperty").at(2).get()
{code}

This would be the same as:

{code:java}
on(myBean).get("property.path.expression.indexedProperty[2]").get()
{code}

The same applies for mapped properties. I'm not sure if we need this 
flexibility. But it would surely be nice if the current getter and setter 
methods can handle both, simple (indexed/mapped) properties and property 
expressions.

Do you think it is possible to implement this feature that way? Do you think it 
makes sense? Or does this only cause confusion?

Regards,
Benedikt

> Add support for interpreting property expressions
> -------------------------------------------------
>
>                 Key: SANDBOX-464
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-464
>             Project: Commons Sandbox
>          Issue Type: Task
>          Components: BeanUtils2
>    Affects Versions: Nightly Builds
>            Reporter: Benedikt Ritter
>         Attachments: Commons-Sandbox-464-Get.patch
>
>
> BeanUtils 1 has the functionality to interpret property paths. For example 
> the call:
> {code:java}
> BeanUtils.getProperty("adress.street", person);
> {code}
> would first get the address of the given person and then get the street from 
> the address and return it. The same is possible for list and mapped 
> properties.
> In order to be supplement for BeanUtils1, we need to implement this in 
> BeanUtils2.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to