Class MembershipUtils

java.lang.Object
com.bonitasoft.processbuilder.extension.MembershipUtils

public class MembershipUtils extends Object
Utility class for constructing composite keys representing a specific Group and Role membership combination. This key is used primarily for efficient querying in the Business Data Model (BDM).
  • Constructor Details

    • MembershipUtils

      public MembershipUtils()
  • Method Details

    • buildMembershipKey

      public static String buildMembershipKey(Long groupId, Long roleId)
      Constructs a composite membership key (Group ID$Role ID) if both IDs are present.

      The key is formed by concatenating the groupId and roleId using a dollar sign ($) as a separator. If either ID is null, an empty string is returned. This avoids creating partial or invalid keys in the BDM.

      Parameters:
      groupId - The ID of the group (can be null).
      roleId - The ID of the role (can be null).
      Returns:
      The concatenated membership key (e.g., "101$201"), or an empty string ("") if either ID is null.