Examples of loadObject()


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

        this.updateMessage(firstMessage, new ForumChangedEvent("split"));
        newTopMessage = firstMessage;
      }
      while (firstMessage != null && messageIterator.hasNext()) {
        Message message = messageIterator.next();
        message = (Message) db.loadObject(message);
        message.setThreadtop(firstMessage);
        this.updateMessage(message, null);
     
    }   
    return newTopMessage;
View Full Code Here

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

    List<Message> subThreadList = new ArrayList<Message>();
    this.getSubthread(msg, oldThreadList, subThreadList);
    // one has to set a new parent for all childs of the moved message
    // first message of sublist has to get the parent from the moved message
    for(Message childMessage : subThreadList) {
      childMessage = (Message)db.loadObject(childMessage);
      childMessage.setParent(msg.getParent());
      updateMessage(childMessage, null);
    }
    // now move the message to the choosen thread
    Message oldMessage = (Message)db.loadObject(msg);
View Full Code Here

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

      childMessage = (Message)db.loadObject(childMessage);
      childMessage.setParent(msg.getParent());
      updateMessage(childMessage, null);
    }
    // now move the message to the choosen thread
    Message oldMessage = (Message)db.loadObject(msg);
    Message message = createMessage();
    message.setCreator(oldMessage.getCreator());
    message.setForum(oldMessage.getForum());
    message.setModifier(oldMessage.getModifier());
    message.setTitle(oldMessage.getTitle());
View Full Code Here

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

  public void deleteChecklist(final Checklist cl) {
    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

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

    DB db = DBFactory.getInstance();
    //FIXME: fj: Please review: Create rep entry, restart olat, delete the rep
    // entry. previous implementation resulted in orange screen
    // secGroup = (SecurityGroup)db.loadObject(secGroup); // so we can later
    // delete it (hibernate needs an associated session)
    secGroup = (SecurityGroup) db.loadObject(secGroup);
    //o_clusterREVIEW
    //db.reputInHibernateSessionCache(secGroup);

    /*
     * if (!db.contains(secGroup)) { secGroup = (SecurityGroupImpl)
View Full Code Here

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

    // loop over users to be edited:
    for (Identity identity : selIdentities) {
      DB db = DBFactory.getInstance();
      //reload identity from cache, to prevent stale object
      identity = (Identity) db.loadObject(identity);
      User user = identity.getUser();
      String errorDesc = "";
      boolean updateError = false;
      // change pwd
      if (attributeChangeMap.containsKey(PWD_IDENTIFYER)) {
View Full Code Here

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

     
      // set status
      if (roleChangeMap.containsKey("Status")) {
        Integer status = Integer.parseInt(roleChangeMap.get("Status"));
        secMgr.saveIdentityStatus(identity, status);
        identity = (Identity) db.loadObject(identity);
      }

      // persist changes:
      if (updateError) {
        String errorOutput = identity.getName() + ": " + errorDesc;
View Full Code Here

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

    Iterator iter = children.iterator();
    while (iter.hasNext()) {
      CatalogEntry nextCe = (CatalogEntry) iter.next();
      deleteCatalogSubtree(nextCe,secGroupsToBeDeleted);
    }
    ce = (CatalogEntry) db.loadObject(ce);
    //mark owner group for deletion.
    SecurityGroup owner = ce.getOwnerGroup();
    if (owner != null) secGroupsToBeDeleted.add(owner);
    // delete user bookmarks
    OLATResourceable ores = createOLATResouceableFor(ce);
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.