class: Version

public class: Version
Author:
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 6.12.2005 14:48:31; Modified: 6.12.2005 14:55:10;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {CB06751D-C427-45a0-9DB0-5F8400A46106}
 

Goto: Fields, Methods

See also: DBDataAdmin, ColumnsInfo, TableInstance, Versions, ProcessCSVFile

Appears in: Versions

Connections
 
Version Attributes
Attribute Details
private int
  ver_id
Notes: Identification of this version

private Version
  verPrev
Notes: poiter to version derived from

private string
  description
Notes: description - is shown in dialogs

private ArrayList
  tableCopy
Notes: list of table instances

private ArrayList
  derivedVers
Notes: list derived versions

private DBDataAdmin
  dbAdmin
Notes: powerfull class :)

private int
  methodId
Notes: Id method. -1 if not exists. Else ID method that creates this version.

private int
  versionFId
Notes: fake primary key

private ColumnsInfo
  colsVerInfo
Notes: ColumnsInfo about base table of this version

private bool
  failed
Notes: Validity of this object

private int
  dataLength
Notes: Length of configuration. This configuration is saved as text in DB.

 
Version Methods
Operation Details
public
Version(
   DBDataAdmin dbAdmin,
   int versionFId):
Notes: For recovery from database.
public
Version(
   int newVerId,
   Table tableFrom,
   Table tableTo,
   string versionName,
   DBDataAdmin dbAdmin,
   Version prevVer):
Notes: Create version from existing table. It is usually used for creating table with no tmp_ prefix.
public
Version(
   int newVerId,
   Version verFrom,
   Table table,
   int methodId,
   string data,
   string versionName,
   DBDataAdmin dbAdmin):
Notes: Vesion is create from existing version. Ussaly is call from external method.
public
Version(
   int newVerId,
   string fileName,
   string versionName,
   DBDataAdmin dbAdmin):
Notes: Create version from file in CSV format. Table is created in work database.

@param ="nothing" additional parametr - is not used
public
GetTableInstance(
   bool readOnly):DataSrc
Notes: Get instance of selected version. Not read only is not implemented yet.

@returns instance DataSrc to access data or null if something failed
public
GetTableInstanceEx():DataSrcEx
Notes: Get instance of selected version.

@returns DataSrcEx object or null if failed
public
VerID():int
<<property>>
Notes: Version Id
public
DerivedVersions():ArrayList
<<property>>
Notes: Derived version
public
Description():string
<<property>>
Notes: Description
public
Dispose():void
Notes: Dispose all objects
private
AddVersionDB():int
Notes: Add record with information about version into db

@param ="sessionId" specific session Id
@returns new primary key of record
private
AddDataDB(
   string data):void
Notes: Add data to database.
public
GetData():string
Notes: Get data associated with this version

@returns data as string
public
HasData():bool
<<property>>
Notes: If version has data
public
AddTableInstance(
   TableInstance ti):void
Notes: Add table instance into list of copies this version
public
RemoveTableInstance(
   TableInstance ti):void
Notes: Remove table instance from list of copies this version
public
HasNoParent():bool
<<property>>
Notes: True if has no parent version
public
ParentVersion():Version
<<property>>
Notes: Parent version
public
Creator():OneTransform
<<property>>
Notes: Which method create this version
private
GetFirstDerivedVers():Version
Notes: Return one (first) Version from derivedVersion list

@returns Version
public
RemoveVersionFromDerivedVersionList(
   Version ver):void
Notes: Remove version from derived version list
public
Drop():void
Notes: Drop whole version.
public
ColumnsInfoVer():ColumnsInfo
<<property>>
Notes: Columns info about all columns
public
IsOk():bool
<<property>>
Notes: Validity of this object