Index

DKAutoLinkDefICM

Purpose:

Use this class to represent and manage an auto link associated with an item type.

Since: Version 8

Class summary:

class DKEXPORT DKAutoLinkDefICM 
{
public:
     DKAutoLinkDefICM();
     DKAutoLinkDefICM(const DKAutoLinkDefICM& autoLink);
     DKAutoLinkDefICM (dkDatastore* ds);
     DKAutoLinkDefICM (dkDatastore* ds,const char* targetEntityName,const char* linkType,const char*  attrName);
     DKAutoLinkDefICM (dkDatastore* ds,const char* targetEntityName,const char* linkType,const char*  attrName,const char* attrGroupName);
     virtual ~DKAutoLinkDefICM(); 
     void setDatastore(dkDatastore* ds);
     dkDatastore* getDatastore();
     void add();
     void update();
     void del();
     void setTargetEntityName(const char* tgtEntName);
     DKString getTargetEntityName();
     void setSourceEntityName(const char* srcEntName);
     DKString getSourceEntityName();
     void setAttrGroupName(const char* attrGroupName);
     DKString getAttrGroupName();
     long getSequenceNo();
     void setSequenceNo(short seqNum);
};

Members:

Constructors and destructor
DKAutoLinkDefICM();

Default constructor. Constructs an instance of auto link definition class.

DKAutoLinkDefICM(const DKAutoLinkDefICM& autoLink);

Constructs an auto link object and initilizes it with the datastore. Parameters: ds - A reference to a datasore object where the item type, whose auto links this object represents, is defined

DKAutoLinkDefICM (dkDatastore* ds);

A copy constructor for auto link definition for ICM datastore. Parameters: autoLink - an auto link definition object.

DKAutoLinkDefICM (dkDatastore* ds,const char* targetEntityName,const char* linkType,const char*  attrName);

Constructs an auto link object and initilizes it with the datastore, the target item type name, the type of link and the attribute name. Parameters:

  • ds - A reference to a datasore object where the item type, whose auto links this object represents, is defined.
  • targetEntityName - the name of the target item type.
  • linkType - the type of link. e.g. 'contains', 'DKFolder' attrName - attribute name.

DKAutoLinkDefICM (dkDatastore* ds,const char* targetEntityName,const char* linkType,const char*  attrName,const char* attrGroupName);

Constructs an auto link object and initilizes it with the datastore, the target item type name, the type of link the attribute name and the attribute group. Parameters:

  • ds - A reference to a datasore object where the item type, whose auto links this object represents, is defined
  • targetEntityName - the name of the target item type
  • linkType - the type of link. e.g. 'contains', 'DKFolder'
  • attrName - attribute name
  • attrGroupName - attribute group name

virtual ~DKAutoLinkDefICM();

Destructor for this object.

Member functions

setDatastore
Sets the datastore where this auto link object would be persisted when added to the datastore. Parameters: ds - datastore
void setDatastore(dkDatastore* ds);

getDatastore
Gets the datastore where this auto link object would be persisted. Returns: dkDatastore datastore
dkDatastore* getDatastore();

add
Adds the auto link object to the persistent store. By adding an auto link the ICM datastore establishes the auto link facility between the specified source item type and the target item type with the specified attribute name as the link. Throws: DKException - if error occurs
void add();

update
Updates the auto link. Throws: DKException - if error occurs
void update();

del
Deletes the auto link. Throws: DKException - if error occurs
 void del();

setTargetEntityName
Sets the target item type name to which an auto link is to be created. Parameters: tgtEntName - a String that can be of 15 charecters long
void setTargetEntityName(const char* tgtEntName);

getTargetEntityName
Gets the target item type name for this auto link. Returns: target item type name
DKString getTargetEntityName();

setSourceEntityName
Sets the item type name for which the auto link is to be created. Parameters: srcEntName - Source item type name. The name can be up to 15 characters.
void setSourceEntityName(const char* srcEntName);

getSourceEntityName
Gets the source item type name. Returns: source item type name
DKString getSourceEntityName();

setAttrGroupName
Sets the attribute group name.
void setAttrGroupName(const char* attrGroupName);

getAttrGroupName
Gets the attribute group name.
DKString getAttrGroupName();

getSequenceNo
Gets the sequence number of this auto link with respect to all other auto links defined for the item type. Returns: Sequence number of this auto link with respect to other auto links defined for the item type
long  getSequenceNo();

setSequenceNo
Sets the sequence number of this auto link with respect to the other auto links for the item type. Parameters: seqNum - Sequence number to be assigned to this auto link with respect to the other auto links in the item type.
void setSequenceNo(short seqNum);

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.