EventPropertyWriter[] writers = new EventPropertyWriter[len];
boolean[] notNullableField = new boolean[len];
for (int i = 0; i < assignments.size(); i++)
{
OnTriggerSetAssignment assignment = assignments.get(i);
String propertyName = assignment.getVariableName();
expressions[i] = assignment.getExpression().getExprEvaluator();
EventPropertyDescriptor writableProperty = eventTypeSPI.getWritableProperty(propertyName);
if (writableProperty == null)
{
int indexDot = propertyName.indexOf(".");
if ((namedWindowAlias != null) && (indexDot != -1)) {
String prefix = propertyName.substring(0, indexDot);
String name = propertyName.substring(indexDot + 1);
if (prefix.equals(namedWindowAlias)) {
writableProperty = eventTypeSPI.getWritableProperty(name);
propertyName = name;
}
}
if (writableProperty == null && indexDot != -1) {
String prefix = propertyName.substring(0, indexDot);
String name = propertyName.substring(indexDot + 1);
if (prefix.equals(namedWindowName)) {
writableProperty = eventTypeSPI.getWritableProperty(name);
propertyName = name;
}
}
if (writableProperty == null) {
throw new ExprValidationException("Property '" + propertyName + "' is not available for write access");
}
}
writers[i] = eventTypeSPI.getWriter(propertyName);
notNullableField[i] = writableProperty.getPropertyType().isPrimitive();
properties.add(propertyName);
wideners[i] = TypeWidenerFactory.getCheckPropertyAssignType(assignment.getExpression().toExpressionString(), assignment.getExpression().getExprEvaluator().getType(),
writableProperty.getPropertyType(), propertyName);
}
String[] propertyNames = properties.toArray(new String[properties.size()]);
// map expression index to property index