You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by "Tushar Gosavi (JIRA)" <ji...@apache.org> on 2017/08/10 09:16:00 UTC
[jira] [Created] (APEXMALHAR-2536) Support for setters on nested
Pojo
Tushar Gosavi created APEXMALHAR-2536:
-----------------------------------------
Summary: Support for setters on nested Pojo
Key: APEXMALHAR-2536
URL: https://issues.apache.org/jira/browse/APEXMALHAR-2536
Project: Apache Apex Malhar
Issue Type: Improvement
Reporter: Tushar Gosavi
Priority: Minor
Getters support getting values from nested Pojo by adding suitable methods/fields in the chain
for example
{code}
class Inner {
private int b;
public int getB() { return b; }
public void setB(int b) { this.b = b; }
}
class Nested {
private in a;
private Inner inner;
public int getA() { return a; }
public void getA(int a) { this.a = a; }
public Inner getInner() { return inner; }
public void setInner(Inner i) { this.inner = i; }
}
{code}
With above objects If getter is specified as `inner.b` then the expression is created with
`object.getInner().getB()` which compiles and gives result correctly.
If setter is specified with same expression it fails to compile as inner is a private object.
We plan to include similar functionality for setters by following chain of objects and constructing valid java expressions.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)