Class ConversionUtils.ConversionResponse<T>
java.lang.Object
com.broadleafcommerce.common.dataimport.util.ConversionUtils.ConversionResponse<T>
- Enclosing class:
- ConversionUtils
A response indicating the results of attempting to convert a
BatchRecord to a target
type.-
Constructor Summary
ConstructorsConstructorDescriptionConversionResponse(boolean successful, T converted, String errorMessage) ConversionResponse(boolean successful, T converted, String errorMessage, com.broadleafcommerce.data.tracking.core.type.OperationType operationType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <T> ConversionUtils.ConversionResponse<T>Ifsuccessfulis true, this field will hold the successfully converted value.Ifsuccessfulis false, this field will hold the error message describing the problem.com.broadleafcommerce.data.tracking.core.type.OperationTypeIn many cases, the converter itself may be responsible for determining theOperationTypethat needs to be performed for the given entity in the import.inthashCode()booleanTrue if the conversion happened successfully, false otherwise.static <T> ConversionUtils.ConversionResponse<T>success(T converted) static <T> ConversionUtils.ConversionResponse<T>success(T converted, com.broadleafcommerce.data.tracking.core.type.OperationType operation) toString()
-
Constructor Details
-
ConversionResponse
-
ConversionResponse
-
-
Method Details
-
success
-
success
public static <T> ConversionUtils.ConversionResponse<T> success(T converted, com.broadleafcommerce.data.tracking.core.type.OperationType operation) -
error
-
isSuccessful
public boolean isSuccessful()True if the conversion happened successfully, false otherwise. -
getConverted
Ifsuccessfulis true, this field will hold the successfully converted value. Ifsuccessfulis false, this value will be null. -
getErrorMessage
Ifsuccessfulis false, this field will hold the error message describing the problem. Ifsuccessfulis true, this value will be null. -
getOperationType
@Nullable public com.broadleafcommerce.data.tracking.core.type.OperationType getOperationType()In many cases, the converter itself may be responsible for determining theOperationTypethat needs to be performed for the given entity in the import. This field allows converters to pass this information back to the caller. -
equals
-
hashCode
public int hashCode() -
toString
-