Example usage for org.apache.ibatis.session RowBounds RowBounds

List of usage examples for org.apache.ibatis.session RowBounds RowBounds

Introduction

In this page you can find the example usage for org.apache.ibatis.session RowBounds RowBounds.

Prototype

public RowBounds(int offset, int limit) 

Source Link

Usage

From source file:org.openlmis.report.service.SupplyStatusReportDataProvider.java

License:Open Source License

@Override
public List<? extends ReportData> getReportBody(Map<String, String[]> filterCriteria,
        Map<String, String[]> sortCriteria, int page, int pageSize) {
    RowBounds rowBounds = new RowBounds((page - 1) * pageSize, pageSize);
    return reportMapper.getSupplyStatus(getParam(filterCriteria), rowBounds, this.getUserId());
}

From source file:org.openlmis.report.service.TimelinessReportDataProvider.java

License:Open Source License

@Override
protected List<? extends ReportData> getResultSet(Map<String, String[]> filterCriteria) {
    RowBounds rowBounds = new RowBounds(RowBounds.NO_ROW_OFFSET, RowBounds.NO_ROW_LIMIT);
    return reportMapper.getTimelinessData(filterCriteria, rowBounds, this.getUserId());
}

From source file:org.openlmis.report.service.TimelinessReportDataProvider.java

License:Open Source License

@Override
@Transactional/* w w  w. j a va  2s . com*/
public List<? extends ReportData> getReportBody(Map<String, String[]> filterCriteria,
        Map<String, String[]> sortCriteria, int page, int pageSize) {
    RowBounds rowBounds = new RowBounds((page - 1) * pageSize, pageSize);
    return reportMapper.getTimelinessData(filterCriteria, rowBounds, this.getUserId());
}

From source file:org.openlmis.report.service.UnscheduledReportingReportDataProvider.java

License:Open Source License

@Override
protected List<? extends ReportData> getResultSet(Map<String, String[]> filterCriteria) {
    RowBounds rowBounds = new RowBounds(RowBounds.NO_ROW_OFFSET, RowBounds.NO_ROW_LIMIT);
    return reportMapper.getFilteredSortedUnscheduledReportingReport(filterCriteria, rowBounds,
            this.getUserId());
}

From source file:org.openlmis.report.service.UnscheduledReportingReportDataProvider.java

License:Open Source License

@Override
@Transactional//from  w ww . ja v a 2 s.com
public List<? extends ReportData> getReportBody(Map<String, String[]> filterCriteria,
        Map<String, String[]> sortCriteria, int page, int pageSize) {
    RowBounds rowBounds = new RowBounds((page - 1) * pageSize, pageSize);
    return reportMapper.getFilteredSortedUnscheduledReportingReport(filterCriteria, rowBounds,
            this.getUserId());
}

From source file:org.openlmis.report.service.UserSummaryReportProvider.java

License:Open Source License

@Override
protected List<? extends ReportData> getResultSet(Map<String, String[]> filterCriteria) {
    RowBounds rowBounds = new RowBounds(RowBounds.NO_ROW_OFFSET, RowBounds.NO_ROW_LIMIT);

    return reportMapper.getReport(getReportFilterData(filterCriteria), null, rowBounds);
}

From source file:org.sonar.core.permission.PermissionDao.java

License:Open Source License

/**
 * @return a paginated list of users./*w  w  w . j a  va2  s  . co m*/
 */
public List<UserWithPermissionDto> selectUsers(PermissionQuery query, @Nullable Long componentId, int offset,
        int limit) {
    SqlSession session = myBatis.openSession(false);
    try {
        Map<String, Object> params = newHashMap();
        params.put(QUERY_PARAMETER, query);
        params.put(COMPONENT_ID_PARAMETER, componentId);
        return session.selectList("org.sonar.core.permission.PermissionMapper.selectUsers", params,
                new RowBounds(offset, limit));
    } finally {
        MyBatis.closeQuietly(session);
    }
}

From source file:org.sonar.core.permission.PermissionTemplateDao.java

License:Open Source License

/**
 * @return a paginated list of users./*from w  w w  .j ava  2  s . c  o  m*/
 */
public List<UserWithPermissionDto> selectUsers(PermissionQuery query, Long templateId, int offset, int limit) {
    SqlSession session = myBatis.openSession(false);
    try {
        Map<String, Object> params = newHashMap();
        params.put(QUERY_PARAMETER, query);
        params.put(TEMPLATE_ID_PARAMETER, templateId);
        return session.selectList("org.sonar.core.permission.PermissionTemplateMapper.selectUsers", params,
                new RowBounds(offset, limit));
    } finally {
        MyBatis.closeQuietly(session);
    }
}

From source file:org.sonar.core.qualitygate.db.ProjectQgateAssociationDao.java

License:Open Source License

public List<ProjectQgateAssociationDto> selectProjects(ProjectQgateAssociationQuery query, Long gateId,
        int offset, int limit) {
    SqlSession session = mybatis.openSession(false);
    try {//from ww  w .  ja v  a2s . c o m
        Map<String, Object> params = ImmutableMap.of("query", query, "gateId", gateId.toString());
        return session.selectList("org.sonar.core.qualitygate.db.ProjectQgateAssociationMapper.selectProjects",
                params, new RowBounds(offset, limit));
    } finally {
        MyBatis.closeQuietly(session);
    }
}

From source file:org.sonar.core.user.GroupMembershipDao.java

License:Open Source License

public List<GroupMembershipDto> selectGroups(GroupMembershipQuery query, Long userId, int offset, int limit) {
    SqlSession session = mybatis.openSession(false);
    try {/*from   ww w.j av a2  s. c o  m*/
        Map<String, Object> params = ImmutableMap.of("query", query, "userId", userId);
        return session.selectList("org.sonar.core.user.GroupMembershipMapper.selectGroups", params,
                new RowBounds(offset, limit));
    } finally {
        MyBatis.closeQuietly(session);
    }
}