Package com.firefly.template.support

Examples of com.firefly.template.support.ObjectNavigator.find()


    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
    Assert.assertThat(o.find(model, "ok"), nullValue());
  }
 
  public static void main(String[] args) {
View Full Code Here


    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
    Assert.assertThat(o.find(model, "ok"), nullValue());
  }
 
  public static void main(String[] args) {
    ObjectNavigator o = ObjectNavigator.getInstance();
View Full Code Here

    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
    Assert.assertThat(o.find(model, "ok"), nullValue());
  }
 
  public static void main(String[] args) {
    ObjectNavigator o = ObjectNavigator.getInstance();
   
View Full Code Here

    foo.setMap(fooMap);
   
    Model model = new ModelMock();
    model.put("foo", foo);
   
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
View Full Code Here

   
    Model model = new ModelMock();
    model.put("foo", foo);
   
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
    System.out.println(o.find(model, "foo.map['bar2']"));
View Full Code Here

    Model model = new ModelMock();
    model.put("foo", foo);
   
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
    System.out.println(o.find(model, "foo.map['bar2']"));
    System.out.println(o.find(model, "foo.map['bar2'].price"));
View Full Code Here

    model.put("foo", foo);
   
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
    System.out.println(o.find(model, "foo.map['bar2']"));
    System.out.println(o.find(model, "foo.map['bar2'].price"));
    System.out.println(o.find(model, "foo.map['bar4']"));
View Full Code Here

   
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
    System.out.println(o.find(model, "foo.map['bar2']"));
    System.out.println(o.find(model, "foo.map['bar2'].price"));
    System.out.println(o.find(model, "foo.map['bar4']"));
    System.out.println(o.find(model, "user.name"));
View Full Code Here

    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
    System.out.println(o.find(model, "foo.map['bar2']"));
    System.out.println(o.find(model, "foo.map['bar2'].price"));
    System.out.println(o.find(model, "foo.map['bar4']"));
    System.out.println(o.find(model, "user.name"));
   
View Full Code Here

    System.out.println(o.find(model, "foo.bar.info"));
    System.out.println(o.find(model, "foo.bar.serialNumber"));
    System.out.println(o.find(model, "foo.bar.price"));
    System.out.println(o.find(model, "foo.numbers[2]"));
    System.out.println(o.find(model, "foo.bags[2]"));
    System.out.println(o.find(model, "foo.map['bar2']"));
    System.out.println(o.find(model, "foo.map['bar2'].price"));
    System.out.println(o.find(model, "foo.map['bar4']"));
    System.out.println(o.find(model, "user.name"));
   
//    long start = System.currentTimeMillis();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.