org.springframework.batch.repeat.policy

## Class DefaultResultCompletionPolicy

- java.lang.Object
- - org.springframework.batch.repeat.policy.CompletionPolicySupport
  - - org.springframework.batch.repeat.policy.DefaultResultCompletionPolicy

- All Implemented Interfaces:
    CompletionPolicy
  Direct Known Subclasses:
    CountingCompletionPolicy, SimpleCompletionPolicy

      public class DefaultResultCompletionPolicy
      extends CompletionPolicySupport

  Very simple `CompletionPolicy` that bases its decision on the result of a batch operation. If the result is null or not continuable according to the `RepeatStatus` the batch is complete, otherwise not.
  Author:
    Dave Syer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultResultCompletionPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isComplete(RepeatContext context)` Always false.
    `boolean` | `isComplete(RepeatContext context, RepeatStatus result)` True if the result is null, or a `RepeatStatus` indicating completion.

    - ### Methods inherited from class org.springframework.batch.repeat.policy.CompletionPolicySupport

      `start, update`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultResultCompletionPolicy

          public DefaultResultCompletionPolicy()

  - ### Method Detail

    - #### isComplete

          public boolean isComplete(RepeatContext context,
                                    RepeatStatus result)

      True if the result is null, or a `RepeatStatus` indicating completion.
      Specified by:
        `isComplete` in interface `CompletionPolicy`
      Overrides:
        `isComplete` in class `CompletionPolicySupport`
      Parameters:
        `context` - the current batch context.
        `result` - the result of the latest batch item processing.
      Returns:
        true if the batch should terminate.
      See Also:
        `CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext, RepeatStatus)`

    - #### isComplete

          public boolean isComplete(RepeatContext context)

      Always false.
      Specified by:
        `isComplete` in interface `CompletionPolicy`
      Overrides:
        `isComplete` in class `CompletionPolicySupport`
      Parameters:
        `context` - the current batch context.
      Returns:
        true if the batch should terminate.
      See Also:
        `CompletionPolicy.isComplete(org.springframework.batch.repeat.RepeatContext)`