Class SqlVersion
java.lang.Object
org.ametys.core.migration.version.AbstractVersion
org.ametys.core.migration.version.impl.SqlVersion
- All Implemented Interfaces:
Version
SQL implementation of a version, contains also information about the datasource where the version will be stored
-
Constructor Summary
ModifierConstructorDescriptionSqlVersion
(String versionHandlerId, String componentId, String versionNumber, Instant executionInstant, String comment, String datasourceId, String databaseType) Create a Version, with all standard informations, plus informations about the datasourceprotected
SqlVersion
(ActionData actionData) Create a version from the data of anActionData
and its associated version. -
Method Summary
Modifier and TypeMethodDescriptioncopyFromActionData
(ActionData actionData) Copy theVersion
object but only specific fields and componentIdGet the database typeGet the datasource idtoString()
Build a readable log for this VersionMethods inherited from class org.ametys.core.migration.version.AbstractVersion
addAdditionalValue, getAdditionalValues, getComment, getComponentId, getExecutionInstant, getVersionHandlerId, getVersionNumber, setComment, setExecutionInstant, setVersionNumber
-
Constructor Details
-
SqlVersion
public SqlVersion(String versionHandlerId, String componentId, String versionNumber, Instant executionInstant, String comment, String datasourceId, String databaseType) Create a Version, with all standard informations, plus informations about the datasource- Parameters:
versionHandlerId
- id of theVersionHandler
componentId
- id of the componentversionNumber
- version number of the upgrade that created this versionexecutionInstant
- time of the application of this versioncomment
- comment stored about this versiondatasourceId
- datasource iddatabaseType
- database type
-
SqlVersion
Create a version from the data of anActionData
and its associated version.- Parameters:
actionData
- The action data
-
-
Method Details
-
toString
Description copied from class:AbstractVersion
Build a readable log for this Version- Overrides:
toString
in classAbstractVersion
- Returns:
- a readable log
-
getDatasourceId
Get the datasource id- Returns:
- The datasource id
-
getDatabaseType
Get the database type- Returns:
- The database type
-
copyFromActionData
Description copied from interface:Version
Copy theVersion
object but only specific fields and componentId- Parameters:
actionData
- The action data which inside there is the version to copy and the data to keep- Returns:
- A copy of the
Version
object
-