All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.activiti.engine.impl.NativeProcessInstanceQueryImpl Maven / Gradle / Ivy

The newest version!
package org.activiti.engine.impl;

import java.util.List;
import java.util.Map;

import org.activiti.engine.impl.interceptor.CommandContext;
import org.activiti.engine.impl.interceptor.CommandExecutor;
import org.activiti.engine.runtime.NativeProcessInstanceQuery;
import org.activiti.engine.runtime.ProcessInstance;

public class NativeProcessInstanceQueryImpl extends AbstractNativeQuery implements NativeProcessInstanceQuery {

  private static final long serialVersionUID = 1L;

  public NativeProcessInstanceQueryImpl(CommandContext commandContext) {
    super(commandContext);
  }

  public NativeProcessInstanceQueryImpl(CommandExecutor commandExecutor) {
    super(commandExecutor);
  }

  // results ////////////////////////////////////////////////////////////////

  public List executeList(CommandContext commandContext, Map parameterMap, int firstResult, int maxResults) {
    return commandContext.getExecutionEntityManager().findProcessInstanceByNativeQuery(parameterMap, firstResult, maxResults);
  }

  public long executeCount(CommandContext commandContext, Map parameterMap) {
    return commandContext.getExecutionEntityManager()
    // can use execution count, since the result type doesn't matter
        .findExecutionCountByNativeQuery(parameterMap);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy