Package com.google.code.lightssh.common.model.page

Examples of com.google.code.lightssh.common.model.page.OrderBy


  @SuppressWarnings({ "unchecked", "rawtypes" })
  protected ListPage<?> query(Query query, ListPage<?> page ){
    if( page == null )
      page = new ListPage();
   
    OrderBy orderBy = page.getOrderBy();
    if( orderBy != null ){
      if( ListPage.OrderType.DESCENDING.equals(orderBy.getType()) )
        query.desc();
      else
        query.asc();
    }
   
View Full Code Here


    if( page == null )
      page = new ListPage<Deployment>();
   
    DeploymentQuery query = repositoryService.createDeploymentQuery();
   
    OrderBy orderBy = page.getOrderBy();
    if( orderBy != null ){
      if( "id".equals(orderBy.getProperty()) )
        query.orderByDeploymentId();
      else if( "deploymentTime".equals(orderBy.getProperty()) )
        query.orderByDeploymenTime();
      else if( "name".equals(orderBy.getProperty()) )
        query.orderByDeploymentName();
    }
   
    return (ListPage<Deployment>)query(query,page);
  }
View Full Code Here

      page = new ListPage<ProcessDefinition>();
   
    ProcessDefinitionQuery query = repositoryService
      .createProcessDefinitionQuery().latestVersion();
   
    OrderBy orderBy = page.getOrderBy();
    if( orderBy != null ){
      if( "name".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionName();
      else if( "key".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionKey();
      else if( "id".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionId();
      else if( "category".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionCategory();
      else if( "version".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionVersion();
      else if( "deploymentId".equals(orderBy.getProperty()) )
        query.orderByDeploymentId();
    }
   
    return (ListPage<ProcessDefinition>)query(query,page);
  }
View Full Code Here

      page = new ListPage<ProcessInstance>();
   
    ProcessInstanceQuery query = runtimeService
      .createProcessInstanceQuery();
   
    OrderBy orderBy = page.getOrderBy();
    if( orderBy != null ){
      if( "businessKey".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionKey();
      else if( "processDefinitionId".equals(orderBy.getProperty()) )
        query.orderByProcessDefinitionId();
      else if( "processInstanceId".equals(orderBy.getProperty()) )
        query.orderByProcessInstanceId();
    }
   
    return (ListPage<ProcessInstance>)query(query,page);
  }
View Full Code Here

   
    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();
   
    query.finished(); //已完成任务
   
    OrderBy orderBy = page.getOrderBy();
    if( orderBy != null ){
      if( "endTime".equals(orderBy.getProperty()) )
        query.orderByHistoricTaskInstanceEndTime();
      else if( "startTime".equals(orderBy.getProperty()) )
        query.orderByHistoricTaskInstanceStartTime();
    }
   
    return (ListPage<HistoricTaskInstance>)query(query,page);
  }
View Full Code Here

TOP

Related Classes of com.google.code.lightssh.common.model.page.OrderBy

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.