Class UserMapper

java.lang.Object
com.bonitasoft.processbuilder.mapper.UserMapper

public final class UserMapper extends Object
Utility class for converting and mapping collections of Bonita User entities to various data structures such as identifier lists.

This mapper provides type-safe conversion methods that follow the Stream API patterns for efficient and readable data transformations. It is designed to be extensible by adding more mapping methods as needed.

This class is marked as final and contains only static utility methods, following the utility class pattern. It should not be instantiated or subclassed.

Since:
1.0
Author:
Bonitasoft
See Also:
  • User
  • Method Details

    • toLongIds

      public static List<Long> toLongIds(List<org.bonitasoft.engine.identity.User> users)
      Converts a list of Bonita User objects into a list containing only their Long identifiers. This method utilizes the Java Stream API for efficient and readable conversion.
      Parameters:
      users - The list of User objects (org.bonitasoft.engine.identity.User) to process.
      Returns:
      A new List of Longs, where each Long is the ID of a user from the input list. Returns an empty list if the input list is null or empty.