hasAnyActivePrimaryKey()

Determines if the current business object has values for any primary- key attribute.

Syntax

public final boolean hasAnyActivePrimaryKey();
 

Parameters

None.

Return values

Returns true if the current business object has a value for any primary key attribute; otherwise returns false.

Exceptions

WrongAttributeException
Thrown if the key is set on a multiple cardinality attribute.

AttributeNotFoundException
Thrown if a key attribute cannot be found within the business object definition.

Notes

The hasAnyActivePrimaryKey() method checks if at least one primary key has been populated. This method is typically used to identify the row for deletes.

See also

areAllPrimaryKeysTheSame(), hasAllKeys(), hasAllPrimaryKeys()

Copyright IBM Corp. 1997, 2003