Package org.olat.core.commons.persistence

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


      return null;
    }
    // Update DB entry
    rating.setRating(newRatingValue);
    DB db = DBFactory.getInstance();
    db.updateObject(rating);
    return rating;
  }

  /**
   * Helper method to check if the given commerating has the same resource and
View Full Code Here


      return null;
    }
    // Update DB entry
    comment.setComment(newCommentText);
    DB db = DBFactory.getInstance();
    db.updateObject(comment);
    return comment;
  }

  /**
   * @see org.olat.core.commons.services.commentAndRating.UserCommentsManager#deleteComment(org.olat.core.commons.services.commentAndRating.model.UserComment, boolean)
View Full Code Here

    } else {
      // To not delete the replies we have to set the parent to the parent
      // of the original comment for each reply
      for (UserComment reply : replies) {
        reply.setParent(comment.getParent());
        db.updateObject(reply);
      }
    }
    // Now delete this comment and finish
    db.deleteObject(comment);
    return counter+1;
View Full Code Here

    s3.setLastLogin(c1.getTime());
    c1.add(Calendar.DAY_OF_YEAR, -100);
    testAdmin.setLastLogin(c1.getTime());
 
    DB db = DBFactory.getInstance();
    db.updateObject(s1);
    db.updateObject(s2);
    db.updateObject(s3);
    db.updateObject(testAdmin);
    db.closeSession();
   
View Full Code Here

    c1.add(Calendar.DAY_OF_YEAR, -100);
    testAdmin.setLastLogin(c1.getTime());
 
    DB db = DBFactory.getInstance();
    db.updateObject(s1);
    db.updateObject(s2);
    db.updateObject(s3);
    db.updateObject(testAdmin);
    db.closeSession();
   
    Calendar c2 = Calendar.getInstance();   
View Full Code Here

    testAdmin.setLastLogin(c1.getTime());
 
    DB db = DBFactory.getInstance();
    db.updateObject(s1);
    db.updateObject(s2);
    db.updateObject(s3);
    db.updateObject(testAdmin);
    db.closeSession();
   
    Calendar c2 = Calendar.getInstance();   
    //daily:
View Full Code Here

 
    DB db = DBFactory.getInstance();
    db.updateObject(s1);
    db.updateObject(s2);
    db.updateObject(s3);
    db.updateObject(testAdmin);
    db.closeSession();
   
    Calendar c2 = Calendar.getInstance();   
    //daily:
    assertEquals(0, sm.countUniqueUserLoginsSince(new Date()).intValue());
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.