apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tushar Gosavi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (APEXMALHAR-2536) Support for setters on nested Pojo
Date Thu, 10 Aug 2017 09:16:00 GMT
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
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; }

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

View raw message