Package org.olat.core.commons.persistence

Examples of org.olat.core.commons.persistence.DBQuery.list()


    DBQuery dbq = db.createQuery(query.toString());
    ICourse course = CourseFactory.loadCourse(ores);
    dbq.setLong("resid", course.getResourceableId().longValue());
    dbq.setString("resname", course.getResourceableTypeName());

    List res = dbq.list();
    return res;
  }

}
View Full Code Here


      " and sgmsi.identity = :identity and v.access >= :limitAccess";
   
    DBQuery dbquery = DBFactory.getInstance().createQuery(query);
    dbquery.setEntity("identity", identity);
    dbquery.setInteger("limitAccess", limitAccess);
    return dbquery.list();   
  }
 
  /**
   * check ownership of identiy for a resource
   * @return true if the identity is member of the security group of the repository entry
View Full Code Here

      dbQuery.setString("desc", desc);
    }
    if (var_resourcetypes) {
      dbQuery.setParameterList("resourcetypes", resourceTypes, Hibernate.STRING);
    }
    return dbQuery.list();
  }
 
  /**
   * Query repository
   *
 
View Full Code Here

        dbQuery.setString("desc", desc);
      }
      if (var_resourcetypes) {
        dbQuery.setParameterList("resourcetypes", resourceTypes, Hibernate.STRING);
      }
      List result = dbQuery.list();
      result.addAll(runGenericANDQueryWithRolesRestriction(displayName, author, desc, resourceTypes, roles));
      return result;
    } else {
      return runGenericANDQueryWithRolesRestriction(displayName, author, desc, resourceTypes, roles);
    }
View Full Code Here

  public StatisticResult generateStatisticResult(UserRequest ureq, ICourse course, long courseRepositoryEntryKey) {
    DBQuery dbQuery = DBFactory.getInstance().createQuery("select businessPath,homeOrg,value from org.olat.course.statistic.homeorg.HomeOrgStat sv "
        + "where sv.resId=:resId");
    dbQuery.setLong("resId", courseRepositoryEntryKey);

    return new StatisticResult(course, dbQuery.list());
  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
View Full Code Here

  public StatisticResult generateStatisticResult(UserRequest ureq, ICourse course, long courseRepositoryEntryKey) {
    DBQuery dbQuery = DBFactory.getInstance().createQuery("select businessPath,day,value from org.olat.course.statistic.daily.DailyStat sv "
        + "where sv.resId=:resId");
    dbQuery.setLong("resId", courseRepositoryEntryKey);

    return new StatisticResult(course, dbQuery.list());
  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
View Full Code Here

    }
    if (toDate!=null) {
      dbQuery.setDate("toDate", toDate);
    }
   
    StatisticResult statisticResult = new StatisticResult(course, dbQuery.list());
    fillGapsInColumnHeaders(statisticResult);
    return statisticResult;
  }

  /** fill any gaps in the column headers between the first and the last days **/
 
View Full Code Here

  public StatisticResult generateStatisticResult(UserRequest ureq, ICourse course, long courseRepositoryEntryKey) {
    DBQuery dbQuery = DBFactory.getInstance().createQuery("select businessPath,studyBranch3,value from org.olat.course.statistic.studybranch3.StudyBranch3Stat sv "
        + "where sv.resId=:resId");
    dbQuery.setLong("resId", courseRepositoryEntryKey);

    return new StatisticResult(course, dbQuery.list());
  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
View Full Code Here

  public StatisticResult generateStatisticResult(UserRequest ureq, ICourse course, long courseRepositoryEntryKey) {
    DBQuery dbQuery = DBFactory.getInstance().createQuery("select businessPath,hour,value from org.olat.course.statistic.hourofday.HourOfDayStat sv "
        + "where sv.resId=:resId");
    dbQuery.setLong("resId", courseRepositoryEntryKey);

    StatisticResult statisticResult = new StatisticResult(course, dbQuery.list());
    List<String> columnHeaders = statisticResult.getColumnHeaders();
    if (columnHeaders!=null && columnHeaders.size()>1) {
      try{
        int start = Integer.parseInt(columnHeaders.get(0));
        int end = Integer.parseInt(columnHeaders.get(columnHeaders.size()-1));
View Full Code Here

      " where msg.forum.key = :forumKey and msg.lastModified > :latestRead order by msg.lastModified desc";
    DBQuery dbquery = DBFactory.getInstance().createQuery(query);
    dbquery.setLong("forumKey", forumKey.longValue());
    dbquery.setTimestamp("latestRead", latestRead);
    dbquery.setCacheable(true);
    return dbquery.list();
  }

  /**
   * @return the newly created and persisted forum
   */
 
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.