org.wso2.siddhi.query.api.execution.query.Query.getAnnotations()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中org.wso2.siddhi.query.api.execution.query.Query.getAnnotations方法的一些代码示例,展示了Query.getAnnotations的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getAnnotations方法的具体详情如下:
包路径:org.wso2.siddhi.query.api.execution.query.Query
类名称:Query
方法名:getAnnotations

Query.getAnnotations介绍

暂无

代码示例

代码示例来源:origin: wso2/siddhi

public SiddhiApp addQuery(Query query) {
  if (query == null) {
    throw new SiddhiAppValidationException("Query should not be null");
  }
  String name = null;
  Element element = AnnotationHelper.getAnnotationElement(SiddhiConstants.ANNOTATION_INFO, SiddhiConstants
      .ANNOTATION_ELEMENT_NAME, query.getAnnotations());
  if (element != null) {
    name = element.getValue();
  }
  if (name != null && executionElementNameList.contains(name)) {
    throw new SiddhiAppValidationException(
        "Cannot add Query as another Execution Element already uses " + "its name=" + name,
        element.getQueryContextStartIndex(), element.getQueryContextEndIndex());
  }
  executionElementNameList.add(name);
  this.executionElementList.add(query);
  return this;
}

代码示例来源:origin: wso2/siddhi

public Partition addQuery(Query query) {
  if (query == null) {
    throw new SiddhiAppValidationException("Query should not be null");
  }
  String name = null;
  Element element = AnnotationHelper.getAnnotationElement(SiddhiConstants.ANNOTATION_INFO, SiddhiConstants
      .ANNOTATION_ELEMENT_NAME, query.getAnnotations());
  if (element != null) {
    name = element.getValue();
  }
  if (name != null && queryNameList.contains(name)) {
    throw new SiddhiAppValidationException("Cannot add Query as another Execution Element already uses " +
        "its name=" + name + " within the same Partition",
        element.getQueryContextStartIndex(), element.getQueryContextEndIndex());
  }
  queryNameList.add(name);
  this.queryList.add(query);
  return this;
}

代码示例来源:origin: org.wso2.siddhi/siddhi-query-api

public Partition addQuery(Query query) {
  if (query == null) {
    throw new SiddhiAppValidationException("Query should not be null");
  }
  String name = null;
  Element element = AnnotationHelper.getAnnotationElement(SiddhiConstants.ANNOTATION_INFO, SiddhiConstants
      .ANNOTATION_ELEMENT_NAME, query.getAnnotations());
  if (element != null) {
    name = element.getValue();
  }
  if (name != null && queryNameList.contains(name)) {
    throw new SiddhiAppValidationException("Cannot add Query as another Execution Element already uses " +
        "its name=" + name + " within the same Partition",
        element.getQueryContextStartIndex(), element.getQueryContextEndIndex());
  }
  queryNameList.add(name);
  this.queryList.add(query);
  return this;
}

代码示例来源:origin: org.wso2.siddhi/siddhi-query-api

public SiddhiApp addQuery(Query query) {
  if (query == null) {
    throw new SiddhiAppValidationException("Query should not be null");
  }
  String name = null;
  Element element = AnnotationHelper.getAnnotationElement(SiddhiConstants.ANNOTATION_INFO, SiddhiConstants
      .ANNOTATION_ELEMENT_NAME, query.getAnnotations());
  if (element != null) {
    name = element.getValue();
  }
  if (name != null && executionElementNameList.contains(name)) {
    throw new SiddhiAppValidationException(
        "Cannot add Query as another Execution Element already uses " + "its name=" + name,
        element.getQueryContextStartIndex(), element.getQueryContextEndIndex());
  }
  executionElementNameList.add(name);
  this.executionElementList.add(query);
  return this;
}

代码示例来源:origin: org.wso2.carbon.event-processing/org.wso2.carbon.event.processor.core

for (Annotation annotation : query.getAnnotations()) {
  if (annotation.getName().equals(EventProcessorConstants.DIST)) {
    throw new StormQueryConstructionException("Error in deploying query: " + queryString + ". Query level" +

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.siddhi.editor.core

/**
 * Generates a QueryConfig object with the given Siddhi Query object
 * @param query                 Siddhi Query object
 * @return                      QueryConfig object
 */
public QueryConfig generateQueryConfig(Query query)
    throws DesignGenerationException {
  QueryConfig queryConfig = new QueryConfig();
  queryConfig.setQueryInput(generateInput(query.getInputStream()));
  Selector selector = query.getSelector();
  queryConfig.setSelect(generateSelect(selector));
  queryConfig.setGroupBy(generateGroupBy(selector.getGroupByList()));
  queryConfig.setOrderBy(generateOrderBy(selector.getOrderByList()));
  queryConfig.setHaving(generateHaving(selector.getHavingExpression()));
  queryConfig.setLimit(generateLimit(selector.getLimit()));
  queryConfig.setQueryOutput(generateOutput(query.getOutputStream()));
  queryConfig.setOutputRateLimit(generateOutputRateLimit(query.getOutputRate()));
  queryConfig.setAnnotationList(generateAnnotationList(query.getAnnotations()));
  queryConfig.setQueryName(generateQueryName(query.getAnnotations()));
  preserveAndBindCodeSegment(query, queryConfig);
  return queryConfig;
}

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.sp.jobmanager.core

query.getAnnotations()) != null) {
throw new SiddhiAppValidationException("Unsupported:@dist annotation inside partition queries");

相关文章