Package ac.simons.neo4j.migrations.core
Interface VersionedCatalog
- All Superinterfaces:
Catalog
An extended catalog keeping track of items as defined by
catalog based migrations
and their
version
.- Since:
- 1.7.0
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptiondefault Catalog
getCatalogAt
(MigrationVersion version) Creates a view on this catalog at the definition ofversion
.default Catalog
getCatalogPriorTo
(MigrationVersion version) Creates a view on this catalog prior to the definition ofversion
.Optional<CatalogItem<?>>
getItem
(Name name, MigrationVersion version) A single item for a given version.Optional<CatalogItem<?>>
getItemPriorTo
(Name name, MigrationVersion version) A single item prior to a given version.getItems
(MigrationVersion version) A list of all items up to and including a given version.getItemsPriorTo
(MigrationVersion version) A list of all items prior to a given version.Methods inherited from interface ac.simons.neo4j.migrations.core.catalog.Catalog
containsEquivalentItem, getItems, isEmpty
-
Method Details
-
getCatalogPriorTo
Creates a view on this catalog prior to the definition ofversion
.- Parameters:
version
- The version up to but not including to retrieve items for- Returns:
- A subset of this catalog
-
getCatalogAt
Creates a view on this catalog at the definition ofversion
.- Parameters:
version
- The version up to and including to retrieve the items- Returns:
- A subset of this catalog
-
getItemsPriorTo
A list of all items prior to a given version.- Parameters:
version
- The version up to but not including to retrieve items for- Returns:
- a list of all items prior to the introduction of version.
-
getItemPriorTo
A single item prior to a given version. The result will be empty if the item has not yet been defined.- Parameters:
name
- The id of the item to retrieveversion
- The version up to but not including to retrieve the constraint for- Returns:
- an optional item as defined prior to the introduction of version
-
getItems
A list of all items up to and including a given version.- Parameters:
version
- The version up to retrieve constraints for- Returns:
- a list of all items up to the introduction of version.
-
getItem
A single item for a given version. The result will be empty if the item has not yet been defined.- Parameters:
name
- The id of the item to retrieveversion
- The version in which to retrieve the constraint for- Returns:
- an optional item as defined with to the introduction of version
-