isType()

Determines whether an attribute has the integer data type that you specify.

Syntax

unsigned char isType(int type);
  

Parameters

type [in]
is one of the following attribute-type constants, which specifies an attribute data type:
BOAttrType::OBJECT
  
   
  BOAttrType::BOOLEAN
  
   
  BOAttrType::INTEGER
  
   
  BOAttrType::FLOAT
  
   
  BOAttrType::DOUBLE
  
   
  BOAttrType::STRING
  
   
  BOAttrType::DATE
  
   
  BOAttrType::LONGTEXT
  
  

Notes

You can use the isType() method to find an attribute of a certain data type in a business object definition. If you specify an invalid data type, the isType() method returns FALSE.

Examples

char *cp = NULL;
   
  if(getTheSpec()->getAttribute(name)->isType(BOAttrType::STRING))
  {
     cp = new char[strlen(newval)+1];
     strcpy(cp, newval);
   
     Values[getTheSpec()->getAttributeIndex(name)] = cp;
  }
  

See also

getTypeNum()

Copyright IBM Corp. 1997, 2003