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

COVERAGE SUMMARY FOR SOURCE FILE [JobInstance.java]

nameclass, %method, %block, %line, %
JobInstance.java100% (1/1)100% (3/3)100% (27/27)100% (6/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JobInstance100% (1/1)100% (3/3)100% (27/27)100% (6/6)
JobInstance (Long, String): void 100% (1/1)100% (9/9)100% (4/4)
getJobName (): String 100% (1/1)100% (3/3)100% (1/1)
toString (): String 100% (1/1)100% (15/15)100% (1/1)

1/*
2 * Copyright 2006-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 */
16 
17package org.springframework.batch.core;
18 
19import org.springframework.util.Assert;
20 
21/**
22 * Batch domain object representing a uniquely identifiable job run.
23 * JobInstance can be restarted multiple times in case of execution failure and
24 * it's lifecycle ends with first successful execution.
25 *
26 * Trying to execute an existing JobIntance that has already completed
27 * successfully will result in error. Error will be raised also for an attempt
28 * to restart a failed JobInstance if the Job is not restartable.
29 *
30 * @see Job
31 * @see JobParameters
32 * @see JobExecution
33 *
34 * @author Lucas Ward
35 * @author Dave Syer
36 * @author Robert Kasanicky
37 * @author Michael Minella
38 *
39 */
40@SuppressWarnings("serial")
41public class JobInstance extends Entity {
42 
43        private final String jobName;
44 
45        public JobInstance(Long id, String jobName) {
46                super(id);
47                Assert.hasLength(jobName);
48                this.jobName = jobName;
49        }
50 
51        /**
52         * @return the job name. (Equivalent to getJob().getName())
53         */
54        public String getJobName() {
55                return jobName;
56        }
57 
58        @Override
59        public String toString() {
60                return super.toString() + ", Job=[" + jobName + "]";
61        }
62 
63}

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