class: DBDataAdmin

public class: DBDataAdmin
Author:
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 6.12.2005 2:20:22; Modified: 6.12.2005 17:35:53;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {0F89A9E0-95DE-41dd-B587-43E22ADBDF9E}
Class: contain methods form data source connection and retreiving handle to prepared table in DB.

 

Goto: Fields, Methods

See also: ColumnInfo, Versions, DatabaseInfos, DatabaseInfos, ConvertDBType, Errors, AllTransforms, Table, Session, Version, TableInstance, DataSrc, Versions, MBAForm, NewVersionForm, NewDllForm, NewDBConnectionForm, ModuleDefinition, MainForm, KohonenNetwork, SetColumnsDialog, SOMForm

Appears in: Database interface, Method administration

Connections
 
DBDataAdmin Attributes
Attribute Details
private DatabaseInfos
  database
Notes: Contain informations about defined database connections and database properties

private ArrayList
  myConnections
Notes: Array with all open connections

private Versions
  vers
Notes: All versions in program

private OdbcConnection
  workConnection
Notes: Work connection for manipulate with basic tables.

private LogErrors
  log
Notes: Loging structure, using this create log file.

private ConvertDBType
  convertDBType
Notes: contain all conversion from/to simple/db type

private bool
  failed
Notes: State of this object

private SessionInfo
  sesInfo
Notes: Current information about session

private AllTransforms
  allTransforms
Notes: Container for all transformations and related information

private string
  xmlMethods
Notes: File with Method definition

private string
  xmlSimpleTypes
Notes: File with Simple types definition

private string
  xmlConvertTypes
Notes: File with Conversions between database and simple types

private string
  xmlConnections
Notes: File with definition of database connections.

 
DBDataAdmin Methods
Operation Details
public
DBDataAdmin():
Notes: Default constructor. Set all file names, read configuration about data type conversions, connections and create work tables.
private
CreateWorkTables():void
Notes: Create application tables (prefixed wrk_) using work database connection.
public
LoadConnections():bool
Notes: Load information about database connection from previous defined XML file.

@returns true if succeed
public
connect(
   int idDatabase):OdbcConnection
Notes: Connect to database using specified database connection and add this connection into "pool"

@returns object if succeed, null otherwise
public
disconnect(
   OdbcConnection odbcConn):bool
Notes: Disconnect from the connected DB and remove connection from the "pool".

@returns
private
OpenSession():void
Notes: Load all versions from session defined in SessionInfo structure.
public
NewSession():bool
Notes: Create new session (contains no version) and create new structure SessionInfo

@returns true if succeed
public
SelectFromSavedSession():bool
Notes: Open Dialog with all sessions. User choose one from all existing version. When session exists than connect to it. When session doesn't exist (user doesn't choose any), create new.

@returns true on success
public
CloseSession():bool
Notes: Close current session. User is asked to save it.

@returns true on success
public
CopyTable(
   Table tableFrom):Table
Notes: Create a copy of table in work database.

@returns New table in work database or null if create fail
public
view_data2(
   DataSrc dsrc,
   DataGrid dataGrid):void
Notes: Load data from data src into DataGrid object
public
IsOK():bool
<<property>>
Notes: True if object is valid
public
SessionInfo():SessionInfo
<<property>>
Notes: Information about current session
public
Vers():Versions
<<property>>
Notes: Contains all versions of current session.
public
FillUpComboWithTableName(
   ComboBox comboBox):bool
Notes: Auxiliary method. Fill combobox with table names of all database connections.

@returns
public
ConvertDBType():ConvertDBType
<<property>>
Notes: Object with convert information between simple and database types
public
Database():DatabaseInfos
<<property>>
Notes: Object with definitions all database connections.
public
IdTmpDatabase():int
<<property>>
Notes: Work database ID
public
GetSequence(
   Table table):int
Notes: Get next sequence ID for specific table.

@returns new sequence for specific table
public
GetSequence(
   string table):int
Notes: Next sequence ID for specific table

@returns new sequence for specific table
public
Log():LogErrors
<<property>>
Notes: Application Log.
public
dispose():void
Notes: Dispose all items
public
AllTransformation():AllTransforms
<<property>>
Notes: All transformations from XML definition file