IequalsKeys()

Compares this business object's key attribute values with those of the input business object.

Syntax

boolean IequalsKeys(IBusinessObject obj2);

Parameters

obj2
A business object to evaluate for the comparison.

Return Values

Returns true if the values of all key attributes are the same; otherwise, returns false.

Notes

The IequalsKeys() method performs a shallow comparison; that is, it does not compare the keys in child business objects.

Example

The following example compares key attributes of order2 with key attributes of order1, excluding the attributes of child business objects, if any.

boolean keyEqual = false;
IBusinessObject order1 =
     accessSession.IcreateBusinessObjectwithVerb("salesorder",
     "retrieve");
IBusinessObject order2 =
     accessSession.IcreateBusinessObjectwithVerb("salesorder",
     "retrieve");
keyEqual = order1.IequalsKeys(order2);
if(keyEqual)
     System.out.println("order1 is the same as order2")
else
     System.out.println("order1 is not the same as order2");

Copyright IBM Corp. 1997, 2004