| Both sides previous revision Previous revision Next revision | Previous revision |
| pr_methods:addreferences [2023/04/04 06:15] – ↷ Links adapted because of a move operation sean | pr_methods:addreferences [2023/05/08 06:29] (current) – sean |
|---|
| {{tag>Programmers_Reference Methods IExecutionEngine_Interface IExecutionEngine_Interface_Methods AddReferences}} | {{tag>Index Programmers_Reference Methods IExecutionEngine_Interface AddReferences}} |
| ====addReferences (IProcess, String, Long, String, EntityIdAndName [])==== | ====addReferences (IProcess, String, Long, String, EntityIdAndName [])==== |
| <code java>public void addReferences(IProcessparent, String refOwnerName, Long refOwnerId, String refOwnerAttr, EntityIdAndName [] refsToAdd) | <code java>public void addReferences(IProcessparent, String refOwnerName, Long refOwnerId, String refOwnerAttr, EntityIdAndName [] refsToAdd) |
| throws ServerTimeOutException, AccessDeniedException,ExecutionException;</code> | throws ServerTimeOutException, AccessDeniedException,ExecutionException;</code> |
| |
| This method adds the specified references to the specified instance of the business object. There are two ways references can be added to a business object. The instance of the object can be obtained using the call to the [[pr_methods:getentity|getEntity]] or [[pr_methods:getentities|getEntities]] methods and then references can be set using the [[pr_methods:setreferences|setReferences]] method of the [[progref:0300_add_custom_processes:0317_ientity_interface|IEntity]] interface. However, the [[pr_methods:setreferences|setReferences]] method requires that //all// references are set into the business object and therefore all the existing references must be obtained before adding the new ones. This is, of course, very inefficient. The addReferences method does not require that the existing references of the business object are retrieved and allows adding the specified references to the existing ones. | This method adds the specified references to the specified instance of the business object. There are two ways references can be added to a business object. The instance of the object can be obtained using the call to the [[pr_methods:getentity|getEntity]] or [[pr_methods:getentities|getEntities]] methods and then references can be set using the [[pr_methods:setreferences|setReferences]] method of the [[docs:3500:0300:0317|IEntity]] interface. However, the [[pr_methods:setreferences|setReferences]] method requires that //all// references are set into the business object and therefore all the existing references must be obtained before adding the new ones. This is, of course, very inefficient. The addReferences method does not require that the existing references of the business object are retrieved and allows adding the specified references to the existing ones. |
| |
| ===Parameters=== | ===Parameters=== |