usecase: Create version

public usecase: Create version
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 7.12.2005 1:58:03; Modified: 11.12.2005 3:39:11;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {94B56171-78B4-4928-835B-D6088C41D3ED}

Goto: Scenarios

See also: Program

Appears in: UC Version and using data

Create version Scenarios
Scenario Type Detail
Version for open session Alternate Program create version using Versions.Version... method.

- VersionFromFile - for import from CSV file
- VersionFromTable - for import from existing table
- VersionFromTableToTable - for import from existing table to table with program specify properties (name, database connection, ...)
- VersionFromVersion - from add derived version

All of previous methods do same additional things and checks and call Version constructor. This constructor is usually different for each Method VersionFrom... .

All Version constructor initialize member variables, create temporary table, copy source data into temporary table, initalize table instance object and all information save into database.
All constructors are differenet in way, how to copy data. Other things are almost equal for all Version constructors.

Version for VersionFromFile
- source data: use class ProcessCSVFile that help with separe column value in CSV file.

Version for VersionFromTable
- new temporary table is created and data are copied from source table

Version for VersionFromTableToTable
- no temporary table is created. Copy data into tableTo only.

Version for VersionFromVersion
- as Version for VersionFromTable
- save additional information about configuration (for later use)

Version for open session
- almost all information about version are in database

Version object has IsOK property. If this property is false then something in create object failed and object is not valid. In this case, method Versions.VersionFrom.... do not insert new version and return new version Id = -1. In other case, version is add to container with this objects.