getName()

Retrieves the name of an attribute.

Syntax

char * getName();
  

Return values

A character string that contains the name of the attribute.

Notes

You can use the getName() method to retrieve the name of an attribute.

Examples

// Get the business object definition for the business object
  BusinessObject *pBusObj = new BusinessObject ("Example");
  BusObjSpec *theSpec = pBusObj->getSpecFor();
  BOAttrType *theAttr;
   
  for (int i=0; i < theSpec->getAttributeCount(); i++)
  {
     // Determine Attribute Name
     theAttr = theSpec->getAttribute(i);
   
     // Set the attribute values to Fred
     pBusObj->setAttrValue(theAttr->getName(), "Fred"
     BOAttrType::STRING);
   
  }
  

See also

hasName()

Copyright IBM Corp. 1997, 2003