Package org.activiti.engine.management

Examples of org.activiti.engine.management.TablePageQuery


      else {
        sort = null;
      }
    }

    TablePageQuery query = ActivitiUtil.getManagementService()
      .createTablePageQuery()
      .tableName(tableName);
    if (sort != null) {
      if (order.equals("asc")) {
        query.orderAsc(sort);
      }
      else {
        query.orderDesc(sort);
      }
    }

    TablePage tablePage = query.listPage(start, size);
   
    ObjectNode responseJSON = new ObjectMapper().createObjectNode();
    responseJSON.put("sort", sort);
    responseJSON.put("order", order);
    responseJSON.put("start", tablePage.getFirstResult());
View Full Code Here


      size = DEFAULT_RESULT_SIZE;
    }
   
    DataResponse response = new DataResponse();
   
    TablePageQuery tablePageQuery = managementService.createTablePageQuery().tableName(tableName);
   
    if (orderAsc != null) {
      tablePageQuery.orderAsc(orderAsc);
      response.setOrder("asc");
      response.setSort(orderAsc);
    }
   
    if (orderDesc != null) {
      tablePageQuery.orderDesc(orderDesc);
      response.setOrder("desc");
      response.setSort(orderDesc);
    }
   
    TablePage listPage = tablePageQuery.listPage(start, size);
    response.setSize(((Long) listPage.getSize()).intValue());
    response.setStart(((Long) listPage.getFirstResult()).intValue());
    response.setTotal(listPage.getTotal());
    response.setData(listPage.getRows());
   
View Full Code Here

    this.tableName = tableName;
    this.managementService = managementService;
  }
 
  public List<Item> loadItems(int start, int count) {
    TablePageQuery query = managementService.createTablePageQuery().tableName(tableName);
   
    if (sortPropertyIds != null && sortPropertyIds.length > 0) {
      for (int i=0; i<sortPropertyIds.length; i++) {
        String column = (String) sortPropertyIds[i]; // all container properties for table data are Strings
        if (sortPropertyIdsAscending[i] == true) {
          query.orderAsc(column);
        } else {
          query.orderDesc(column);
        }
      }
    }
   
    List<Map<String, Object>> rows = query.listPage(start, count).getRows();
    List<Item> items = new ArrayList<Item>();
    for (Map<String, Object> row : rows) {
     
      HashMap<String, Object> newRow = new HashMap<String, Object>();
      for( Entry<String,Object> rowEntry : row.entrySet() ) {
View Full Code Here

    this.tableName = tableName;
    this.managementService = managementService;
  }
 
  public List<Item> loadItems(int start, int count) {
    TablePageQuery query = managementService.createTablePageQuery().tableName(tableName);
   
    if (sortPropertyIds != null && sortPropertyIds.length > 0) {
      for (int i=0; i<sortPropertyIds.length; i++) {
        String column = (String) sortPropertyIds[i]; // all container properties for table data are Strings
        if (sortPropertyIdsAscending[i] == true) {
          query.orderAsc(column);
        } else {
          query.orderDesc(column);
        }
      }
    }
   
    List<Map<String, Object>> rows = query.listPage(start, count).getRows();
    List<Item> items = new ArrayList<Item>();
    for (Map<String, Object> row : rows) {
     
      HashMap<String, Object> newRow = new HashMap<String, Object>();
      for( Entry<String,Object> rowEntry : row.entrySet() ) {
View Full Code Here

TOP

Related Classes of org.activiti.engine.management.TablePageQuery

Copyright © 2018 www.massapicom. 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.