Data Versioning. Design-Time Features

IVersionSupport Domain Component  declares following members

Properties:

  • VersionId – specifies a unique identifier of the business object with version control
  • VersionIsArchive – specifies the outdated version flag
  • VersionIsDeleted – specifies the deleted version flag
  • VersionActualFrom – specifies the start of period of actuality of the version.
  • VersionActualTo – specifies the end of period of actuality of the version.
  • VersionChange – specifies the type of operation, which has been applied to the version.
  • VersionUser – specifies a name of user who created the version.
  • VersionComment – specifies comments to the version.

Methods:

  • SaveAsNewVersion() – creates a new version of the business object.
  • GetLatestVersion() – returns the last version of the business object.
  • GetSpecificVersion() – returns the version of the business object that was actual at the specified date and time.
  • Delete() – marks the business object as deleted.
  • GetHistory() – returns the list of versions of the business object.
  • InitNewVersionData() – initializes a new version of the business object.

For convinient and effective work with Data Versioning, Xafari platform supplies a special tool: Xafari.BC.Versioning.VersionHelper<TBusinessObject>. It implements the basic methods, for working with versioning business objects. It's methods are listed bellow:

  • SaveAsNewVersion – creates a new version for the specified business object
  • GetLatestVersion – returns the latest version of the specified business object
  • GetSpecificVersion – returns specific version of the business object
  • GetHistory – returns the list of versions of the business object
  • GetCurrentVersion - returns the current version of the specified business object; the value of global property Current Date is used
  • GetHistoryCriteria – returns the criterion for getting history of versions of the business object
  • GetLatestVersionCriteria – returns the criterion for getting the latest version of the business object
  • GetCurrentVersionCriteria – returns the criterion for getting the current version of the business object
  • GetSpecificVersionCriteria – returns the criterion for getting specific version of the business object

EnabledCurrentDateSelector property is added to the IModelListView and IModelDetailView interfaces of the Application Model. If the value of the property is true, then an action for setting the current date for operations with versions is available in the View.