Lines Matching refs:oldFormat
99 private void setFormatsChanged(Format oldFormat) {
100 checkClassChangesAllowed(oldFormat);
101 changedFormats.put(oldFormat, oldFormat);
109 private void checkClassChangesAllowed(Format oldFormat) {
113 "but were made to: " + oldFormat.getClassName());
161 void addEvolveError(Format oldFormat,
165 checkClassChangesAllowed(oldFormat);
170 getClassVersionLabel(oldFormat, "") +
178 void addInvalidMutation(Format oldFormat,
182 checkClassChangesAllowed(oldFormat);
184 getClassVersionLabel(oldFormat, " For") +
192 void addMissingMutation(Format oldFormat,
195 checkClassChangesAllowed(oldFormat);
197 getClassVersionLabel(oldFormat, "") +
205 void addNonEntityFormat(Format oldFormat) {
206 unprocessedFormats.add(oldFormat);
219 for (Format oldFormat : unprocessedFormats) {
220 oldFormat.setUnused(true);
221 Integer oldFormatId = oldFormat.getId();
224 boolean result = evolveFormatInternal(oldFormat);
234 boolean evolveFormat(Format oldFormat) {
237 oldFormat.getLatestVersion().getEntityFormat() != null;
242 Integer oldFormatId = oldFormat.getId();
247 result = evolveFormatInternal(oldFormat);
250 if (oldFormat.getLatestVersion().isNew()) {
255 Format latest = oldFormat.getLatestVersion().getEntityFormat();
270 private boolean evolveFormatInternal(Format oldFormat) {
273 if (Format.isPredefined(oldFormat) || oldFormat.isDeleted()) {
278 String oldName = oldFormat.getClassName();
279 int oldVersion = oldFormat.getVersion();
286 (oldFormat, null, deleter,
298 if (oldFormat.isArray()) {
303 (oldFormat, null, mutation,
307 Format compFormat = oldFormat.getComponentType();
329 assert newFormat != oldFormat : newFormat.getClassName();
350 if (oldFormat != oldFormat.getLatestVersion() &&
353 Format oldLatestFormat = oldFormat.getLatestVersion();
373 newFormat == oldFormat.getLatestVersion()) {
380 if (!applyRenamer(renamer, oldFormat, newFormat)) {
387 if (oldFormat.isEntity()) {
390 (oldFormat, newFormat, deleter,
396 if (!oldFormat.evolveMetadata(newFormat, converter, this)) {
400 return applyConverter(converter, oldFormat, newFormat);
406 (newFormat.isEntity() != oldFormat.isEntity());
410 (oldFormat, newFormat, deleter,
415 return applyDeleter(deleter, oldFormat, newFormat);
422 (oldFormat, newFormat, newFormatException);
425 (oldFormat, newFormat,
437 return oldFormat.evolve(newFormat, this);
444 void useOldFormat(Format oldFormat, Format newFormat) {
445 Format renamedFormat = renameFormats.get(oldFormat);
454 useEvolvedFormat(oldFormat, renamedFormat, renamedFormat);
456 oldFormat.getVersion() != newFormat.getVersion()) {
458 useEvolvedFormat(oldFormat, newFormat, newFormat);
461 catalog.useExistingFormat(oldFormat);
472 void useEvolvedFormat(Format oldFormat,
475 oldFormat.setReader(evolveReader);
477 oldFormat.setLatestVersion(newFormat);
479 setFormatsChanged(oldFormat);
483 Format oldFormat,
485 if (!checkUpdatedVersion(renamer, oldFormat, newFormat)) {
488 if (oldFormat.isEntity() && oldFormat.isCurrentVersion()) {
490 String oldClassName = oldFormat.getClassName();
496 oldFormat.getEntityMetadata().getSecondaryKeys().values()) {
508 renameFormats.put(oldFormat, newFormat);
510 setFormatsChanged(oldFormat);
517 void renameSecondaryDatabase(Format oldFormat,
523 (storePrefix, oldFormat.getClassName(), oldKeyName),
529 Format oldFormat,
531 if (!checkUpdatedVersion(deleter, oldFormat, newFormat)) {
534 if (oldFormat.isEntity() && oldFormat.isCurrentVersion()) {
536 String className = oldFormat.getClassName();
539 oldFormat.getEntityMetadata().getSecondaryKeys().values()) {
549 oldFormat.setDeleted(true);
551 oldFormat.setLatestVersion(newFormat);
554 setFormatsChanged(oldFormat);
561 void deleteSecondaryDatabase(Format oldFormat, String keyName) {
563 (storePrefix, oldFormat.getClassName(), keyName));
567 Format oldFormat,
569 if (!checkUpdatedVersion(converter, oldFormat, newFormat)) {
573 useEvolvedFormat(oldFormat, reader, newFormat);
582 Format oldFormat,
585 !oldFormat.isEnum() &&
586 newFormat.getVersion() <= oldFormat.getVersion()) {
588 (oldFormat, newFormat, mutation,
597 Format oldFormat,
600 !oldFormat.isEnum() &&
601 newFormat.getVersion() <= oldFormat.getVersion()) {
603 (oldFormat, newFormat, scenario,