Example #1
0
  @Override
  protected void detachObjects(
      CDOID[] detachedObjects, CDOBranch branch, long timeStamp, OMMonitor monitor) {
    monitor.begin(detachedObjects.length);

    try {
      for (CDOID id : detachedObjects) {
        DB4OStore.removeRevision(getObjectContainer(), id);
        monitor.worked();
      }
    } finally {
      monitor.done();
    }
  }
Example #2
0
  public void writePackageUnits(InternalCDOPackageUnit[] packageUnits, OMMonitor monitor) {
    monitor.begin(packageUnits.length);

    try {
      DB4OStore store = getStore();
      ObjectContainer objectContainer = getObjectContainer();

      for (InternalCDOPackageUnit packageUnit : packageUnits) {
        DB4OPackageUnit primitivePackageUnit =
            DB4OPackageUnit.getPrimitivePackageUnit(store, packageUnit);
        objectContainer.store(primitivePackageUnit);
        monitor.worked(1);
      }
    } catch (Exception ex) {
      OM.LOG.error(ex);
    } finally {
      monitor.done();
    }
  }