EMMA Coverage Report (generated Thu May 22 12:08:10 CDT 2014)
[all classes][org.springframework.batch.core.job.builder]

COVERAGE SUMMARY FOR SOURCE FILE [JobFlowBuilder.java]

nameclass, %method, %block, %line, %
JobFlowBuilder.java100% (1/1)60%  (3/5)64%  (35/55)61%  (11/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JobFlowBuilder100% (1/1)60%  (3/5)64%  (35/55)61%  (11/18)
JobFlowBuilder (FlowJobBuilder): void 0%   (0/1)0%   (0/8)0%   (0/3)
JobFlowBuilder (FlowJobBuilder, JobExecutionDecider): void 0%   (0/1)0%   (0/12)0%   (0/4)
JobFlowBuilder (FlowJobBuilder, Flow): void 100% (1/1)100% (12/12)100% (4/4)
JobFlowBuilder (FlowJobBuilder, Step): void 100% (1/1)100% (12/12)100% (4/4)
build (): FlowJobBuilder 100% (1/1)100% (11/11)100% (3/3)

1/*
2 * Copyright 2012-2013 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 */
16package org.springframework.batch.core.job.builder;
17 
18import org.springframework.batch.core.Step;
19import org.springframework.batch.core.job.flow.Flow;
20import org.springframework.batch.core.job.flow.JobExecutionDecider;
21 
22/**
23 * @author Dave Syer
24 *
25 */
26public class JobFlowBuilder extends FlowBuilder<FlowJobBuilder> {
27 
28        private FlowJobBuilder parent;
29 
30        public JobFlowBuilder(FlowJobBuilder parent) {
31                super(parent.getName());
32                this.parent = parent;
33        }
34 
35        public JobFlowBuilder(FlowJobBuilder parent, Step step) {
36                super(parent.getName());
37                this.parent = parent;
38                start(step);
39        }
40 
41        public JobFlowBuilder(FlowJobBuilder parent, JobExecutionDecider decider) {
42                super(parent.getName());
43                this.parent = parent;
44                start(decider);
45        }
46 
47        public JobFlowBuilder(FlowJobBuilder parent, Flow flow) {
48                super(parent.getName());
49                this.parent = parent;
50                start(flow);
51        }
52 
53        /**
54         * Build a flow and inject it into the parent builder. The parent builder is then returned so it can be enhanced
55         * before building an actual job.  Normally called explicitly via {@link #end()}.
56         *
57         * @see org.springframework.batch.core.job.builder.FlowBuilder#build()
58         */
59        @Override
60        public FlowJobBuilder build() {
61                Flow flow = flow();
62                parent.flow(flow);
63                return parent;
64        }
65 
66}

[all classes][org.springframework.batch.core.job.builder]
EMMA 2.0.5312 (C) Vladimir Roubtsov