Index

DKComponentTypeDefICM

Purpose:

This class is used to represent component type definitions in a Content Manager server. Just as Content Manager entities are represented by DKItemTypeDefICM, Content Manager sub-entities are represented by this class. In other words, in an item-type hierarchy, child components are represented by instances of DKComponentTypeDefICM. Furthermore, DKItemTypeDefICM is the specialized sub-class of DKComponentTypeDefICM used to represent root items in an item-type hierarchy.

See Also: DKItemTypeDefICM, dkEntityDef.

Since: Version 8

Class summary:

class DKEXPORT DKComponentTypeDefICM : public dkEntityDef
{
public:
     DKComponentTypeDefICM();
     DKComponentTypeDefICM(dkDatastore* ds);
     DKComponentTypeDefICM(const DKComponentTypeDefICM& compType);   
     virtual ~DKComponentTypeDefICM();
     virtual dkEntityDef* clone();
     virtual DKBoolean isRoot();
     virtual dkAttrDef* createAttr();
     virtual void addAttr(dkAttrDef* attrObj);
     virtual void removeAttr(const char* attrName);
     virtual void updateAttr(dkAttrDef* attrDef);
     virtual dkAttrDef* getAttr(const char* attrName);
     virtual dkAttrGroupDef* getAttrGroup(const char* attrGroupName);
     virtual dkCollection* listAttrs();
     virtual dkCollection* listAttrs(long option);
     virtual DKString* listAttrNames (long& size);
     DKString* listAttrNames(int option,long& arraySize);
     virtual dkAttrDef* retrieveAttr(const char* attrName);
     virtual dkAttrGroupDef* createAttrGroup();
     virtual void addAttrGroup(dkAttrGroupDef* attrGroupObject);
     virtual void removeAttrGroup(const char* attrGroupName);
     virtual void updateAttrGroup(dkAttrGroupDef* attrGroupDef);
     virtual dkCollection* listAttrGroups();
     virtual dkCollection* listAttrGroups(long option);
     virtual DKString* listAttrGroupNames(long& arraySize);
     virtual DKString* listAttrGroupNames(long option, long& arraySize);
     virtual dkAttrGroupDef* retrieveAttrGroup(const char* attrGroupName);
     virtual dkEntityDef* createSubEntity();
     virtual void addSubEntity(dkEntityDef* entityObj);
     virtual void removeSubEntity(const char* compName);
     virtual dkEntityDef* getSubEntity(const char* compName);
     virtual void updateSubEntity(dkEntityDef* subEntityDef);
     virtual dkCollection* listSubEntities();
     virtual dkCollection* listSubEntities(long option);
     virtual DKString* listSubEntityNames(long& arraySize);
     DKString* listSubEntityNames(long option, long& arraySize);
     virtual dkEntityDef* retrieveSubEntity(const char* compName);
     virtual long getComponentViewId();
     virtual DKString getComponentTypeName();
     virtual void setComponentTypeName(const char* compTypeName);
     virtual long getItemTypeId();
     virtual DKString getItemTypeName();
     virtual void setItemTypeName(const char* itemTypeName);
     void setParentId(long parentEntityId);
     long getParentId();
     virtual void add();
     virtual void del();
     virtual void update();
     virtual short getId();
     virtual void setId(short id);
     virtual void setIntId(long id);
     virtual long getIntId();
     virtual long getComponentTypeId();
     virtual void setComponentTypeId(long id);
     void setDeleteRule(short deleteRule);
     short getDeleteRule();
     void setCardinalityMin(short cardinalityMin);
     short getCardinalityMin();
     void setCardinalityMax(short cardinalityMax);
     short getCardinalityMax();
     dkEntityDef* getParent();
     void setParent(dkEntityDef* parent);
     dkCollection* listComponentTypeIndexes();
     DKString* listComponentTypeIndexNames(long& arraySize);
     DKComponentTypeIndexDefICM* retrieveComponentTypeIndex(const char* indexName);
     DKComponentTypeIndexDefICM* getComponentTypeIndex(const char* cpIndexName);
     DKForeignKeyDefICM* createForeignKey();
     void addForeignKey(DKForeignKeyDefICM* fkey);
     void removeForeignKey(const char* constraintName);
     DKForeignKeyDefICM* getForeignKey(const char* constraintName);
     dkCollection* getForeignKeys();
     void updateForeignKey(DKForeignKeyDefICM* fkey);
     dkCollection* listForeignKeys();
     DKString* listForeignKeyNames(long& arraySize);
     DKForeignKeyDefICM* retrieveForeignKey(const char* constraintName);
     virtual dkEntityDef* retrieveParent();
     virtual DKBoolean isView();
     DKString getDescription(const char* langCode);
     void setDescription(const char* desc, const char* langCode);
};

Members:

Constructors and destructor
DKComponentTypeDefICM();

Default constructor. Constructs a component type class definition for an content manager datastore.

DKComponentTypeDefICM(dkDatastore* ds);

Constructs an attribute definition for the specified ICM datastore. Parameters: ds - ICM datastore.

DKComponentTypeDefICM(const DKComponentTypeDefICM& compType);

Copy constructor for a component type. Creates a component type definition object using the component type object in the input parameter as a template. Parameters: compType - component type object to be used as a template for creating the new object.

virtual ~DKComponentTypeDefICM();

Destructor for the object.

Member functions

clone
Clone this component type object. Returns: A component type definition object that is a clone of this object.
virtual dkEntityDef* clone();

isRoot
Check to see if this component type is a root component type in an item-hierarchy or not. Returns: DKBoolean - False, since this class is always used to represent a child component. Sub-classes of this class will return true or false based on whether they represent root or child components.
virtual DKBoolean isRoot();

createAttr
Create a new attribute type and return it to the caller as a reference to a dkAttrDef object. Overrides: createAttr() in class dkEntityDef. Returns: a new DKAttrDefICM object as a reference to a dkAttrDef object.
virtual dkAttrDef* createAttr();

addAttr
Adds a new attribute definition to the in-memory representation of this component type. Overrides: addAttr() in class dkEntityDef. Parameters: attrObj - the new attribute definition to be added to the component as an instance of DKAttrDefICM. Throws: DKAlreadyExistException - this attribute definition already exists in this component type definition. Memory Management: Once an attribute object is added to a component it must not be deleted.
virtual void addAttr(dkAttrDef* attrObj);

removeAttr
Removes an attribute definition from the in-memory representation of this component type. Overrides: removeAttr() in class dkEntityDef. Parameters: attrName - name of the attribute definition that needs to be removed from the in-memory representation of this component type. Throws: DKNotExistException - if the attribute definition to be removed doesn't exist in the in-memory representation of this component type.
virtual void removeAttr(const char* attrName);

updateAttr
Updates an attribute object from memory only. Overrides: updateAttr() in class dkEntityDef. Parameters: attrDef - the attribute to be updated. Throws: DKException - if the attribute definition to be updated doesn't exist in the in-memory representation of this component type.
virtual void updateAttr(dkAttrDef* attrDef); 

getAttr
Retrieves an attribute definition object by using its name from the in-memory representation of the component type. No datastore operation is initiated as a result of calling this method. Overrides: getAttr() in class dkEntityDef. Parameters: attrName - name of the attribute whose definition is to be retrieved. Returns: an attribute definition object as an instance of DKAttrDefICM. Throws: DKException - if the attribute with the specified name does not exist. Memory Management: An attribute returned using getAttr must not be deleted.
virtual dkAttrDef* getAttr(const char* attrName);

getAttrGroup
Retrieves an attribute group definition object using its name from the in-memory representation of this component type. If this attribute group doesn't exist in memory, then null value is returned. Parameters: attrGroupName - name of attribute group to be retrieved from the the in-memory representation of the component type. Returns: an attribute group object definition as an instance of DKAttrGroupDefICM. Throws: DKException - if the attribute group with the specified name does not exist in the in-memory representation of this component type. Memory Management: The dkAttrGroupDef object returned to the caller must not be deleted.
virtual dkAttrGroupDef* getAttrGroup(const char* attrGroupName);

listAttrs
Retrieves a list of user defined attributes for this component type that don't belong to any attribute group and are not resource manager attributes. Overrides: listAttrs() in class dkEntityDef. Returns: a collection of attribute definitions as instances of DKAttrDefICM. Throws: DKException - if an error occurs. Memory Management: The collection and all the object in it are to be delete by the caller.

virtual dkCollection* listAttrs();

listAttrs
Retrieves a list of attributes for this component type that don't belong to any attribute group and that satisfy the criteria in the specified option. Parameters: option. Valid values are:
  • DK_ICM_ALL_ATTR :list attributes that match all of the options specified below in combination.
  • DK_ICM_RESOURCE_ATTR : list all resource manager attributes.
  • DK_ICM_USER_ATTR : list all user defined attributes.
  • DK_ICM_SYSTEM_ATTRlist all system defined attributes.
  • DK_ICM_USER_ATTR_NO_RESOURCElist user-defined attributes without listing resource manager attributes.

Returns: a collection of attribute definitions as instances of DKAttrDefICM. Memory Management: The collection and all the object in it are to be delete by the caller. Throws: DKException if error occurs on the server.

virtual dkCollection* listAttrs(long option);

listAttrNames
Retrieves an array of the names of user defined attributes that are not resource manager attributes. Overrides: listAttrNames() in class dkEntityDef. Returns: an array of names of user defined attributes that are not resource manager attributes. Throws: DKException if error occurs on the server. Memory Management: The caller must delete the returned DKString array.
virtual DKString* listAttrNames(long& arraySize); 

listAttrNames
Retrieves an array of the names of attributes that don't belong to any attribute group and that satisfy the criteria in the specified option. Parameters: option. Valid values are:
  • DK_ICM_ALL_ATTR :list attributes that match all of the options specified below in combination.
  • DK_ICM_RESOURCE_ATTR: list all resource manager attributes.
  • DK_ICM_USER_ATTR: list all user defined attributes.
  • DK_ICM_SYSTEM_ATTR: list all system defined attributes.
  • DK_ICM_USER_ATTR_NO_RESOURCE: list user defined attributes without listing resource manager attributes.

Returns: a an array of names for attributes that match the option criteria and are not part of any attribute group. Memory Management: The DKString array must be deleted by the caller. Throws: DKException if error occurs on the server.

DKString* listAttrNames(int option,long& arraySize);

retrieveAttr
Retrieve an attribute definition object based on its name from the persistent store. Overrides: retrieveAttr() in class dkEntityDef. Parameters: name - the name of the attribute whose definition is to be retrieved from the persistent store. Returns: attribute definiton as an instance of DKAttrDefICM. Throws: DKException if error occurs on the server. Memory Management: The caller must delete the returned object.
virtual dkAttrDef* retrieveAttr(const char* attrName);

createAttrGroup
Creates a new attribute group definition and returns it to the caller as a reference to a dkAttrGroupDef object. Returns: a new DKAttrGroupDefICM object as a reference to a dkAttrGroupDef object. Throws: DKException if this component does not create the new attribute group.
virtual dkAttrGroupDef* createAttrGroup();

addAttrGroup
Adds a new attribute group to the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Parameters: attrGroupObj - a attribute group definition as an instance of DKAttrGroupDefICM. Throws: DKAlreadyExistException - if thise specified attribute group already exists in this component type. Memory Management: An attribute group added to the component type memory must not be deleted.
virtual voidaddAttrGroup(dkAttrGroupDef* attrGroupObject);

removeAttrGroup
Removes an attribute group from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Parameters: attrGroupName - name of the attribute group that needs to be removed from the in-memory representation of this component type.
virtual void removeAttrGroup(const char* attrGroupName);

updateAttrGroup
Update the definition of an attribute group object inside the in-memory representation of this component type. Parameters: attrGroupDef - attribute group object whose definition is to be updated. Throws: DKException - if the attribute group object does not exist in the in-memory representation of this component type.
virtual void updateAttrGroup(dkAttrGroupDef* attrGroupDef);

listAttrGroups
Retrieves the list of user-defined attribute groups for this component type. Returns: a collection of user-defined attribute definitions as instances of DKAttrGroupDefICM. Throws: DKException if error occurs on the server. Memory Management: The caller must delete all the object in the collection and the collection itself.
virtual dkCollection* listAttrGroups();

listAttrGroups
Retrieves a list of attributes groups based on the value of the specified option. Parameters: option. Valid values are:
  • DK_ICM_ALL_ATTRGROUP: list all attribute groups from the persistent datastore.
  • DK_ICM_USER_ATTRGROUP: list all user-defined attribute groups.
  • DK_ICM_SYSTEM_ATTRGROUP :list all system-defined attribute groups.

Returns: a collection of attribute group definitions as instance of DKAttrGroupDefICM. Throws: DKException if error occurs on the server. Memory Management: The caller must delete all the object in the collection and the collection itself.

virtual dkCollection* listAttrGroups(long option);

listAttrGroupNames
Retrieves an array of names for user-defined attribute groups. Parameters: arraySize - the no of names being returned in the array. Returns: an array of names for user-defined attribute groups names. Throws: DKException if error occurs on the server. Memory Management: The caller has to delete the DKString array returned by listAttrGroupNames.
virtual DKString* listAttrGroupNames(long& arraySize);

listAttrGroupNames
Retrieves an array of names for attribute groups that satisfy the criteria in the specified option value Parameters: option. Valid option values are:
  • DK_ICM_ALL_ATTRGROUP : get the names of all of the attribute groups from the persistent datastore
  • DK_ICM_USER_ATTRGROUP: get the names of the user defined attribute groups.
  • DK_ICM_SYSTEM_ATTRGROUP: get the names of the system defined attribute groups.

Returns: an array of names of the attribute groups selected on the basis of the provided options. Throws: DKException if error occurs on the server. Memory Management: The caller has to delete the DKString array returned by listAttrGroupNames.

virtual DKString* listAttrGroupNames(long option, long& arraySize);

retrieveAttrGroup
Retrieve an attribute group object using its name from the persistent store. Parameters: name - the name of the attribute group to be retrieved from the persistent store. Returns: attribute group definition as an instance of DKAttrGroupDefICM. Throws: DKException if error occurs on the server. Memory Management: The attribute group object returned by retrieveAttrGroup has to be deleted by the caller.
virtual dkAttrGroupDef* retrieveAttrGroup(const char* attrGroupName);

createSubEntity
Creates a new child component type and returns it to the caller as a reference to a dkEntityDef object. Overrides: createSubEntity() in class dkEntityDef. Returns: a new child component object of type DKComponentTypeDefICM as a reference to a dkEntityDef object.
virtual dkEntityDef* createSubEntity();

addSubEntity
Adds a new child component type the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Overrides: addSubEntity() in class dkEntityDef. Parameters: entityObj - a new child component as an instance of DKComponentTypeDefICM. Throws: DKAlreadyExistException - if the child component type already exists as part of this entity. Memory Management: The dkEntityDef instance passed as parameter to addSubEntity must not be deleted by the caller.
virtual void addSubEntity(dkEntityDef* entityObj);

removeSubEntity
Remove a child component type by its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Overrides: removeSubEntity() in class dkEntityDef. Parameters: compName - the component type name of the entity that needs to be removed. Throws: DKNotExistException - if the child component type does not exist in this entity.
virtual void removeSubEntity(const char* compName);

getSubEntity
Retrieves a child component type definition object by its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Overrides: getSubEntity() in class dkEntityDef. Parameters: compName - name of the child component type to be retrieved. Returns: a sub entity object as an instance of DKComponentTypeDefICM. Memory Management: The user must not delete the object returned by this method.
virtual dkEntityDef* getSubEntity(const char* compName);

updateSubEntity
Update the child component type dfinition object in the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method representation. Overrides: updateSubEntity() in class dkEntityDef. Parameters: subEntityDef - the child component type object to be updated in the in-memory.
virtual void updateSubEntity(dkEntityDef* subEntityDef);

listSubEntities
Retrieves a list of child component types for this component type. Only the direct children will be returned by this call. The user has to recursively call this method in order to retrieve all of the child component types. Overrides: listSubEntities() in class dkEntityDef. Returns: a collection of direct children sub-entities for this component as instances of DKComponentTypeDefICM. Memory Management: The user has to delete all the objects in the collection and the collection itself.
virtual dkCollection* listSubEntities();

listSubEntities
Retrieves list of child component types for this component based on the option value. Parameters: option. Valid option values are:
  • DK_ICM_ALL_COMPONENT_TYPES: All of the direct child component types from the persistant datastore will be returned by this call.
  • DK_ICM_SYSTEM_COMPONENT_TYPES: Only the system defined direct child component types will be returned by this call.
  • DK_ICM_USER_COMPONENT_TYPES: Only the user defined direct child component types will be returned by this call

If caching is on and the child component types have been retrieved previously, the child component types in the memory will be returned. Otherwise the child component types are retrieved from the persistent store and stored in memory for future cached access. Returns: a collection of direct children sub-entities for this component as instances of DKComponentTypeDefICM. Memory Management: The user has to delete all the objects in the collection and the collection itself.

virtual dkCollection* listSubEntities(long option);

listSubEntityNames
Gets an array of child component type names, those child component types are the user defined direct chlid component types. Overrides: listSubEntityNames() in class dkEntityDef. Parameters:
  • subEntityDef - the child component type object to be updated in the in-memory.
  • arraySize - the size of the array being returned.

Returns: An array of DKString with the immediate child components of this component type. Memory Management: The caller has to delete the DKString array returned by this method.

virtual DKString* listSubEntityNames(long& arraySize);

listSubEntityNames
Retrieves an array of names for child component type. The child component types selected are the user defined direct children component types. Overrides: listSubEntityNames() in class dkEntityDef. Parameters:
  • arraySize - The size of the array being returned to the caller.
  • option - the follwoing are the valid options:
    • DK_ICM_ALL_COMPONENT_TYPES: All the direct child component types from the persistant datastore will be returned by this call.
    • DK_ICM_SYSTEM_COMPONENT_TYPES: Only the system defined direct child component types will be returned by this call.
    • DK_ICM_USER_COMPONENT_TYPES: Only the user defined direct child component types will be returned by this call.

Returns: An array of DKString of size represented by the parameter arraySize.

DKString* listSubEntityNames(long option, long& arraySize);

retrieveSubEntity
Retrieves a child component type object from the persistent store based on its name. Overrides: retrieveSubEntity() in class dkEntityDef. Parameters: compName - the name of the child component type to be retrieved from the persistent store. Returns: child component type definition as an instance of DKComponentTypeDefICM. Throws: DKException if error occurs on the server.
virtual dkEntityDef* retrieveSubEntity(const char* compName);

getComponentViewId
Returns the component type view identifier. Since this is the base type, the component view identifer is equal to the component type identifier. This method is overriden to return the view identifier in the DKComponentViewTypeDefICM sub-class. Returns: the component type view identifier.
virtual long getComponentViewId();

getComponentTypeName
Returns the component type name for this component type. Returns: component type name for this component type. Throws: DKException if error occurs on the server.
virtual DKString getComponentTypeName();

setComponentTypeName
Sets component type name for this component type. Parameters: compTypeName - component type name to be set for this component type.
virtual void setComponentTypeName(const char* compTypeName);

getItemTypeId
Returns the identifier of the item type that this component type is associated with. Returns: the item type identifier. Throws: DKException if error occurs on the server.
virtual long getItemTypeId();

getItemTypeName
Retrieves the name of the item type that this component type is associated with. Returns: The name of the item type that this component type is associated with Throws: DKException if error occurs on the server
virtual DKString getItemTypeName();

setItemTypeName
Sets the name of the item type that this component type is associated with. Parameters: itemTypeName - the name of the item type that this component type is associated with
virtual voidsetItemTypeName(const char* itemTypeName);

setParentId
Sets the identifier for the parent entity for this component type. Parameters: parentEntityId - component type identifier for the parent entity of this component type.
void setParentId(long parentEntityId);

getParentId
Retrieves the identifier for the parent entity of this component type. Returns: identifier of the parent entity for this component type. Throws: DKException if error occurs on the server.
long getParentId();

add
Adds this component type definition to the persistent store. Overrides: add() in class dkEntityDef. Throws: DKException when the subclass does not implement this method.
virtual void add();

del
Deletes this persistent definition of this component type from the persistent store. The in-memory copy of the component typeis not affected. Overrides: del() in class dkEntityDef. Throws: DKException - when the subclass does not implement this method.
virtual void del();

update
Updates the persistent reprenstation of this component type object in the persistent store. The in-memory copy is not changed. Throws: DKException - when the subclass does not implement this method.
virtual void update();

getId
Returns the identifier for this component type. Returns: component type identifier.
virtual short getId();

setId
Sets the identifier for this component type. Parameters: id - the identifier value for this component type.
virtual short setId(short id);

setIntId
Sets the integer-based identifier for this component type. Parameters: id - integer-based identifier value for this component type.
virtual void setIntId(long id);

getIntId
Gets the integer identifier for this item type. Returns: integer identifier for this component type.
virtual long getIntId();

getComponentTypeId
Gets the component type id for this component type. Returns: component type ID for thise component type. Throws: DKException if error occurs.
virtual long getComponentTypeId();

setDeleteRule
Sets the delete rule for this component type. The delete rule specifies what action is to take palace on the dependent tables when a row of the parnent table that represents this component type is deleted. Parameters: deleteRule -The valid values are:
  • DK_ICM_DELETE_RULE_RESTRICT: RESTRICT (default)
  • DK_ICM_DELETE_RULE_CASCADE: CASCADE
  • DK_ICM_DELETE_RULE_SET_NULLT: SET NULL
  • DK_ICM_DELETE_RULE_NO_ACTION: NO ACTION

void setDeleteRule(short deleteRule);

getDeleteRule
Retrieves the delete rule for this component type. The delete rule specifies what action is to take palace on the dependent tables when a row of the parent table representing this component type is deleted. Returns: the delete rule. The valid values are:
  • DK_ICM_DELETE_RULE_RESTRICT: restrict (default)
  • DK_ICM_DELETE_RULE_CASCADE: cascade
  • DK_ICM_DELETE_RULE_SET_NULLT: set null
  • DK_ICM_DELETE_RULE_NO_ACTION: no action

short getDeleteRule();

setCardinalityMin
Sets the minimum number of rows for thise component type. This number is valid only for parent component types where the identifier is non-zero. Parameters: cardinalityMin - minimum number of rows for thise component type.
void setCardinalityMin(short cardinalityMin);

getCardinalityMin
Retrieves the minimum number of rows for the component type. This number is valid only for parent component types where the identifier is non-zero. Returns: minimum number of rows for this component type.
short getCardinalityMin();

setCardinalityMax
Sets the maximum number of rows for this component type. This number is valid only for parent component types where the identifier is non - zero. The maximum cardinality must be greater than or equal to the minimum cardinality. Parameters: cardinalityMax - maximum number of rows for this component type.
void setCardinalityMax(short cardinalityMax);

getCardinalityMax
Retrieves the maximum number of rows for this component type. This number is valid only for parent component types where the identifier is non-zero The maximum cardinality must be equal to or greater than the minimum cardinality. Returns: maximum number of rows for thise component type.
short getCardinalityMax();

getParent()
Retrieves the entity definition for the parent of this component type. Returns: parent entity definition as a dkEntityDef object. Throws: DKException if error occurs on the server.
dkEntityDef* getParent();

setParent()
Sets the parent entity type for this component type. Parameters: parentEntity - parent entity definition.
void setParent(dkEntityDef* parent);

listComponentTypeIndexes
Retrieves a list of component type indexes objects that belong to this component type. Returns: a collection of component type indexes as instances of DKComponentTypeIndexDefICM's Throws: DKException - if error occurs
dkCollection* listComponentTypeIndexes();

listComponentTypeIndexNames
Retrieves an array of names of component type indexes for this component type. Returns: an array of names of component type indexes. Throws: DKException - if error occurs.

DKString* listComponentTypeIndexNames(long& arraySize);

retrieveComponentTypeIndex
Retrieves a component type index object by its name from the persistent store. Parameters: indexName - the name of the component type index to be retrieved from the persistent datastore. Returns: a component type index object. Throws: DKException - if error occurs.
DKComponentType IndexDefICM* retrieveComponentTypeIndex(const char* indexName);

getComponentTypeIndex
Retrieves a component type index object based on its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Parameters: cpIndexName - name of component type index to be retrieved. Returns: a component type index as an instance of DKComponentTypeIndexDefICM object. Throws: DKException - if the component type index does not exist in the in-memory representation of this component type.
DKComponentType IndexDefICM* getComponentTypeIndex(const char* cpIndexName);

createForeignKey
Creates a new foreign key and returns it to the caller as a reference to a DKForeignKeyDefICM object. Returns: a new foreign key as annew instance of a DKForeignKeyDefICM. Throws: DKException - if this method call does not create a foreign key.
DKForeignKeyDefICM* createForeignKey();

addForeignKey
Adds a new foreign key to the in-memory representation of this component type. Parameters: fkey - a foreign key object as an instance of an object of DKForeignKeyDefICM. Throws: DKAlreadyExistException - if this foreign key already exists in this component type.
void addForeignKey(DKForeignKeyDefICM* fkey);

removeForeignKey
Removes a foreign key from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Parameters: constraintName - name of the foreign key that needs to be removed. Throws: DKException - if an error occurs.
void removeForeignKey(const char* constraintName);

getForeignKey
Retrieves a foreign key object by its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method. Parameters: constraintName - name of foreign key to be retrieved. Returns: a foreign key as an instance of DKForeignKeyDefICM. Throws: DKException - if the constraint with the given name does not exist in this component type.
DKForeignKeyDefICM* getForeignKey(const char* constraintName);

getForeignKeys
Retrieves the collection of foreign keys for this component type. Returns: the dkcollection of foreign keys belonging to this component type. Throws: DKException - if an error occurs.

dkCollection* getForeignKeys();

updateForeignKey
Updates the foreign key object in the in-memory representation of this component type. No datastore operation is initiated as a result of this method call. Parameters: fkey - foreign key object to be updated in the in-memory representation. Throws: DKException - if the foreign key object does not exist in the in-memory representation of this component type.
void updateForeignKey(DKForeignKeyDefICM* DKForeignKeyDefICM* fkey);

listForeignKeys
Retrieves the list of foreign keys for this component type. Returns: a collection of foreign keys as instances of DKForeignKeyDefICM Throws: DKException - if error occurs
dkCollection* listForeignKeys();

listForeignKeyNames
Retrievs an array of names for foreign key constraints belonging to this component type. Returns: an array of foreign key constraint names. Throws: DKException - if error occurs.
DKString* listForeignKeyNames(long& arraySize);

retrieveForeignKey
Retrieves a foreign key object based on its constraint name for this component type from the persistent store. Parameters: constraintName - the constraint name of the foreign key to be retrieved from the persistent datastore. Throws: DKException - if error occurs.
DKForeignKeyDefICM* retrieveForeignKey(const char* constraintName);

retrieveParent
Retrieves the parent entity definition for this component type from the persistent store. Returns: parent entity definition as an instance of DKComponentTypeDefICM Throws: DKException if error occurs on the server.
virtual dkEntityDef* retrieveParent();

isView
Checks to see if this component type is a view or a base component type. Returns: False, since this class is always used to represent the base component. The DKComponentTypeViewDefICM overrides this method and returns true since it represents a view. See also DKComponentTypeViewDefICM.
virtual DKBoolean isView();

getDescription
Retrieves the description for this component type for the specified language code. Parameters: langCode - the language code for which the description is to be retrieved. Returns: the description for the specified language code for this component type.
DKString getDescription(const char* langCode);

setDescription
Sets a new value into the description field for this component type for the specified language code. Parameters:
  • langCode, - the language code for which the description is to be set
  • desc - the value description to set this component type's description to.

voidsetDescription(const char* desc, const char* langCode);

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