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:
- The first form allows you to set the attribute type for a
simple attribute, specified as an attribute-type constant that is
defined in the BusObjAttrType class.
- The second form allows you to set the attribute type for a
child business object or an array of child business objects. This
form allows you to specify the attribute type (as the
attribute-type constant BusObjAttrType.OBJECT) and the
name of the business object definition for the child business
object.
See also
getAttrType(),
getAttrTypeName()
For related reference information, see BusObjAttrType interface and
ODKException class.
