Index

DKComponentTypeindexDefICM

Purpose:

This class defines methods to access database index information on root or child components.

Since: Version 8

Class summary:

 class DKEXPORT DKComponentTypeIndexDefICM  
 {
  public:
     DKComponentTypeIndexDefICM();
     DKComponentTypeIndexDefICM(dkDatastore* ds);
     DKComponentTypeIndexDefICM(const DKComponentTypeIndexDefICM& compIndex);
     virtual ~DKComponentTypeIndexDefICM();
     void add();
     void del();
     DKString getName();
     void setName(const char* indexName);
     DKString getIndexSchema();
     void setIndexSchema(const char* indexSchema);
     dkEntityDef* getComponentType();
     void setComponentType(dkEntityDef* compType);
     long getComponentTypeId();
     void setComponentTypeId(long compTypeID);
     void addAttr(dkAttrDef* attrObj);
     DKBoolean isUnique();
     void setUnique(DKBoolean unique);
  };

Members:

Constructors and destructor
DKComponentTypeIndexDefICM();

Default constructor for the component type index class. Constructs the definition of the index class for a component type definition.

DKComponentTypeIndexDefICM(dkDatastore* ds);

Constructs an instance of the index class definition for the given ICM datastore. Parameters: ds - datastore object as an instance of DKDatastoreICM.

DKComponentTypeIndexDefICM(const DKComponentTypeIndexDefICM& compIndex);

A copy constructor for component type index definition object. The new instance of the component type index definition will contain all the information copied from the original one. Parameters: compIndex - a component type index definition object, DKComponentTypeIndexDefICM.

virtual ~DKComponentTypeIndexDefICM();

Destructor for this object.

Member functions

add
Adds the definition of this component type index to the persistent store. Throws:DKException if error occurs in the server.
void add();

del
Deletes the definition of this component type index from the persistent store. Throws:DKException if error occurs in the server.
void  del();

getName
Retrieves the name of the component type index. Returns: name of this component type index. Throws:DKException if error occurs in the server.
DKString getName();

setName
Sets the name of this component type index name to the specified value. Parameters: indexName - value to set the name of the index to.
void setName(const char* indexName);

setIndexSchema
Sets the index schema value for this component type index. Parameters: indexSchema - value to set the indexSchema for this component type index to.
void setIndexSchema(const char* indexSchema);

getComponentType
Retrieves the component type definition object with which the component type index is associated. Returns: component type object associated with this component type index as an instance of DKComponentTypeDefICM.
dkEntityDef*    getComponentType();

setComponentType
Sets the component type with which this component type index is associated. Parameters: component-type - component type definition object with which this component type index is associated. The parameter is an object of type DKComponentTypeDefICM.
void setComponentType(dkEntityDef* compType);

getComponentTypeID
Retrieves the identifier for the component type associated with this component type index. Returns: identifier for the component type associated with this component type index.
long getComponentTypeId();

setComponentTypeID
Sets the identifer for the component type to be associated with this component type index. Parameters: compTypeId - identifier of the component type to be associated with this component type index.
void setComponentTypeId(long compTypeID);

addAttr
Adds a new attribute to the in-memory representation of this component type index. This new attribute will henceforth become a part of the index and be used to refine searches on the associated component etc once the changes to the component index are added to the persistent store. Parameters: attrObj - an attribute definition as an instance of DKAttrDefICM.
void addAttr(dkAttrDef* attrObj);

isUnique
Returns true if the database index underlying this component type index unique; false otherwise. Returns: DKBoolean value that indicates whether the database index underlying this component type index is unique or not. By default the database index is not unique (false return from this method call).
DKBoolean isUnique();

setUnique
Sets the uniqueness property for the database index underlying this component type index. Parameters: unique - if this value is true, the database index is henceforth set to be unique; if this value is false, the database index is marked as not being unique.
void setUnique(DKBoolean unique);

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