Package org.olat.core.commons.persistence

Examples of org.olat.core.commons.persistence.DB.deleteObject()


      // Original rating has been deleted in the meantime. Don't delete it again.
      return 0;
    }
    // Delete this rating and finish
    DB db = DBFactory.getInstance();
    db.deleteObject(rating);
    return 1;

  }

View Full Code Here


        reply.setParent(comment.getParent());
        db.updateObject(reply);
      }
    }
    // Now delete this comment and finish
    db.deleteObject(comment);
    return counter+1;
  }
 
  /**
   * @see org.olat.core.commons.services.commentAndRating.UserCommentsManager#deleteAllComments()
View Full Code Here

    // make sure the message is reloaded if it is not in the hibernate session
    // cache
    m = (Message) db.loadObject(m);
    // delete all properties of one single message
    deleteMessageProperties(forumKey, m);
    db.deleteObject(m);
   
    if(isLogDebugEnabled()){
      logDebug("Deleting message ", m.getKey().toString());
    }
  }
View Full Code Here

    final DB db = DBFactory.getInstance();
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Checklist.class, cl.getKey());
    CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerExecutor() {
        public void execute() {
          Checklist checklist = (Checklist) db.loadObject(cl);
          db.deleteObject(checklist);
        }
    });
  }

  /**
 
View Full Code Here

        .getKey() }, new Type[] { Hibernate.LONG });
    // 2) delete all policies
    db.delete("from org.olat.basesecurity.PolicyImpl as poi where poi.securityGroup = ?", new Object[] { secGroup.getKey() },
        new Type[] { Hibernate.LONG });
    // 3) delete security group
    db.deleteObject(secGroup);
  }

  /**
   * @see org.olat.basesecurity.Manager#addIdentityToSecurityGroup(org.olat.core.id.Identity, org.olat.basesecurity.SecurityGroup)
   */
 
View Full Code Here

    if (owner != null) secGroupsToBeDeleted.add(owner);
    // delete user bookmarks
    OLATResourceable ores = createOLATResouceableFor(ce);
    BookmarkManager.getInstance().deleteAllBookmarksFor(ores);
    // delete catalog entry itself
    db.deleteObject(ce);
  }

  /**
   * find all catalog entries referencing the supplied Repository Entry.
   *
 
View Full Code Here

  /**
   * @param subscriber
   */
  private void deleteSubscriber(Subscriber subscriber) {
    DB db = DBFactory.getInstance();
    db.deleteObject(subscriber);
  }

  /**
   * @param subscriber
   */
 
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.