isKeyAttr()

Determines if an attribute is a part of the business object primary key, given the attribute's name or its position in the business object's attribute list.

Syntax

public boolean isKeyAttr(String attrName);
public boolean isKeyAttr(int position);

Parameters

attrName
Is the name of an attribute that is checked for participation in a key.

position
Is an integer that specifies the ordinal position of an attribute in the business object's attribute list.

Return values

Returns true if the attribute is a primary key, or part of the primary key, for the business object; otherwise, returns false.

Exceptions

AttributeNotFoundException
Thrown if the position or name specified is not valid for the definition of this business object.

See also

areAllPrimaryKeysTheSame(),, hasAnyActivePrimaryKey(),, hasAllKeys(),, hasAllPrimaryKeys(),, isForeignKeyAttr()

Copyright IBM Corp. 1997, 2004