QCommenceConnectionDef Class Reference

Commence Connection Definition. More...

#include <QCommenceDB.h>

Inheritance diagram for QCommenceConnectionDef:

Inheritance graph

List of all members.

Public Slots

QString name (void)
QString conName (void)
 Return the 'Connection Name' of the connection.
QString toCategory (void)
 Return the target Category of this connection.
QString pairedName (void)
 Return the Paired connection Name.
QString comment (void)
QString documentation (void)
bool isPublished (void)
long publishDepth (void)
QCommenceFilterfilter (void)
QCommenceCategoryDeftoCategoryDef (void)
 Return a pointer back to the target Category definition.
long index (void)
 Return this index number of this particular definition.
long fieldCount (void)
QCommenceConnectionFieldDeffieldDef (long i_index)

Public Member Functions

 QCommenceConnectionDef (void)
 QCommenceConnectionDef (const QCommenceConnectionDef &copy)
 QCommenceConnectionDef (QString i_conName, QString i_toCategory, QCommenceConnectionDefs *i_parent)
virtual ~QCommenceConnectionDef ()
QCommenceCategoryDefcategoryDef (void)
QCommenceConnectionDefsconnectionDefs (void)
QCommenceDatabaseDB (void)
QDomElement toXml (QDomDocument &doc, QDomNode &parent)
QDomElement de (void)

Private Attributes

QString m_conName
QString m_toCategory
long m_index
 The index number of this connection.
QPointer< QCommenceCategoryDefm_categoryDef
QPointer< QCommenceDatabasem_db
QPointer< QCommenceFilterm_filter
QList
< QCommenceConnectionFieldDef * > 
m_fieldDefs


Detailed Description

Commence Connection Definition.

inline_dotgraph_8.dot

This object represents a Commence Connection definition. This object is pretty straight forward since a Connection doesn't really have any properties per-se. Rather, a connection is really a pointer to another category, so the properties that are available to it are really those of the category it points to.

There are additional properties present in a Connection, such as allowing only one connected item, and sorting and filtering on connections, but none of those properties are available through the Commence API, and therefore none of them are exposed here.

Definition at line 726 of file QCommenceDB.h.


Constructor & Destructor Documentation

QCommenceConnectionDef::QCommenceConnectionDef ( void   )  [inline]

Definition at line 733 of file QCommenceDB.h.

QCommenceConnectionDef::QCommenceConnectionDef ( const QCommenceConnectionDef copy  )  [inline]

Definition at line 738 of file QCommenceDB.h.

QCommenceConnectionDef::QCommenceConnectionDef ( QString  i_conName,
QString  i_toCategory,
QCommenceConnectionDefs i_parent 
) [inline]

Definition at line 746 of file QCommenceDB.h.

virtual QCommenceConnectionDef::~QCommenceConnectionDef (  )  [inline, virtual]

Definition at line 764 of file QCommenceDB.h.


Member Function Documentation

QCommenceCategoryDef * QCommenceConnectionDef::categoryDef ( void   ) 

Definition at line 1935 of file QCommenceDB.cpp.

QString QCommenceConnectionDef::comment ( void   )  [slot]

Definition at line 2036 of file QCommenceDB.cpp.

QString QCommenceConnectionDef::conName ( void   )  [slot]

Return the 'Connection Name' of the connection.

This is an enhanced function that returns the 'connection name' portion of the connection. The Connection Name portion is that first part of the connection name that distinguishes one connection from another. This function is not normally provided by Commence so it is stored locally so as to be available for use in other operations.

vbScript Example:
 Sub Form_onEnterField(FieldName)
   '
   ' This test for the connection name...
   '
   if( dfrm.Connection(FieldName).conName = "pRD" ) then
     msgbox "Read Connection of some sort"
   end if' 

   '
   ' ...is the same as this test.
   '
   if( dfrm.Connection(FieldName).definition.name = "pRD" ) then
     msgbox "Read Connection of some sort"
   end if' 
See also:
name, toCategory

Definition at line 1954 of file QCommenceDB.cpp.

QCommenceConnectionDefs * QCommenceConnectionDef::connectionDefs ( void   ) 

Definition at line 1930 of file QCommenceDB.cpp.

QCommenceDatabase * QCommenceConnectionDef::DB ( void   ) 

Definition at line 1942 of file QCommenceDB.cpp.

QDomElement QCommenceConnectionDef::de ( void   ) 

Definition at line 2011 of file QCommenceDB.cpp.

QString QCommenceConnectionDef::documentation ( void   )  [slot]

Definition at line 2041 of file QCommenceDB.cpp.

long QCommenceConnectionDef::fieldCount ( void   )  [inline, slot]

Definition at line 895 of file QCommenceDB.h.

QCommenceConnectionFieldDef* QCommenceConnectionDef::fieldDef ( long  i_index  )  [inline, slot]

Definition at line 900 of file QCommenceDB.h.

QCommenceFilter* QCommenceConnectionDef::filter ( void   )  [inline, slot]

Definition at line 860 of file QCommenceDB.h.

long QCommenceConnectionDef::index ( void   )  [slot]

Return this index number of this particular definition.

Definition at line 1974 of file QCommenceDB.cpp.

bool QCommenceConnectionDef::isPublished ( void   )  [slot]

Definition at line 2046 of file QCommenceDB.cpp.

QString QCommenceConnectionDef::name ( void   )  [slot]

Definition at line 1949 of file QCommenceDB.cpp.

QString QCommenceConnectionDef::pairedName ( void   )  [slot]

Return the Paired connection Name.

This handy function requires an entry in the databaseDef.xml to define this reverse connection since is it not available from the API directly. The content is as follows:

Connection Definition Extension (exerpt)
  <connectionDefs>
    <connectionDef name="in->Court">
      <pairedName>for->Matters</pairedName>
      <limit1>0</limit1>
      <comment>This connection designates the court for this matter</comment>
    </connectionDef>
  </connectionDefs>

Definition at line 2031 of file QCommenceDB.cpp.

long QCommenceConnectionDef::publishDepth ( void   )  [slot]

Definition at line 2051 of file QCommenceDB.cpp.

QString QCommenceConnectionDef::toCategory ( void   )  [slot]

Return the target Category of this connection.

This is a pass-through function provided natively by Commence. Commence does provide this value, but it is also cached here locally so that the number of requests into the Commence API are reduced.

vbScript Example:
 dim cursor: set cursor = dfrm.DB.GetCursor( 0, oxConn.toCategory, 0 )
See also:
name, conName

Definition at line 1959 of file QCommenceDB.cpp.

QCommenceCategoryDef * QCommenceConnectionDef::toCategoryDef ( void   )  [slot]

Return a pointer back to the target Category definition.

This method returns object of the target category definition of the Connection. If this connection is "Relates to Company" then fetching this object would return the category definition for "Company". From there, all the regular properties of that category definition are available.

Definition at line 1969 of file QCommenceDB.cpp.

QDomElement QCommenceConnectionDef::toXml ( QDomDocument &  doc,
QDomNode &  parent 
)

Definition at line 1984 of file QCommenceDB.cpp.


Member Data Documentation

Definition at line 919 of file QCommenceDB.h.

Definition at line 909 of file QCommenceDB.h.

Definition at line 920 of file QCommenceDB.h.

Definition at line 922 of file QCommenceDB.h.

Definition at line 921 of file QCommenceDB.h.

The index number of this connection.

Definition at line 917 of file QCommenceDB.h.

Definition at line 910 of file QCommenceDB.h.


The documentation for this class was generated from the following files:




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com