EMMA Coverage Report (generated Tue May 06 07:28:24 PDT 2008)
[all classes][org.springframework.batch.repeat.policy]

COVERAGE SUMMARY FOR SOURCE FILE [DefaultResultCompletionPolicy.java]

nameclass, %method, %block, %line, %
DefaultResultCompletionPolicy.java100% (1/1)100% (3/3)100% (14/14)100% (3/3)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DefaultResultCompletionPolicy100% (1/1)100% (3/3)100% (14/14)100% (3/3)
DefaultResultCompletionPolicy (): void 100% (1/1)100% (3/3)100% (1/1)
isComplete (RepeatContext): boolean 100% (1/1)100% (2/2)100% (1/1)
isComplete (RepeatContext, ExitStatus): boolean 100% (1/1)100% (9/9)100% (1/1)

1/*
2 * Copyright 2006-2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17package org.springframework.batch.repeat.policy;
18 
19import org.springframework.batch.repeat.CompletionPolicy;
20import org.springframework.batch.repeat.ExitStatus;
21import org.springframework.batch.repeat.RepeatContext;
22 
23/**
24 * Very simple {@link CompletionPolicy} that bases its decision on the result of
25 * a batch operation. If the result is null or not continuable according to the
26 * {@link ExitStatus} the batch is complete, otherwise not.
27 * 
28 * @author Dave Syer
29 * 
30 */
31public class DefaultResultCompletionPolicy extends CompletionPolicySupport {
32 
33        /**
34         * True if the result is null, or a {@link ExitStatus} indicating
35         * completion.
36         * 
37         * @see org.springframework.batch.repeat.CompletionPolicy#isComplete(org.springframework.batch.repeat.RepeatContext,
38         *      ExitStatus)
39         */
40        public boolean isComplete(RepeatContext context, ExitStatus result) {
41                return (result == null || !result.isContinuable());
42        }
43 
44        /**
45         * Always false.
46         * 
47         * @see org.springframework.batch.repeat.CompletionPolicy#isComplete(org.springframework.batch.repeat.RepeatContext)
48         */
49        public boolean isComplete(RepeatContext context) {
50                return false;
51        }
52 
53}

[all classes][org.springframework.batch.repeat.policy]
EMMA 2.0.5312 (C) Vladimir Roubtsov