Retrieves only the relationship instance IDs for zero or more relationship instances which contain a given participant instance.
Syntax
int[] retrieveInstances(String relDefName, String partDefName, BusObj partData) int[] retrieveInstances(String relDefName, String partDefName, String partData) int[] retrieveInstances(String relDefName, String partDefName, long partData) int[] retrieveInstances(String relDefName, String partDefName, int partData) int[] retrieveInstances(String relDefName, String partDefName, double partData) int[] retrieveInstances(String relDefName, String partDefName, float partData) int[] retrieveInstances(String relDefName, String partDefName, boolean partData) int[] retrieveInstances(String relDefName, String[] partDefList, BusObj partData) int[] retrieveInstances(String relDefName, String[] partDefList, String partData) int[] retrieveInstances(String relDefName, String[] partDefList, long partData) int[] retrieveInstances(String relDefName, String[] partDefList, int partData) int[] retrieveInstances(String relDefName, String[] partDefList, double partData) int[] retrieveInstances(String relDefName, String[] partDefList, float partData) int[] retrieveInstances(String relDefName, String[] partDefList, boolean partData) int[] retrieveInstances(String relDefName, BusObj partData) int[] retrieveInstances(String relDefName, String partData) int[] retrieveInstances(String relDefName, long partData) int[] retrieveInstances(String relDefName, int partData) int[] retrieveInstances(String relDefName, double partData) int[] retrieveInstances(String relDefName, float partData) int[] retrieveInstances(String relDefName, boolean partData)
Parameters
Return values
Returns an array of integers that are the instance IDs of relationships containing the participant.
Exceptions
RelationshipRuntimeException
Notes
The retrieveInstances() method implements a lookup relationship in an inbound map. It obtains the relationship instance IDs from the relationship table that are associated with the specified participant instances (partDefList and partData or only partData). The method retrieves only those attributes that are associated with the relDefName relationship definition. It does not fill in any of the other attributes in the business object. Attributes associated with the relationship definition typically are the key attributes and any others that you explicitly select. See Creating relationship definitions for more information on relationship definitions.
If retrieveInstances() does not find a relationship instance for the specified data, it does not raise an exception. Absence of data in the relationship table does not mean that the lookup was performed improperly. If you want to raise an exception when retrieveInstances() does not find a value, you must check the value of the instance IDs that the method returns and explicitly raise a MapFailureException if the value is null.
The retrieveInstances() method is a class method declared as static. You can call this method from an existing relationship instance or by referencing the Relationship class.
See also
addMyChildren(), deactivateParticipant(), deleteParticipant(), retrieveParticipants()