"Converter is required when a complex type is changed " +
"to a simple type or enum type");
return false;
}
ComplexFormat newFormat = (ComplexFormat) newFormatParam;
Mutations mutations = evolver.getMutations();
boolean thisChanged = false;
boolean hierarchyChanged = false;
Map<String, String> allKeyNameMap = new HashMap<String, String>();
/* The Evolver has already ensured that entities evolve to entities. */
assert isEntity() == newFormat.isEntity();
assert isEntity() == (entityMeta != null);
assert newFormat.isEntity() == (newFormat.entityMeta != null);
/*
* Keep track of the old and new entity class names for use in deleting
* and renaming secondary keys below. If the oldEntityClass is
* non-null this also signifies an entity class or subclass. Note that
* getEntityFormat cannot be called on a newly created format during
* evolution because its super format property is not yet initialized.
* [#16253]
*/
String oldEntityClass;
String newEntityClass;
if (isEntity()) {
oldEntityClass = getClassName();
newEntityClass = newFormat.getClassName();
} else {
oldEntityClass = null;
newEntityClass = null;
}
/*
* Evolve all superclass formats, even when a deleted class appears in
* the hierarchy. This ensures that the super format's
* getLatestVersion/getComplexLatest method can be used accurately
* below.
*/
for (ComplexFormat oldSuper = getComplexSuper();
oldSuper != null;
oldSuper = oldSuper.getComplexSuper()) {
Converter converter = mutations.getConverter
(oldSuper.getClassName(), oldSuper.getVersion(), null);
if (converter != null) {
evolver.addMissingMutation
(this, newFormatParam,
"Converter is required for this subclass when a " +