Interface Catalog

All Known Subinterfaces:
VersionedCatalog
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Catalog
Represents a schema of
  • Constraints
  • Indizes
and probably other things in the future to come. The complete schema of a migration context will be made up of all schema entries found in the migrations discovered. schema entries of the same type and with the same id will all live up in the corresponding bucket so that for example a drop operation can refer to an older version of a constraint to be dropped, either explicitly or implicit.
Since:
1.7.0
Author:
Michael J. Simons
Soundtrack
Metallica - Ride The Lightning
  • Method Details

    • of

      static Catalog of(Document document)
      Creates a catalog based on a document following the schema of /ac/simons/neo4j/migrations/core/migration.xsd.
      Parameters:
      document - A document containing a catalog element and / or one or more nested catalog item elements.
      Returns:
      A new catalog, containing all items that can be extracted from the document
    • of

      static Catalog of(Collection<CatalogItem<?>> items)
      Creates a catalog based on the given collection.
      Parameters:
      items - A collection of items
      Returns:
      A new catalog
    • empty

      static Catalog empty()
      Returns:
      an empty catalog
    • getItems

      Collection<CatalogItem<?>> getItems()
      Returns:
      the list of all items in this catalog
    • containsEquivalentItem

      default boolean containsEquivalentItem(CatalogItem<?> other)
      Helper method to check weather this catalog contains an equivalent item
      Parameters:
      other - The item for which an equivalent is search
      Returns:
      True if an equivalent item exists
    • isEmpty

      default boolean isEmpty()
      Returns:
      true if this catalog is empty.