Class EntityUtils
java.lang.Object
com.broadleafcommerce.billing.service.impl.EntityUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TfindByIdSilent(Supplier<T> supplier) A utility method to run a findById while silently handlingEntityMissingExceptionby returning nullstatic <I,O, C> List<O> findByIdUsingPartitioning(List<I> ids, Integer partitionSize, I pad, C contextInfo, BiFunction<List<I>, C, List<O>> baseFindByIds) Find records with given ids using partitioning to batch the requests.partitionWithPadding(List<T> fieldValues, Integer partitionSize, T pad) Partition the incoming list with the given padding.
-
Method Details
-
findByIdUsingPartitioning
public static <I,O, List<O> findByIdUsingPartitioningC> (List<I> ids, Integer partitionSize, I pad, @Nullable C contextInfo, BiFunction<List<I>, C, List<O>> baseFindByIds) Find records with given ids using partitioning to batch the requests. -
partitionWithPadding
public static <T> List<List<T>> partitionWithPadding(List<T> fieldValues, Integer partitionSize, T pad) Partition the incoming list with the given padding. -
findByIdSilent
A utility method to run a findById while silently handlingEntityMissingExceptionby returning null
-