Class SqlVersion
- java.lang.Object
-
- org.ametys.core.migration.version.AbstractVersion
-
- org.ametys.core.migration.version.impl.SqlVersion
-
- All Implemented Interfaces:
Version
public class SqlVersion extends AbstractVersion
SQL implementation of a version, contains also information about the datasource where the version will be stored
-
-
Field Summary
Fields Modifier and Type Field Description private String
_databaseType
private String
_datasourceId
-
Constructor Summary
Constructors Modifier Constructor Description 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 datasourceprotected
SqlVersion(ActionData actionData)
Create a version from the data of anActionData
and its associated version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
copyFromActionData(ActionData actionData)
Copy theVersion
object but only specific fields and componentIdString
getDatabaseType()
Get the database typeString
getDatasourceId()
Get the datasource idString
toString()
Build a readable log for this Version-
Methods inherited from class org.ametys.core.migration.version.AbstractVersion
addAdditionalValue, getAdditionalValues, getComment, getComponentId, getExecutionInstant, getVersionHandlerId, getVersionNumber, setComment, setExecutionInstant, setVersionNumber
-
-
-
-
Field Detail
-
_datasourceId
private String _datasourceId
-
_databaseType
private String _databaseType
-
-
Constructor Detail
-
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
protected SqlVersion(ActionData actionData)
Create a version from the data of anActionData
and its associated version.- Parameters:
actionData
- The action data
-
-
Method Detail
-
toString
public String toString()
Description copied from class:AbstractVersion
Build a readable log for this Version- Overrides:
toString
in classAbstractVersion
- Returns:
- a readable log
-
getDatasourceId
public String getDatasourceId()
Get the datasource id- Returns:
- The datasource id
-
getDatabaseType
public String getDatabaseType()
Get the database type- Returns:
- The database type
-
copyFromActionData
public Version copyFromActionData(ActionData actionData)
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
-
-