Examples of singleResult()


Examples of com.axemblr.provisionr.amazon.core.ImageTableQuery.singleResult()

                query.filterBy("type", "ebs");
            } else {
                query.filterBy("type", DEFAULT_TYPE);
            }

            return query.singleResult();
        }
}
View Full Code Here

Examples of com.founder.fix.fixflow.core.model.ProcessDefinitionQuery.singleResult()

  public void testProcessDefinitionQuery() {
    //创建一个查询
    ProcessDefinitionQuery processDefinitionQuery=modelService.createProcessDefinitionQuery();
    //因为方法上面的声明会自动发布流程,所以此刻可以查到这个流程信息
    processDefinitionQuery.processDefinitionKey("Process_TaskServiceTest");
    ProcessDefinitionBehavior processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查到此流程发布的信息
    assertNotNull(processDefinitionBehavior);
  }

  /**
 
View Full Code Here

Examples of com.founder.fix.fixflow.core.runtime.ProcessInstanceQuery.singleResult()

    //创建流程实例查询
    ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery();
    //查询刚才暂停的流程实例
    processInstanceQuery.processInstanceId(processInstanceId);
    //获取流程实例
    processInstance = processInstanceQuery.singleResult();
    //验证流程实例已经暂停
    assertTrue(processInstance.isSuspended());
   
    //恢复流程实例
    runtimeService.continueProcessInstance(processInstanceId);
View Full Code Here

Examples of com.founder.fix.fixflow.core.task.TaskQuery.singleResult()

    TaskQuery taskQuery = taskService.createTaskQuery();
   
    taskQuery.taskAssignee("testAddExternalTask_admin");
    taskQuery.addTaskType(TaskInstanceType.OTHERBPMTASK);

    TaskInstance taskInstanceReturn = taskQuery.singleResult();

    assertNotNull(taskInstanceReturn);

  }
View Full Code Here

Examples of com.mysema.query.jpa.JPQLQuery.singleResult()

    public void Substring2() {
        QCompany company = QCompany.company;
        StringExpression name = company.name;
        Integer companyId = query().from(company).singleResult(company.id);
        JPQLQuery query = query().from(company).where(company.id.eq(companyId));
        String str = query.singleResult(company.name);

        assertEquals(Integer.valueOf(29),
                query.singleResult(name.length().subtract(11)));

        assertEquals(str.substring(0, 7),
View Full Code Here

Examples of com.mysema.query.jpa.impl.JPAQuery.singleResult()

   
    query.from(qFollowedArtifact)
      .where(qFollowedArtifact.user.eq(user))
      .where(qFollowedArtifact.artifact.eq(artifact));
   
    return query.singleResult(qFollowedArtifact);
  }
 
  @Override
  public List<User> listByUserGroup(UserGroup userGroup) {
    JPAQuery query = new JPAQuery(getEntityManager());
View Full Code Here

Examples of org.activiti.engine.history.HistoricProcessInstanceQuery.singleResult()

    String processInstanceId = runtimeService.startProcessInstanceByKey("oneTaskProcess").getId();
    runtimeService.deleteProcessInstance(processInstanceId, null);

    HistoricProcessInstanceQuery processInstanceQuery = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId);
    assertEquals(1, processInstanceQuery.count());
    HistoricProcessInstance processInstance = processInstanceQuery.singleResult();
    assertEquals(processInstanceId, processInstance.getId());
    assertEquals("ACTIVITI_DELETED", processInstance.getDeleteReason());

    processInstanceQuery = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).deleted();
    assertEquals(1, processInstanceQuery.count());
View Full Code Here

Examples of org.activiti.engine.history.HistoricTaskInstanceQuery.singleResult()

      }
    } else {
      taskQuery.includeTaskLocalVariables().includeProcessVariables();
    }
   
    HistoricTaskInstance taskObject = taskQuery.singleResult();
   
    if (taskObject == null) {
      throw new ActivitiObjectNotFoundException("Historic task instance '" + taskId + "' couldn't be found.", HistoricTaskInstanceEntity.class);
    }
   
View Full Code Here

Examples of org.activiti.engine.identity.UserQuery.singleResult()

 
  public void testQueryByFirstName() {
    UserQuery query = identityService.createUserQuery().userFirstName("Gonzo");
    verifyQueryResults(query, 1);
   
    User result = query.singleResult();
    assertEquals("gonzo", result.getId());
  }
 
  public void testQueryByInvalidFirstName() {
    UserQuery query = identityService.createUserQuery().userFirstName("invalid");
View Full Code Here

Examples of org.activiti.engine.impl.EventSubscriptionQueryImpl.singleResult()

    assertNotNull(execution);
   
    processEngineConfiguration.getClock().setCurrentTime(new Date(processEngineConfiguration.getClock().getCurrentTime().getTime() + 10000));
    try {
    
      EventSubscriptionEntity messageEventSubscription = messageEventSubscriptionQuery.singleResult();
      runtimeService.messageEventReceived(messageEventSubscription.getEventName(), messageEventSubscription.getExecutionId());
     
      assertEquals(0, createEventSubscriptionQuery().count());   
      assertEquals(1, runtimeService.createProcessInstanceQuery().count());   
      assertEquals(0, managementService.createJobQuery().count());
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.