Interface AlternateLifecycleSharedCodeAuditSummaryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

Type Parameters:
D - The repository entity type
All Known Subinterfaces:
JpaSharedCodeAuditSummaryRepository<D>, SharedCodeAuditSummaryRepository<D>
All Known Implementing Classes:
JpaAlternateLifecycleSharedCodeAuditSummaryRepository

public interface AlternateLifecycleSharedCodeAuditSummaryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Provides an alternate path for handling persistence for SharedCodeAuditSummary. Implementations should safely handle creation and update with guaranteed accurate count incrementing under load.
  • Method Details

    • createOrUpdateAndIncrement

      @Deprecated(since="3.1.0-GA", forRemoval=true) @Policy(operationTypes={CREATE,UPDATE}) D createOrUpdateAndIncrement(String offerCodeId, String offerCode, @Nullable javax.money.MonetaryAmount totalSavings, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create an instance of SharedCodeAuditSummary, or atomically update an existing one. This flow also will not end up creating duplicate summaries for the same code.
      Parameters:
      offerCodeId - The id of the related code
      offerCode - The string value of the related code
      totalSavings - The total savings applied to record for this code
      contextInfo - Any tenant related information for the request context
      Returns:
      The created or updated summary
    • createOrUpdateAndIncrement

      @Policy(operationTypes={CREATE,UPDATE}) D createOrUpdateAndIncrement(String offerCodeId, String offerCode, @Nullable String campaignId, @Nullable javax.money.MonetaryAmount totalSavings, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Create an instance of SharedCodeAuditSummary, or atomically update an existing one. This flow also will not end up creating duplicate summaries for the same code.
      Parameters:
      offerCodeId - The id of the related code
      offerCode - The string value of the related code
      campaignId - The id of the related campaign if any
      totalSavings - The total savings applied to record for this code
      contextInfo - Any tenant related information for the request context
      Returns:
      The created or updated summary