NativeModelQueryImpl.java 1.2 KB
Newer Older
1 2
package org.activiti5.engine.impl;

3 4 5
import java.util.List;
import java.util.Map;

6 7 8 9 10 11 12
import org.activiti5.engine.impl.interceptor.CommandContext;
import org.activiti5.engine.impl.interceptor.CommandExecutor;
import org.activiti5.engine.repository.Model;
import org.activiti5.engine.repository.NativeModelQuery;

public class NativeModelQueryImpl extends AbstractNativeQuery<NativeModelQuery, Model> implements NativeModelQuery {

13
  private static final long serialVersionUID = 1L;
14
  
15 16 17
  public NativeModelQueryImpl(CommandContext commandContext) {
    super(commandContext);
  }
T
Tijs Rademakers 已提交
18

19 20 21
  public NativeModelQueryImpl(CommandExecutor commandExecutor) {
    super(commandExecutor);
  }
T
Tijs Rademakers 已提交
22

23 24
 //results ////////////////////////////////////////////////////////////////
  
25
  public List<Model> executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) {
26 27 28
    return commandContext
      .getModelEntityManager()
      .findModelsByNativeQuery(parameterMap, firstResult, maxResults);
29
  }
30
  
31
  public long executeCount(CommandContext commandContext, Map<String, Object> parameterMap) {
32 33 34
    return commandContext
      .getModelEntityManager()
      .findModelCountByNativeQuery(parameterMap);
35
  }
36 37

}