Package io.ebean.migration.runner
Class LocalMigrationResource
- java.lang.Object
-
- io.ebean.migration.runner.LocalMigrationResource
-
- All Implemented Interfaces:
Comparable<LocalMigrationResource>
- Direct Known Subclasses:
LocalDdlMigrationResource,LocalJdbcMigrationResource
public abstract class LocalMigrationResource extends Object implements Comparable<LocalMigrationResource>
A DB migration resource (DDL or Jdbc)
-
-
Constructor Summary
Constructors Constructor Description LocalMigrationResource(MigrationVersion version, String location)Construct with version and resource.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(LocalMigrationResource o)Default ordering by version.StringgetComment()Return the migration comment.abstract StringgetContent()Return the content of the migration.StringgetLocation()Return the resource location.StringgetType()Return the type code ("R" or "V") for this migration.MigrationVersiongetVersion()Return the underlying migration version.booleanisRepeatable()Return true if the underlying version is "repeatable".booleanisRepeatableInit()Return true if the underlying version is "repeatable init".booleanisRepeatableLast()Return true if the underlying version is "repeatable last".Stringkey()Return the "key" that identifies the migration.voidsetInitType()Set the migration to be an Init migration.StringtoString()
-
-
-
Constructor Detail
-
LocalMigrationResource
public LocalMigrationResource(MigrationVersion version, String location)
Construct with version and resource.
-
-
Method Detail
-
isRepeatable
public boolean isRepeatable()
Return true if the underlying version is "repeatable".
-
isRepeatableInit
public boolean isRepeatableInit()
Return true if the underlying version is "repeatable init".
-
isRepeatableLast
public boolean isRepeatableLast()
Return true if the underlying version is "repeatable last".
-
getComment
public String getComment()
Return the migration comment.
-
compareTo
public int compareTo(LocalMigrationResource o)
Default ordering by version.- Specified by:
compareToin interfaceComparable<LocalMigrationResource>
-
getVersion
public MigrationVersion getVersion()
Return the underlying migration version.
-
getLocation
public String getLocation()
Return the resource location.
-
getContent
public abstract String getContent()
Return the content of the migration.
-
setInitType
public void setInitType()
Set the migration to be an Init migration.
-
-