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 boolean
equals(Object o)
static <P> ReadRecordsResponse<P>
failure(String errorMessage)
String
getErrorMessage()
Ifsuccessful
is false, then this should contain a description of the error encountered when attempting to read the records.Stream<P>
getRecords()
Ifsuccessful
is 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)
.int
hashCode()
boolean
isSuccessful()
True if the records were read successfully, false otherwise.static <P> ReadRecordsResponse<P>
success(Stream<P> records)
String
toString()
-
-
-
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()
Ifsuccessful
is 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()
Ifsuccessful
is false, then this should contain a description of the error encountered when attempting to read the records. This will be used byExportManager
and set on the correspondingExport
.
-
-