Examples of persist()


Examples of sino.dao.jpa.PostDaoImpl.persist()

        post.setTitle("标题");
        post.setPreview("预览");
        post.setModificationDate(new Date());
        post.setCreationDate(new Date());
        post.setType(PostType.NEWS);
        postDao.persist(post);
        postDao.getEntityManager().getTransaction().commit();
        postDao.setEntityManager(factory.createEntityManager());
        System.out.println(postDao.retrieve(post.getId()).getContent());
        System.out.println(postDao.retrieve(1).getPreview());
    }
View Full Code Here

Examples of srsim.persistence.DerbyEmbeddedDS.persist()

    SimulationRecord record = new SimulationRecord();
    record.setBrightness(100.0D);
    record.setTemperature(15.0D);
    record.setEnergyConsumption(1400.0D);
    record.setTimeStamp(System.currentTimeMillis());
    ds.persist(record);
    Criterion criterion = new Criterion("temperature").lessEqual("20").and(
        new Criterion("brightness").lessThan("10000"));
    List<SimulationRecord> storedRecords = ds.find(criterion);
    Assert.assertFalse(storedRecords.isEmpty());
  }
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.StringGISModelWriter.persist()

    Element root = new Element("rescorer");
    for(String type : modelsByType.keySet()) {
      Element maxent = new Element("maxent");
      maxent.addAttribute(new Attribute("type", type));
      StringGISModelWriter sgmw = new StringGISModelWriter(modelsByType.get(type));
      sgmw.persist();
      maxent.appendChild(sgmw.toString());
      root.appendChild(maxent);

    }
    return root;
View Full Code Here

Examples of webworks.message.list.impl.CustomMessageStore.persist()

              folder.fireElementUpdated(message, message);
           
              //  We called MarkAll Read, skip the callback
              //MessageListNamespace.getInstance().invokeItemMarkedRead(message);
            }
            messageStore.persist();
          }
        } catch (Exception e) {
          throw new RuntimeException(e.getMessage());
        }
      }
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.