update(schema, 0, null, def);
}
done = true;
}
for (Integer seriesNr : schema.getDeletedSeriesDefinitions()) {
SeriesDefinition ss = schema.getSeriesDefinition(seriesNr, true);
policy.willDelete(schema, ss);
deleteSeriesInSchema(schema, ss.getNumber());
done = true;
}
for (SeriesDefinition ss : schema.getEditedSeriesDefinitions()) {
int seriesNr = ss.getNumber();
if (schema.getSeriesDefinition(seriesNr, false) == null) {
createSchemaComponents(schema, ss, schema.getEditedAttributeDefinitions(seriesNr));
done = true;
} else {
for (Integer attribNr : schema.getDeletedAttributeDefinitions(seriesNr)) {
policy.willDelete(schema, ss, ss.getAttributeDefinition(attribNr, true));
deleteAttributeInSchema(schema, seriesNr, attribNr);
done = true;
}
for (AttributeDefinition<?> def : schema.getEditedAttributeDefinitions(seriesNr)) {
int attribNr = def.getNumber();
String description = attribNr == DatabaseBackend.MAGIC_NAME_NR ? ss.getDescription() : null;
if (ss.getAttributeDefinition(attribNr, false) == null) {
create(schema, seriesNr, description, def);
} else {
policy.willUpdate(schema, ss, def);
update(schema, seriesNr, description, def);
}