public U executeSingleResult(CommandContext commandContext) { List<U> results = evaluateExpressionsAndExecuteList(commandContext, null); if (results.size() == 1) { return results.get(0); } else if (results.size() > 1) { throw new ProcessEngineException("Query return "+results.size()+" results instead of max 1"); } return null; }
public U executeSingleResult(CommandContext commandContext) { List<U> results = evaluateExpressionsAndExecuteList(commandContext, null); if (results.size() == 1) { return results.get(0); } else if (results.size() > 1) { throw new ProcessEngineException("Query return "+results.size()+" results instead of max 1"); } return null; }
public Object execute(CommandContext commandContext) { if (resultType==ResultType.LIST) { return evaluateExpressionsAndExecuteList(commandContext, null); } else if (resultType==ResultType.SINGLE_RESULT) { return executeSingleResult(commandContext); } else if (resultType==ResultType.LIST_PAGE) { return evaluateExpressionsAndExecuteList(commandContext, null); } else if (resultType == ResultType.LIST_IDS) { return evaluateExpressionsAndExecuteIdsList(commandContext); } else { return evaluateExpressionsAndExecuteCount(commandContext); } }
public Object execute(CommandContext commandContext) { if (resultType==ResultType.LIST) { return evaluateExpressionsAndExecuteList(commandContext, null); } else if (resultType==ResultType.SINGLE_RESULT) { return executeSingleResult(commandContext); } else if (resultType==ResultType.LIST_PAGE) { return evaluateExpressionsAndExecuteList(commandContext, null); } else if (resultType == ResultType.LIST_IDS) { return evaluateExpressionsAndExecuteIdsList(commandContext); } else { return evaluateExpressionsAndExecuteCount(commandContext); } }
@SuppressWarnings("unchecked") public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), null); }
@SuppressWarnings("unchecked") public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), null); }
@SuppressWarnings("unchecked") public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), new Page(firstResult, maxResults)); }
@SuppressWarnings("unchecked") public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), new Page(firstResult, maxResults)); }
public U executeSingleResult(CommandContext commandContext) { List<U> results = evaluateExpressionsAndExecuteList(commandContext, null); if (results.size() == 1) { return results.get(0); } else if (results.size() > 1) { throw new ProcessEngineException("Query return "+results.size()+" results instead of max 1"); } return null; }
public Object execute(CommandContext commandContext) { if (resultType==ResultType.LIST) { return evaluateExpressionsAndExecuteList(commandContext, null); } else if (resultType==ResultType.SINGLE_RESULT) { return executeSingleResult(commandContext); } else if (resultType==ResultType.LIST_PAGE) { return evaluateExpressionsAndExecuteList(commandContext, null); } else if (resultType == ResultType.LIST_IDS) { return evaluateExpressionsAndExecuteIdsList(commandContext); } else { return evaluateExpressionsAndExecuteCount(commandContext); } }
@SuppressWarnings("unchecked") public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), null); }
@SuppressWarnings("unchecked") public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), new Page(firstResult, maxResults)); }