Class BulkRemoveResult<M extends MorpheusModel>

java.lang.Object
com.morpheusdata.core.BulkRemoveResult<M>
Type Parameters:
M - the MorpheusModel class this object represents

public class BulkRemoveResult<M extends MorpheusModel> extends Object
A serializable representation of the results of bulk remove Model objects for persistence
Since:
0.15.2
  • Field Details

    • errorCode

      protected String errorCode
      An i18n Property key representing a String localized error message.
  • Constructor Details

    • BulkRemoveResult

      public BulkRemoveResult(String msg, String errorCode, List<M> failedItems)
  • Method Details

    • getSuccess

      public Boolean getSuccess()
      A helper method for determining whether the operation was fully successful.
      Returns:
      the success state of the operation
    • hasFailures

      public Boolean hasFailures()
      A helper method for checking if there were failed items as part of the operation.
      Returns:
      the failure state of the operation
    • getErrorCode

      public String getErrorCode()
      Gets an i18n Property key representing a String localized error message.
      Returns:
      An i18n Property key representing a String localized error message.
    • getFailedItems

      public List<M> getFailedItems()
      Gets a collection of the failed MorpheusModel objects.
      Returns:
      A List of MorpheusModel objects that failed ot persist.
    • getMsg

      public String getMsg()
      Returns an optional message string containing more error details in a humange readable form. Ideally an errorCode would be used for localization.
      Returns:
      an optional error message