Table 71 summarizes the member methods of the BusObjAttr
class.
Member method | Description | Page |
---|---|---|
BusObjAttr() | Creates a business-object-attribute object. | BusObjAttr() |
getAppText() | Retrieves the application-specific information of an attribute. | getAppText() |
getAttrType() | Retrieves the type of a simple attribute. | getAttrType() |
getAttrTypeName() | Retrieves the type of the child business object as the type of an attribute, for an attribute that represents a child business object or an array of child business objects. | getAttrTypeName() |
getBOVersion() | Retrieves the version number of the business object definition, for an attribute that represents a child business object or an array of child business objects. | getBOVersion() |
getCardinality() | Retrieves the cardinality of the attribute, for an attribute that represents a child business object or an array of child business objects. | getCardinality() |
getComments() | Retrieves the comments associated with the attribute. | getComments() |
getDefault() | Retrieves the default value for an attribute. | getDefault() |
getMaxLength() | Retrieves the maximum length for this attribute. | getMaxLength() |
getName() | Retrieves the name of an attribute. | getName() |
getRelationType() | Retrieves the attribute's relationship type, which is containment for an attribute that represents a child business object or an array of child business objects. | getRelationType() |
isForeignKey() | Determines whether this attribute is part of the business object's foreign key. | isForeignKey() |
isKey() | Determines whether this attribute is part of the business object's key. | isKey() |
isRequiredKey() | Determines whether this attribute is part of the business object's required key. | isRequiredKey() |
isRequiredServerBound() | Determines whether an attribute is required when the business object represents a triggering event. | isRequiredServerBound() |
isSimpleType() | Determines whether an attribute is of a simple type (such as String, Integer, or Float) or whether it represents a child business object or an array of child business objects. | isSimpleType() |
setAppText() | Sets the application-specific information of an attribute. | setAppText() |
setAttrType() | Sets the type of the attribute. | setAttrType() |
setBOVersion() | Sets the version of the child business object or objects that is represented by an attribute, for an attribute that represents a child business object or an array of child business objects. | setBOVersion() |
setCardinality() | Sets the cardinality of the attribute, for an attribute that represents a child business object or an array of child business objects. | setCardinality() |
setComments() | Sets the comments associated with the attribute. | setComments() |
setDefault() | Sets the default value for an attribute. | setDefault() |
setIsForeignKey() | Sets the attribute to a boolean value that indicates whether the attribute is part of a foreign key. | setIsForeignKey() |
setIsKey() | Sets the attribute to a boolean value that indicates whether the attribute is part of a key. | setIsKey() |
setIsRequiredKey() | Sets the attribute to a boolean value that indicates whether the attribute is part of the business object's required key. | setIsRequiredKey() |
setMaxLength() | Sets the maximum length for an attribute. | setMaxLength() |
setName() | Sets the name of an attribute. | setName() |
setRelationType() | Sets the relationship type of an attribute to containment, for an attribute that represents a child business object or an array of child business objects. | setRelationType() |
Creates a new business-object-attribute object.
Syntax
public BusObjAttr(String name, int type);
public BusObjAttr(String name, int type, String typeName);
public BusObjAttr(String name, int type, String typeName, boolean isKey, boolean isForeignKey, boolean isReqd, String appSpecInfo, int maxLen String defaultValue, String BOversion, String cardinality, String relType, boolean isReqdServerBound, String comments);
Parameters
Return values
The newly instantiated BusObjAttr object.
Retrieves the application-specific information of an attribute.
Syntax
public String getAppText();
Parameters
None.
Return values
A String that contains the application-specific information of an attribute.
See also
Retrieves the type of an attribute.
Syntax
public int getAttrType();
Parameters
None.
Return values
An integer that represents the type of the attribute. Compare this integer value with the one of the attribute-type constants:
See also
getAttrTypeName(), setAttrType()
Retrieves the name of the attribute's data type.
Syntax
public String getAttrTypeName();
Parameters
None.
Return values
A String that contains the name of the business object definition that is the type of the child business object (when the attribute contains a child business object).
Notes
The getAttrTypeName() method retrieves the name of the attribute type for a child business object. When an attribute represents a child business object (or an array of child business objects), its attribute type isBusObjAttrType.OBJECT and its attribute type name is the name of the business object definition for the child business object.
See also
Retrieves the version number of the business object definition, for an attribute that represents a child business object or an array of child business objects.
Syntax
public String getBOVersion();
Parameters
None.
Return values
A String that contains the version number of the child business object definition represented by the attribute.
See also
Retrieves the cardinality of the attribute, for an attribute that represents a child business object or an array of child business objects.
Syntax
public String getCardinality();
Parameters
None.
Return values
A String that contains the cardinality of an attribute that represents a child business object or array of child business objects. Compare this string value with the following cardinality constants:
See also
Retrieves the comments associated with the attribute.
Syntax
public String getComments();
Parameters
None.
Return values
A String that contains the comments for an attribute.
Retrieves the default value for an attribute.
Syntax
public String getDefault();
Parameters
None.
Return values
A String that contains the default value for an attribute.
See also
Retrieves the maximum length for this attribute.
Syntax
public int getMaxLength();
Parameters
None.
Return values
An integer that represents the maximum length of an attribute's value.
See also
Retrieves the name of an attribute.
Syntax
public String getName();
Parameters
None.
Return values
A String that contains the name of an attribute.
See also
Retrieves the attribute's relationship type, which is containment for an attribute that represents a child business object or an array of child business objects.
Syntax
public String getRelationType();
Parameters
None.
Return values
A String that contains the relationship type ("containment") of an attribute that represents a child business object or an array of child business objects.
See also
Determines whether this attribute is part of the business object's foreign key.
Syntax
public boolean isForeignKey();
Parameters
None.
Return values
Returns true, if the attribute is a foreign key or part of the foreign key; otherwise, returns false.
See also
Determines whether this attribute is part of the business object's primary key.
Syntax
public boolean isKey();
Parameters
None.
Return values
Returns true, if the attribute is a key or part of the key; otherwise, returns false.
See also
Determines whether this attribute is part of the business object's required key.
Syntax
public boolean isRequiredKey();
Parameters
None.
Return values
Returns true, if the attribute is a required key or part of a required key; otherwise, returns false.
See also
Determines whether an attribute is required when the business object represents a triggering event.
Syntax
public boolean isRequiredServerBound();
Parameters
None.
Return values
Returns true, if the attribute is required when the business object represents a collaboration object request; otherwise, returns false.
Determines whether an attribute is of a simple type (such as String, Integer, or Float) or whether it represents a child business object or an array of child business objects.
Syntax
public boolean isSimpleType();
Parameters
None.
Return values
Returns true, if the attribute is of a simple type; otherwise, returns false.
See also
Sets the application-specific information of an attribute.
Syntax
public void setAppText(String appInfo);
Parameters
Return values
None.
See also
Sets the type of the attribute.
Syntax
public void setAttrType(int type);
public void setAttrType(int type, String typeName);
Parameters
BusObjAttrType.BOOLEAN BusObjAttrType.CIPHERTEXT BusObjAttrType.DATE BusObjAttrType.DOUBLE BusObjAttrType.FLOAT BusObjAttrType.INTEGER BusObjAttrType.LONGTEXT BusObjAttrType.OBJECT BusObjAttrType.STRING
Return values
None.
Exceptions
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.
Sets the version number of the business object definition, for an attribute that represents a child business object or an array of child business objects.
Syntax
public void setBOVersion(String version);
Parameters
Return values
None.
See also
Sets the cardinality of the attribute, for an attribute that represents a child business object or an array of child business objects.
Syntax
public void setCardinality(String cardinality);
Parameters
BusObjAttr.CARD_SINGLE BusObjAttr.CARD_MULTIPLE
Return values
None.
Exceptions
Thrown if the cardinality is not a valid; that is, it does not contain a valid cardinality constant.
See also
Sets the comments associated with an attribute.
Syntax
public void setComments(String comment);
Parameters
Return values
None.
See also
Sets the default value for an attribute.
Syntax
public void setDefault(String defaultValue);
Parameters
Return values
None.
See also
Sets the attribute property that indicates whether the attribute is part of a foreign key.
Syntax
public void setIsForeignKey(boolean fKey);
Parameters
Return values
None.
See also
Sets an attribute property that indicates whether the attribute is part of a primary key.
Syntax
public void setIsKey(boolean key);
Parameters
Return values
None.
See also
Sets the attribute to a boolean value that indicates whether the attribute is part of the business object's required key.
Syntax
public void setIsRequiredKey(boolean isReqd);
Parameters
Return values
None.
See also
Sets the maximum length for an attribute.
Syntax
public void setMaxLength(int maxLength);
Parameters
Return values
None.
Exceptions
Thrown if the maximum length is maxLength < 0 or maxLength > 2^31-1
See also
Sets the name of an attribute.
Syntax
public void setName(String name);
Parameters
Return values
None.
See also
Sets the relationship type of an attribute to containment, for an attribute that represents a child business object or an array of child business objects.
Syntax
public void setRelationType(String relType);
Parameters
Return values
None.
See also