Package com.db4o

Examples of com.db4o.ObjectContainer.commit()


        f.setId(System.currentTimeMillis() + "");
        f.setId(FEEDID);
        f.setUpdated(DateTime.now());
        ObjectContainer con = this.controller.releaseContainer();
        con.set(f);
        con.commit();

        con.close();
        return f;
    }
View Full Code Here


                      db.set(entities);
                    } else if (actionName.equals("detach")) {
                      db.set(entities);
                    }
                  }
                  db.commit();
                }
              } else if (arg instanceof EntitiesAction) {
                // domain model session, but no transaction
                EntitiesAction action = (EntitiesAction) arg;
                IEntities entities = action.getEntities();
View Full Code Here

                } else if (actionName.equals("attach")) {
                  db.set(entities);
                } else if (actionName.equals("detach")) {
                  db.set(entities);
                }
                db.commit();
              }
            } else if (arg instanceof EntitiesAction) {
              // no domain model session
              EntitiesAction action = (EntitiesAction) arg;
              IEntities entities = action.getEntities();
View Full Code Here

              } else if (actionName.equals("attach")) {
                db.set(entities);
              } else if (actionName.equals("detach")) {
                db.set(entities);
              }
              db.commit();
            }
          }
        }
      }
    } catch (Exception e) {
View Full Code Here

    progressMonitor.beginTask(Messages.Migration2To5_MIGRATING_DATA, totalProgress);

    ObjectContainer oc = Db4o.openFile(configFactory.createConfiguration(), dbFileName);

    totalProgressIncremented = Migration2To3.migrate(progressMonitor, totalProgress, totalProgressIncremented, oc);
    oc.commit();
    oc.close();

    File dbLastBackUpFile = DBManager.getDefault().getDBLastBackUpFile();
    dbLastBackUpFile.delete();
View Full Code Here

    progressMonitor.beginTask(Messages.Migration2To3_MIGRATING_DATA, totalProgress);

    ObjectContainer oc = Db4o.openFile(configFactory.createConfiguration(), dbFileName);

    totalProgressIncremented = migrate(progressMonitor, totalProgress, totalProgressIncremented, oc);
    oc.commit();
    oc.close();

    progressMonitor.worked(totalProgress - totalProgressIncremented);

    return new MigrationResult(false, false, false);
View Full Code Here

        MigrationHelper.setField(news, parentIdFieldName, newsBin.getId().longValue());
        oc.ext().set(news, Integer.MAX_VALUE);
      }
    }

    oc.commit();
    oc.close();

    progressMonitor.worked(totalProgress - totalProgressIncremented);

    return new MigrationResult(true, false, 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.