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 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 TypeMethodDescriptiongetName()
getType()
boolean
default boolean
isEquivalentTo
(CatalogItem<?> that) 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.
-
getType
T getType()- Returns:
- Type information for the given item, specialized to the item type itself.
-
isEquivalentTo
- 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.
-
withName
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
-