Package ac.simons.neo4j.migrations.core
Interface JavaBasedMigration
- All Superinterfaces:
Migration
Interface to be implemented for Java-based migrations.
- Since:
- 0.0.1
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends JavaBasedMigration>
Constructor<T> Helper method for retrieving the default constructor of a given class.Returns An optional description of this migration.default String
Returns something that describes the source of this migration.default MigrationVersion
Returns the version.default boolean
Return true to mark this Java based migration explicitly as repeatable.Methods inherited from interface ac.simons.neo4j.migrations.core.Migration
apply, getChecksum
-
Method Details
-
getVersion
Description copied from interface:Migration
Returns the version.- Specified by:
getVersion
in interfaceMigration
- Returns:
- the version
-
getOptionalDescription
Description copied from interface:Migration
Returns An optional description of this migration.- Specified by:
getOptionalDescription
in interfaceMigration
- Returns:
- An optional description of this migration
-
getSource
Description copied from interface:Migration
Returns something that describes the source of this migration. -
isRepeatable
default boolean isRepeatable()Return true to mark this Java based migration explicitly as repeatable. By default, a Java based migration will be repeatable when it's name matches the repeatable version pattern Rxzy__Something_something.java, it will always be repeated as the default checksum is empty.You can take full control over this by overwriting this method and in addition,
Migration.getChecksum()
and react in that according to your needs.- Specified by:
isRepeatable
in interfaceMigration
- Returns:
- true if this is a repeatable migration
- Since:
- 2.0.0
-
getDefaultConstructorFor
static <T extends JavaBasedMigration> Constructor<T> getDefaultConstructorFor(Class<T> c) throws NoSuchMethodException Helper method for retrieving the default constructor of a given class. When such a constructor exist, it will be made accessible.- Type Parameters:
T
- The type of the class- Parameters:
c
- The class whose constructor should be returned- Returns:
- The default constructor
- Throws:
NoSuchMethodException
- If there is no such default constructor- Since:
- 1.13.0
-