Class OutboundSyncStateBuilder
- java.lang.Object
-
- de.hybris.platform.outboundsync.job.impl.OutboundSyncStateBuilder
-
- Direct Known Subclasses:
OutboundSyncState.Builder
public class OutboundSyncStateBuilder extends java.lang.ObjectA builder for creating immutableOutboundSyncState
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OutboundSyncStatebuild()static OutboundSyncStateBuilderfrom(@NotNull OutboundSyncState initialState)Creates a new instance of this builder by initializing its state to the provided outbound sync state.static OutboundSyncStateBuilderinitialOutboundSyncState()Creates initial outbound sync job state builder instance.OutboundSyncStateBuilderwithAborted(boolean aborted)OutboundSyncStateBuilderwithErrorCount(int errorCount)OutboundSyncStateBuilderwithStartTime(java.util.Date time)OutboundSyncStateBuilderwithSuccessCount(int successCount)OutboundSyncStateBuilderwithSystemicError(boolean systemicError)OutboundSyncStateBuilderwithTotalItems(java.lang.Integer cnt)OutboundSyncStateBuilderwithUnprocessedCount(int unprocessedCount)
-
-
-
Method Detail
-
initialOutboundSyncState
public static OutboundSyncStateBuilder initialOutboundSyncState()
Creates initial outbound sync job state builder instance.- Returns:
- new builder instance, which is initialized with the provided total number of items to be processed by the job and job start date, which is set to the current time.
-
from
public static OutboundSyncStateBuilder from(@NotNull @NotNull OutboundSyncState initialState)
Creates a new instance of this builder by initializing its state to the provided outbound sync state. Modifiable attributes can be then changed in the builder, but those attributes that never change will be carried over into the states created by this this builder.- Parameters:
initialState- another state to initialize this builder to- Returns:
- a new builder instance initialized to the provided state
-
withTotalItems
public OutboundSyncStateBuilder withTotalItems(java.lang.Integer cnt)
-
withSuccessCount
public OutboundSyncStateBuilder withSuccessCount(int successCount)
-
withErrorCount
public OutboundSyncStateBuilder withErrorCount(int errorCount)
-
withUnprocessedCount
public OutboundSyncStateBuilder withUnprocessedCount(int unprocessedCount)
-
withStartTime
public OutboundSyncStateBuilder withStartTime(java.util.Date time)
-
withAborted
public OutboundSyncStateBuilder withAborted(boolean aborted)
-
withSystemicError
public OutboundSyncStateBuilder withSystemicError(boolean systemicError)
-
build
public OutboundSyncState build()
-
-