Examples of EBasicWithLifecycle


Examples of com.avaje.tests.model.basic.EBasicWithLifecycle

public class TestLifecyleAnnotatedBean extends BaseTestCase {

  @Test
  public void test() {
   
    EBasicWithLifecycle bean = new EBasicWithLifecycle();
    bean.setName("hello there");
   
    Ebean.getServerCacheManager();
    Ebean.save(bean);
    Assert.assertEquals("prePersist,postPersist,", bean.getBuffer());

    EBasicWithLifecycle beanWasLoaded = Ebean.find(EBasicWithLifecycle.class, bean.getId());
    Assert.assertEquals("postLoad", beanWasLoaded.getBuffer().toString());
   
    bean.setName("Changed");
    Ebean.save(bean);
   
    Ebean.delete(bean);
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.