Examples of ModelQuery


Examples of com.jengine.orm.model.query.ModelQuery

    public Object avg(String field) throws DBException {
        return new ModelQuery(manager).target(new Avg(field)).one();
    }

    public Object sum(String field) throws DBException {
        return new ModelQuery(manager).target(new Sum(field)).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

    public Object sum(String field) throws DBException {
        return new ModelQuery(manager).target(new Sum(field)).one();
    }

    public Long count(Field field) throws DBException {
        return (Long) new ModelQuery(manager).target(new Count(field)).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

    public Long count(Field field) throws DBException {
        return (Long) new ModelQuery(manager).target(new Count(field)).one();
    }

    public <ResultType> ResultType max(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Max(field)).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

    public <ResultType> ResultType max(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Max(field)).one();
    }

    public <ResultType> ResultType min(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Min(field)).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

    public <ResultType> ResultType min(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Min(field)).one();
    }

    public <ResultType> ResultType avg(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Avg(field)).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

    public <ResultType> ResultType avg(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Avg(field)).one();
    }

    public <ResultType> ResultType sum(Field field) throws DBException {
        return (ResultType) new ModelQuery(manager).target(new Sum(field)).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

    public <ResultType> ResultType calc(String name, Class type, String expr, Field ... fields) throws DBException {
        List<String> fieldNames = new ArrayList<String>();
        for (Field field : fields) {
            fieldNames.add(field.getFieldName());
        }
        return (ResultType) new ModelQuery(manager).target(new CalcMultiField(name, type, null, expr, fieldNames, map())).one();
    }
View Full Code Here

Examples of com.jengine.orm.model.query.ModelQuery

        }
        return (ResultType) new ModelQuery(manager).target(new CalcMultiField(name, type, null, expr, fieldNames, map())).one();
    }

    public void remove() throws DBException {
        new ModelQuery(manager).remove();
        clearCache();
    }
View Full Code Here

Examples of org.activiti.engine.repository.ModelQuery

    allowedSortProperties.put("tenantId", ModelQueryProperty.MODEL_TENANT_ID);
  }
 
  @RequestMapping(value="/repository/models", method = RequestMethod.GET, produces = "application/json")
  public DataResponse getModels(@RequestParam Map<String,String> allRequestParams, HttpServletRequest request) {
    ModelQuery modelQuery = repositoryService.createModelQuery();
   
    if (allRequestParams.containsKey("id")) {
      modelQuery.modelId(allRequestParams.get("id"));
    }
    if (allRequestParams.containsKey("category")) {
      modelQuery.modelCategory(allRequestParams.get("category"));
    }
    if (allRequestParams.containsKey("categoryLike")) {
      modelQuery.modelCategoryLike(allRequestParams.get("categoryLike"));
    }
    if (allRequestParams.containsKey("categoryNotEquals")) {
      modelQuery.modelCategoryNotEquals(allRequestParams.get("categoryNotEquals"));
    }
    if (allRequestParams.containsKey("name")) {
      modelQuery.modelName(allRequestParams.get("name"));
    }
    if (allRequestParams.containsKey("nameLike")) {
      modelQuery.modelNameLike(allRequestParams.get("nameLike"));
    }
    if (allRequestParams.containsKey("key")) {
      modelQuery.modelKey(allRequestParams.get("key"));
    }
    if (allRequestParams.containsKey("version")) {
      modelQuery.modelVersion(Integer.valueOf(allRequestParams.get("version")));
    }
    if (allRequestParams.containsKey("latestVersion")) {
      boolean isLatestVersion = Boolean.valueOf(allRequestParams.get("latestVersion"));
      if (isLatestVersion) {
        modelQuery.latestVersion();
      }
    }
    if (allRequestParams.containsKey("deploymentId")) {
      modelQuery.deploymentId(allRequestParams.get("deploymentId"));
    }
    if (allRequestParams.containsKey("deployed")) {
      boolean isDeployed = Boolean.valueOf(allRequestParams.get("deployed"));
      if (isDeployed) {
        modelQuery.deployed();
      } else {
        modelQuery.notDeployed();
      }
    }
    if (allRequestParams.containsKey("tenantId")) {
      modelQuery.modelTenantId(allRequestParams.get("tenantId"));
    }
    if (allRequestParams.containsKey("tenantIdLike")) {
      modelQuery.modelTenantIdLike(allRequestParams.get("tenantIdLike"));
    }
    if (allRequestParams.containsKey("withoutTenantId")) {
      boolean withoutTenantId = Boolean.valueOf(allRequestParams.get("withoutTenantId"));
      if (withoutTenantId) {
        modelQuery.modelWithoutTenantId();
      }
    }
    return new ModelsPaginateList(restResponseFactory, request.getRequestURL().toString().replace("/repository/models", ""))
        .paginateList(allRequestParams, modelQuery, "id", allowedSortProperties);
  }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery

   */
  protected CMElementDeclaration getDeclaration() {
    Document document = getOwnerDocument();
    if (document == null)
      return null;
    ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
    if (modelQuery == null)
      return null;
    return modelQuery.getCMElementDeclaration(this);
  }
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.