Class ModelVersionChange.UpdateAliases

java.lang.Object
org.apache.gravitino.model.ModelVersionChange.UpdateAliases
All Implemented Interfaces:
ModelVersionChange
Enclosing interface:
ModelVersionChange

public static final class ModelVersionChange.UpdateAliases extends Object implements ModelVersionChange
Represents an update to a model version’s aliases, specifying which aliases to add and which to remove.

Both alias sets are stored as immutable.

  • Constructor Details

    • UpdateAliases

      public UpdateAliases(List<String> aliasesToAdd, List<String> aliasesToRemove)
      Constructs a new aliases-update operation, specifying the aliases to add and remove.
      Parameters:
      aliasesToAdd - the aliases to add, or null for none
      aliasesToRemove - the aliases to remove, or null for none
  • Method Details

    • aliasesToAdd

      public Set<String> aliasesToAdd()
      Returns the set of aliases to add.
      Returns:
      an immutable, sorted set of aliases to add
    • aliasesToRemove

      public Set<String> aliasesToRemove()
      Returns the set of aliases to remove.
      Returns:
      an immutable, sorted set of aliases to remove
    • equals

      public boolean equals(Object o)
      Compares this UpdateAlias instance with another object for equality. The comparison is based on the both new and removed aliases of the model version.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare with this instance.
      Returns:
      true if the given object represents the same model update operation; false otherwise.
    • hashCode

      public int hashCode()
      Generates a hash code for this UpdateAlias instance. The hash code is based on the both new and removed aliases of the model.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this model renaming operation.
    • toString

      public String toString()
      Provides a string representation of the UpdateAlias instance. This string format includes the class name followed by the new and removed aliases to be set and removed.
      Overrides:
      toString in class Object
      Returns:
      A string summary of the UpdateAlias instance.