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; }
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; }
public SiddhiApp addPartition(Partition partition) { if (partition == null) { throw new SiddhiAppValidationException("Partition should not be null"); } String name = null; Element element = AnnotationHelper.getAnnotationElement(SiddhiConstants.ANNOTATION_INFO, SiddhiConstants .ANNOTATION_ELEMENT_NAME, partition.getAnnotations()); if (element != null) { name = element.getValue(); } if (name != null && executionElementNameList.contains(name)) { throw new SiddhiAppValidationException( "Cannot add Partition as another Execution Element already " + "uses its name=" + name, element.getQueryContextStartIndex(), element.getQueryContextEndIndex()); } executionElementNameList.add(name); this.executionElementList.add(partition); return this; }
throw new DuplicateAnnotationException("Annotation element @" + annotationName + "(...) " + "is defined twice", aElement.getQueryContextStartIndex(), aElement.getQueryContextEndIndex()); throw new DuplicateAnnotationException("Annotation element @" + annotationName + "(" + elementName + "=...) is defined twice", aElement.getQueryContextStartIndex(), aElement.getQueryContextEndIndex());
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; }
public SiddhiApp addPartition(Partition partition) { if (partition == null) { throw new SiddhiAppValidationException("Partition should not be null"); } String name = null; Element element = AnnotationHelper.getAnnotationElement(SiddhiConstants.ANNOTATION_INFO, SiddhiConstants .ANNOTATION_ELEMENT_NAME, partition.getAnnotations()); if (element != null) { name = element.getValue(); } if (name != null && executionElementNameList.contains(name)) { throw new SiddhiAppValidationException( "Cannot add Partition as another Execution Element already " + "uses its name=" + name, element.getQueryContextStartIndex(), element.getQueryContextEndIndex()); } executionElementNameList.add(name); this.executionElementList.add(partition); return this; }
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; }
throw new DuplicateAnnotationException("Annotation element @" + annotationName + "(...) " + "is defined twice", aElement.getQueryContextStartIndex(), aElement.getQueryContextEndIndex()); throw new DuplicateAnnotationException("Annotation element @" + annotationName + "(" + elementName + "=...) is defined twice", aElement.getQueryContextStartIndex(), aElement.getQueryContextEndIndex());