Package org.chromattic.api

Examples of org.chromattic.api.ChromatticSession.persist()


      try
      {
         ProducerInfosMapping pims = getProducerInfosMapping(session);
         ProducerInfoMapping pim = pims.createProducerInfo(info.getId());
         String key = session.persist(pims, pim, info.getId());
         info.setKey(key);
         pim.initFrom(info);

         persister.closeSession(session, true);
      }
View Full Code Here


   public void testPersistence() throws Exception {

      chromatticManager.beginRequest();
      ChromatticSession session = test1LF.getChromattic().openSession();
      FooEntity foo = session.create(FooEntity.class);
      String fooId = session.persist(foo, "testPersistence");
      session.save();
      chromatticManager.endRequest(true);

      chromatticManager.beginRequest();
      session = test1LF.getChromattic().openSession();
View Full Code Here

         else
         {
            ExportInfosMapping exportInfosMapping = getExportInfosMapping(session);
            String exportTimeAsString = "" + exportTime;
            ExportInfoMapping exportInfo = exportInfosMapping.createExportInfo(exportTimeAsString);
            session.persist(exportInfosMapping, exportInfo, exportTimeAsString);
            exportInfo.initFrom(info);

            persister.save();
            exportInfosCount++;
         }
View Full Code Here

         pims.setLastModified(now);

         // use ProducerInfosMapping to create a child ProducerInfo node and initialize it
         ProducerInfoMapping pim = pims.createProducerInfo(info.getId());
         // we first need to persist the ProducerInfoMapping as a child of the ProducerInfosMapping element, using its id as path
         String key = session.persist(pims, pim, info.getId());
         info.setKey(key);
         info.setLastModified(now);
         pim.initFrom(info);

         persister.closeSession(true);
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.