Package com.avaje.ebean

Examples of com.avaje.ebean.EbeanServer.save()


    childFile1.setParent(parentFile1);
    childFile2.setParent(parentFile1);
    parentFile1.getAlternatives().add(childFile1);
    parentFile1.getAlternatives().add(childFile2);

    server.save(parentFile1);
    server.save(childFile1);
    server.save(childFile2);

    // As a workaround for the problem, the child objects can be deleted first
    //server.delete(childFile1);
View Full Code Here


    childFile2.setParent(parentFile1);
    parentFile1.getAlternatives().add(childFile1);
    parentFile1.getAlternatives().add(childFile2);

    server.save(parentFile1);
    server.save(childFile1);
    server.save(childFile2);

    // As a workaround for the problem, the child objects can be deleted first
    //server.delete(childFile1);
    //server.delete(childFile2);
View Full Code Here

    parentFile1.getAlternatives().add(childFile1);
    parentFile1.getAlternatives().add(childFile2);

    server.save(parentFile1);
    server.save(childFile1);
    server.save(childFile2);

    // As a workaround for the problem, the child objects can be deleted first
    //server.delete(childFile1);
    //server.delete(childFile2);
    server.delete(parentFile1);
View Full Code Here

  public void test() {

    EbeanServer server = Ebean.getServer(null);

    EBasicVer account = new EBasicVer();
    server.save(account);

    List<EBasicVer> alist0 = server.find(EBasicVer.class).setUseQueryCache(true).findList();

    EBasicVer a2 = new EBasicVer();
    server.save(a2);
View Full Code Here

    server.save(account);

    List<EBasicVer> alist0 = server.find(EBasicVer.class).setUseQueryCache(true).findList();

    EBasicVer a2 = new EBasicVer();
    server.save(a2);

    List<EBasicVer> alist1 = server.find(EBasicVer.class).setUseQueryCache(true).findList();

    Assert.assertEquals(alist0.size() + 1, alist1.size());
    // List<EBasicVer> noQueryCacheList = server.find(EBasicVer.class)
View Full Code Here

    try {
     
      EBasic bean1 = new EBasic();
      bean1.setName("hello");
     
      server.save(bean1);
     
      EBasic updatedEntity = new EBasic();
      updatedEntity.setId(bean1.getId());
      updatedEntity.setName("hello-changed");
     
View Full Code Here

    EbeanServer server = Ebean.getServer(null);
   
    final ProductConfiguration pc = new ProductConfiguration();
    pc.setName("PC1");
    server.save(pc);

    final GroupConfiguration gc = new GroupConfiguration();
    gc.setName("GC1");
    server.save(gc);
View Full Code Here

    pc.setName("PC1");
    server.save(pc);

    final GroupConfiguration gc = new GroupConfiguration();
    gc.setName("GC1");
    server.save(gc);

    CalculationResult r = new CalculationResult();
    final Double charge = 100.0;
    r.setCharge(charge);
    r.setProductConfiguration(pc);
View Full Code Here

    CalculationResult r = new CalculationResult();
    final Double charge = 100.0;
    r.setCharge(charge);
    r.setProductConfiguration(pc);
    r.setGroupConfiguration(gc);
    server.save(r);


    Query<CalculationResult> q = server.createNamedQuery(CalculationResult.class, "loadResult");
    q.setParameter("charge", charge);
   
View Full Code Here

    EbeanServer server = Ebean.getServer(null);
   
    final ProductConfiguration pc = new ProductConfiguration();
    pc.setName("PC1");
    server.save(pc);

    CalculationResult r = new CalculationResult();
    final Double charge = 100.0;
    r.setCharge(charge);
    r.setProductConfiguration(pc);
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.