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. |
|