continue;
}
List<FilterValueSetParam> addendumFilters = new ArrayList<FilterValueSetParam>(foundPartition.getPropertyNames().size());
if (foundPartition.getPropertyNames().size() == 1) {
FilterValueSetParam filter = new FilterValueSetParamImpl(foundPartition.getPropertyNames().get(0), FilterOperator.EQUAL, keyValue);
addendumFilters.add(filter);
}
else {
Object[] keys = ((MultiKeyUntyped) keyValue).getKeys();
for (int i = 0; i < foundPartition.getPropertyNames().size(); i++) {
String partitionPropertyName = foundPartition.getPropertyNames().get(i);
FilterValueSetParam filter = new FilterValueSetParamImpl(partitionPropertyName, FilterOperator.EQUAL, keys[i]);
addendumFilters.add(filter);
}
}
// add those predefined filter parameters, if any
addendumFilters.addAll(foundPartition.getParametersCompiled());
addendums.put(filtersSpec, addendumFilters);
}
}
// handle segmented context for create-window
else {
String declaredAsName = statementDesc.getStatement().getStatementSpec().getCreateWindowDesc().getAsEventTypeName();
if (declaredAsName != null) {
for (FilterSpecCompiled filtersSpec : filtersSpecs) {
ContextDetailPartitionItem foundPartition = null;
for (ContextDetailPartitionItem partitionItem : segmentedSpec.getItems()) {
if (partitionItem.getFilterSpecCompiled().getFilterForEventType().getName().equals(declaredAsName)) {
foundPartition = partitionItem;
break;
}
}
if (foundPartition == null) {
continue;
}
List<FilterValueSetParam> addendumFilters = new ArrayList<FilterValueSetParam>(foundPartition.getPropertyNames().size());
for (String partitionPropertyName : foundPartition.getPropertyNames()) {
FilterValueSetParam filter = new FilterValueSetParamImpl(partitionPropertyName, FilterOperator.EQUAL, keyValue);
addendumFilters.add(filter);
}
addendums.put(filtersSpec, addendumFilters);
}