Index

dkAttrDef

Purpose:

dkAttrDef provides a generic interface to manipulate concrete attributes defined in the associated concrete datastore. Therefore, it must be subclassed for the real datastore, for example:

Heirarchy:

    dkAttrDef
      DKAttrDefFed

Class summary:

class dkAttrDef
 {
   public:
      virtual ~dkAttrDef();
 
      virtual dkDatastore* getDatastore();
      virtual void      setDatastore(dkDatastore* ds);
      virtual dkEntityDef* getEntity();
      virtual void      setEntity(dkEntityDef* entityDef);
      virtual DKString  datastoreName() const;
      virtual DKString  datastoreType() const;
      virtual DKString  getEntityName();
      virtual void      setEntityName(const char* entityName);
      virtual DKString  getName();
      virtual void      setName(const char* attrName);
      virtual DKString  getDescription();
      virtual void      setDescription(const char* desc);
      virtual short     getType();
      virtual void      setType(short attrType);
      virtual long      getSize();
      virtual void      setSize(long displaySize);
      virtual DKBoolean isNullable();
      virtual void      setNullable(DKBoolean nullable);
      virtual long      getPrecision();
      virtual void      setPrecision(long precision);
      virtual long      getScale();
      virtual void      setScale(long scale);
      virtual long      getMax();
      virtual void      setMax(long maxValue);
      virtual long      getMin();
      virtual void      setMin(long minValue);
      virtual long      getStringType();
      virtual void      setStringType(long stringType);
      virtual DKBoolean isUpdatable();
      virtual void      setUpdatable(DKBoolean updatable);
      virtual DKBoolean isQueryable();
      virtual void      setQueryable(DKBoolean queryable);
      virtual DKString getQualifiedName();
      virtual void setQualifiedName(const char* qualifiedName);
      virtual DKString* parsedQualifiedName(const char* qualifiedName,
                                      long& arraySize);
      virtual void add();
      virtual void del(); 
 
      virtual DKBoolean isTextSearchable();
      virtual void setTextSearchable(DKBoolean textSearchable);
 } 

Members:

Member functions

setDatastore
Sets the reference to the owner datastore object.
virtual void setDatastore(dkDatastore* ds);

getDatastore
Gets the reference to the owner datastore object. Returns a dkDatastore object.
virtual dkDatastore* getDatastore();

datastoreName
Gets the name of the owner datastore object.
virtual DKString  datastoreName() const;

datastoreType
Gets the type of the datastore. The concrete datastore class could be DL, V4, and so forth. Returns a string with the following possible values:
DK_DL_DSTYPE - for Content Manager 
DK_OD_DSTYPE - for OnDemand 
DK_DB2_50_DSTYPE - for DB2 UDB 
DK_DD_DSTYPE - for Domino.Doc 
DK_QBIC_DSTYPE - for QBIC Image Search Engine 
DK_TS_DSTYPE - for TextMiner Text Search Engine 
DK_FED_DSTYPE - for federated datastore or any third-party vendor defined datastore type.

virtual DKString  datastoreType() const;

getEntity
Gets the parent entity definition object that this attribute belongs to. Returns a dkEntityDef object containing the entity definition.
virtual dkEntityDef* getEntity();

setEntity
Sets the parent entity definition object for this attribute.
virtual void setEntity(dkEntityDef* entityDef);

getEntityName
Gets the parent entity name of this attribute, that is the item type, or table, and so forth.
virtual DKString getEntityName();

setEntityName
Sets the parent entity name for this attribute.
virtual void setEntityName(const char* entityName);

getName
Gets the name of this attribute.
virtual DKString  getName();

setName
Sets the name for this attribute.
virtual void setName(const char* attrName);

getDescription
Gets the name of this attribute.
virtual DKString  getDescription();

setDescription
Sets the name for this attribute.
virtual void setDescription(const char* desc);

getType
Gets the type of this attribute.
virtual short getType();

setType
Sets the type for this attribute.
virtual void setType(short attrType);

getSize
Gets the display size for this attribute (applicable for String only).
virtual long getSize();

setSize
Sets the display size for this attribute (applicable for String only).
virtual void setSize(long displaySize);

getPrecision
Gets the precision value, if the attribute type is decimal.
virtual long getPrecision();

setPrecision
Sets the precision value, if the attribute type is decimal.
virtual void setPrecision(long precision);

getScale
Gets the scale value, if the attribute type is decimal.
virtual long getScale();

setScale
Sets the scale value, if the attribute type is decimal.
 virtual void setScale(long scale);

getMax
Gets the maximum value, if the attribute type is integer.
virtual long getMax();

setMax
Sets the maximum value, if the attribute type is integer.
virtual void setMax(long maxValue);

getMin
Gets the minimum value, if the attribute type is integer.
virtual long getMin();

setMin
Sets the minimum value, if the attribute type is integer.
virtual void setMin(long minValue);

getStringType
Gets the string type, if the attribute type is string. Returns the type of the string (either numeric, alphabetic, alphanumeric, and so forth). The valid value is one of the following constants:

DK_CM_ATTR_NONE
The string type is undefined.

DK_CM_ATTR_ALPHA
The string contains alphabetic characters only.

DK_CM_ATTR_ALPHANUM
The string contains alpha-numeric characters.

DK_CM_ATTR_ALPHANUM_EXT
The string contains alphanumeric and other special characters.

DK_CM_ATTR_NUMERIC
The string only contains numeric characters.

DK_CM_ATTR_OTHER
The string may follows application defined rules. The interpretation is left to the application.

virtual long getStringType();

setStringType
Gets the string type, if the attribute type is string.
virtual long getStringType();

isNullable
Returns TRUE if this attribute is nullable.
virtual DKBoolean isNullable();

setNullable
Sets the nullability of this attribute to either TRUE or FALSE This method is usually used when you are creating a new attribute to set its characteristics. Once the attribute is created, you can not change this property.
virtual void setNullable(DKBoolean nullable);

isUpdatable
Returns TRUE if this attribute is updatable.
virtual DKBoolean isUpdatable();

setUpdatable
Sets the updatability of this attribute to either TRUE or FALSE This method is usually used when you are creating a new attribute to set its characteristics. Once the attribute is created, you can not change this property.
virtual void setUpdatable(DKBoolean updatable);

isQueryable
Returns TRUE if this attribute is queryable. The default is TRUE.
virtual DKBoolean isQueryable();

setQueryable
Sets the queryability of this attribute to either TRUE or FALSE This method is usually used when you are creating a new attribute to set its characteristics. Once the attribute is created, you can not change this property.
virtual void setQueryable(DKBoolean queryable);

add
Adds this attribute definition to the persistent datastore. This attribute becomes a persistent part of the entity definition it belongs to.
virtual void add();

del
Deletes this attribute definition from the persistent datastore. This attribute is removed from the persistent entity definition it belongs to. The in memory copy of this attribute is not affected.
virtual void del(); 

isTextSearchable
Returns TRUE if this attribute is text searchable.
virtual DKBoolean isTextSearchable();

setTextSearchable
Sets the text searchability of this attribute to either TRUE or FALSE
virtual void setTextSearchable(DKBoolean textSearchable); 

getQualifiedName
Returns the attribute qualified name.
virtual DKString getQualifiedName ();

setQualifiedName
Sets the attribute qualified name.
virtual void setQualifiedName(const char* qualifiedName);

parsedQualifiedName
Returns the parsed qualified name.
 virtual DKString* parsedQualifiedName(const char* qualifiedName,   long& arraySize);  

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