All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mongock.api.config.LegacyMigration Maven / Gradle / Ivy

There is a newer version: 5.5.0
Show newest version
package io.mongock.api.config;

import io.changock.migration.api.annotations.NonLockGuarded;
import io.changock.migration.api.annotations.NonLockGuardedType;

@NonLockGuarded(NonLockGuardedType.NONE)
public class LegacyMigration {

  private String origin;

  private boolean failFast = true;

  private Integer changesCountExpectation = null;

  private LegacyMigrationMappingFields mappingFields = new LegacyMigrationMappingFields();

  private boolean runAlways = false;

  private boolean repair = false;


  public LegacyMigration() {
  }

  public LegacyMigration(String origin) {
    setOrigin(origin);
  }


  public LegacyMigrationMappingFields getMappingFields() {
    return mappingFields;
  }

  public void setMappingFields(LegacyMigrationMappingFields mappingFields) {
    this.mappingFields = mappingFields;
  }

  public Integer getChangesCountExpectation() {
    return changesCountExpectation;
  }

  public void setChangesCountExpectation(Integer changesCountExpectation) {
    this.changesCountExpectation = changesCountExpectation;
  }

  public boolean isRunAlways() {
    return runAlways;
  }

  public void setRunAlways(boolean runAlways) {
    this.runAlways = runAlways;
  }

  public String getOrigin() {
    return origin;
  }

  public void setOrigin(String origin) {
    this.origin = origin;
  }

  public boolean isFailFast() {
    return failFast;
  }

  public void setFailFast(boolean failFast) {
    this.failFast = failFast;
  }



  public boolean isRepair() {
    return repair;
  }

  public void setRepair(boolean repair) {
    this.repair = repair;
  }

  //TODO remove this legacy methods

  /**
   * @see LegacyMigration#setOrigin(String)
   */
  @Deprecated
  public String getCollectionName() {
    return origin;
  }

  /**
   * @see LegacyMigration#getOrigin()
   */
  @Deprecated
  public void setCollectionName(String collectionName) {
    this.origin = collectionName;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy