Examples of AnotherPojo


Examples of org.monjo.example.AnotherPojo

    complexPojo.setDescription("pojo complexo");
    return complexPojo;
  }

  public static AnotherPojo createAnotherPojo(User user) {
    AnotherPojo another = new AnotherPojo();
    another.setUser(user);
    another.setDescription("pojo complexo");
    return another;
  }
View Full Code Here

Examples of org.monjo.example.AnotherPojo

  @Test
  public void shouldNotUseRef2() throws Exception{
    User user = new User();
    user.setName("NewCategory");

    AnotherPojo anotherPojo = PojoBuilder.createAnotherPojo(user);
   
    Monjo<ObjectId, AnotherPojo> monjoComplex = new Monjo<ObjectId, AnotherPojo>(getMongoDB(), AnotherPojo.class);

    monjoComplex.removeAll();

    monjoComplex.insert(anotherPojo);
   
    MonjoCursor<AnotherPojo> monjoCursor = monjoComplex.find();
    AnotherPojo anotherPojo2 = monjoCursor.toList().get(0);
    assertEquals("NewCategory", anotherPojo2.getUser().getName());
  }
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.