setAttrType()

Sets the type of the attribute.

Syntax

public void setAttrType(int type);
 
public void setAttrType(int type, String typeName);
 

Parameters

type
Is the type of the attribute, represented as one of the attribute-type constants:
BusObjAttrType.BOOLEAN
 
  
 BusObjAttrType.CIPHERTEXT
 
  
 BusObjAttrType.DATE
 
  
 BusObjAttrType.DOUBLE
 
  
 BusObjAttrType.FLOAT
 
  
 BusObjAttrType.INTEGER
 
  
 BusObjAttrType.LONGTEXT
 
  
 BusObjAttrType.OBJECT
 
  
 BusObjAttrType.STRING
 
 
typeName
Is the name of the business object for an attribute that represents a child business object or array of child business objects; in this case, the type of the attribute is the same as the type of the child business object and the type value is OBJECT.

Return values

None.

Exceptions

BusObjInvalidAttrException

Thrown if the type is invalid; that is, it is not one of the values represented by the attribute-type constants.

Notes

The setAttrType() method provides the following forms:

See also

getAttrType(), getAttrTypeName()

For related reference information, see BusObjAttrType interface and ODKException class.

Copyright IBM Corp. 1997, 2003