Interface CatalogItem<T extends ItemType>

Type Parameters:
T - The concrete type of this item, either a constraint or an index.
All Known Implementing Classes:
Constraint, Index

public sealed interface CatalogItem<T extends ItemType>
An item in the catalog (of either a single migration or the whole context with the merged catalog).
Since:
1.7.0
Author:
Michael J. Simons
Soundtrack
Anthrax - Spreading The Disease
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns A unique name for a catalog item.
    Returns Type information for the given item, specialized to the item type itself.
    boolean
    Returns true if this item has a generated name.
    default boolean
     
    default CatalogItem<T>
    Creates a copy of this item with the specific name.
  • Method Details

    • getName

      Name getName()
      Returns A unique name for a catalog item.
      Returns:
      A unique name for a catalog item
    • getType

      T getType()
      Returns Type information for the given item, specialized to the item type itself.
      Returns:
      Type information for the given item, specialized to the item type itself
    • isEquivalentTo

      default boolean isEquivalentTo(CatalogItem<?> that)
      Parameters:
      that - The other item to check
      Returns:
      true if this item is equivalent to that item
    • hasGeneratedName

      boolean hasGeneratedName()
      Returns true if this item has a generated name.
      Returns:
      true if this item has a generated name
    • withName

      default CatalogItem<T> withName(String name)
      Creates a copy of this item with the specific name. Will return this instance if the name has not changed.
      Parameters:
      name - The new name to use
      Returns:
      A (potentially) new item
      Since:
      1.13.0