Class ReadRecordsResponse<P>
- java.lang.Object
-
- com.broadleafcommerce.common.dataexport.service.ReadRecordsResponse<P>
-
- Type Parameters:
P- the type of the records that will be read
public final class ReadRecordsResponse<P> extends Object
A response returned byExportProcessor.readRecordsToProcess(Export)indicating the results of attempting to read all of the records to process in an export.- Author:
- Samarth Dhruva (samarthd)
- See Also:
ExportProcessor.readRecordsToProcess(Export)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static <P> ReadRecordsResponse<P>failure(String errorMessage)StringgetErrorMessage()Ifsuccessfulis false, then this should contain a description of the error encountered when attempting to read the records.Stream<P>getRecords()Ifsuccessfulis true, then this should contain all of the records in the data store that should be processed in the update, as described byExportProcessor.readRecordsToProcess(Export).inthashCode()booleanisSuccessful()True if the records were read successfully, false otherwise.static <P> ReadRecordsResponse<P>success(Stream<P> records)StringtoString()
-
-
-
Method Detail
-
success
public static <P> ReadRecordsResponse<P> success(Stream<P> records)
-
failure
public static <P> ReadRecordsResponse<P> failure(String errorMessage)
-
isSuccessful
public boolean isSuccessful()
True if the records were read successfully, false otherwise.
-
getRecords
public Stream<P> getRecords()
Ifsuccessfulis true, then this should contain all of the records in the data store that should be processed in the update, as described byExportProcessor.readRecordsToProcess(Export).
-
getErrorMessage
public String getErrorMessage()
Ifsuccessfulis false, then this should contain a description of the error encountered when attempting to read the records. This will be used byExportManagerand set on the correspondingExport.
-
-