Class IncrementalDataFeedEntityUpdateRecord

java.lang.Object
com.broadleafcommerce.datafeed.domain.IncrementalDataFeedEntityUpdateRecord
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class IncrementalDataFeedEntityUpdateRecord extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
For each IncrementalDataFeedEntityUpdateEvent that is received, an IncrementalDataFeedEntityUpdateRecord record will be created for each DataFeedProcess of type DefaultDataFeedProcessTypes.PARTIAL_UPDATE who may be interested in processing it. This means each DataFeedProcess will effectively have its own 'queue' of update events that it can process whenever it is executed.

Generally speaking, the expectation is for the DataFeedProcess to be executed at some regular interval and handle any queued IncrementalDataFeedEntityUpdateRecords in bulk.

Admin users should almost never be responsible for making direct CRUD requests on this entity. The system should be in charge of managing these records.

See Also:
  • Constructor Details

    • IncrementalDataFeedEntityUpdateRecord

      public IncrementalDataFeedEntityUpdateRecord()
  • Method Details

    • getId

      public String getId()
      The context ID of this event record.
      Returns:
      the id of this event record
    • getDataFeedProcessId

      public String getDataFeedProcessId()
      The DataFeedProcess.getId() of the DataFeedProcess which this event record was created for.
      Returns:
      the ID of the data feed process this event record is for
    • getDataFeedProcessExecutionId

      @Nullable public String getDataFeedProcessExecutionId()
      This will be null until a DataFeedProcessExecution is started for the parent getDataFeedProcessId() and this event record is marked as part of that execution.
      Returns:
      the DataFeedProcessExecution.getId() of the execution that is processing this event record, else null if this event record is still pending processing
    • getAffectedProductReferenceType

      public String getAffectedProductReferenceType()
      Should contain a value from DefaultIncrementalEventProductReferenceTypes describing the type of product reference in getAffectedProductReferenceValue().

      Different services may use different mechanisms to reference products, which is why this is necessary.

      Returns:
      the type of product reference in getAffectedProductReferenceValue()
      See Also:
    • getAffectedProductReferenceValue

      public String getAffectedProductReferenceValue()
      The reference key value of the product affected by this entity update event record.
      Returns:
      the reference key value of the product affected by this entity update event record
      See Also:
    • getOriginalEventTime

      public Instant getOriginalEventTime()
      Notification events from other services should include timestamps describing when the actual update occurred, and we record it here.
      Returns:
      the timestamp describing when the actual update event occurred
      See Also:
    • getEventReceivedTime

      public Instant getEventReceivedTime()
      The timestamp when the entity update notification message was actually received by data feed services.
      Returns:
      the timestamp when the entity update notification message was actually received by data feed services
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of this event record.
      Parameters:
      id - the id of this event record
    • setDataFeedProcessId

      public void setDataFeedProcessId(String dataFeedProcessId)
      The DataFeedProcess.getId() of the DataFeedProcess which this event record was created for.
      Parameters:
      dataFeedProcessId - the ID of the data feed process this event record is for
    • setDataFeedProcessExecutionId

      public void setDataFeedProcessExecutionId(@Nullable String dataFeedProcessExecutionId)
      This will be null until a DataFeedProcessExecution is started for the parent getDataFeedProcessId() and this event record is marked as part of that execution.
      Parameters:
      dataFeedProcessExecutionId - the DataFeedProcessExecution.getId() of the execution that is processing this event record, else null if this event record is still pending processing
    • setAffectedProductReferenceType

      public void setAffectedProductReferenceType(String affectedProductReferenceType)
      Should contain a value from DefaultIncrementalEventProductReferenceTypes describing the type of product reference in getAffectedProductReferenceValue().

      Different services may use different mechanisms to reference products, which is why this is necessary.

      Parameters:
      affectedProductReferenceType - the type of product reference in getAffectedProductReferenceValue()
      See Also:
    • setAffectedProductReferenceValue

      public void setAffectedProductReferenceValue(String affectedProductReferenceValue)
      The reference key value of the product affected by this entity update event record.
      Parameters:
      affectedProductReferenceValue - the reference key value of the product affected by this entity update event record
      See Also:
    • setOriginalEventTime

      public void setOriginalEventTime(Instant originalEventTime)
      Notification events from other services should include timestamps describing when the actual update occurred, and we record it here.
      Parameters:
      originalEventTime - the timestamp describing when the actual update event occurred
      See Also:
    • setEventReceivedTime

      public void setEventReceivedTime(Instant eventReceivedTime)
      The timestamp when the entity update notification message was actually received by data feed services.
      Parameters:
      eventReceivedTime - the timestamp when the entity update notification message was actually received by data feed services
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object