RESOLVED - issue BATCH-459: unused StepExecution methods
http://jira.springframework.org/browse/BATCH-459 removed unused methods
This commit is contained in:
@@ -50,8 +50,6 @@ public class StepExecution extends Entity {
|
||||
|
||||
private int skipCount = 0;
|
||||
|
||||
private int retryCount = 0;
|
||||
|
||||
private Date startTime = new Date(System.currentTimeMillis());
|
||||
|
||||
private Date endTime = null;
|
||||
@@ -93,20 +91,6 @@ public class StepExecution extends Entity {
|
||||
this(step, jobExecution, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the number of commits in this execution
|
||||
*/
|
||||
public void incrementCommitCount() {
|
||||
commitCount++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the number of items in this execution
|
||||
*/
|
||||
public void incrementItemCount() {
|
||||
itemCount++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link ExecutionContext} for this execution
|
||||
*
|
||||
@@ -179,15 +163,6 @@ public class StepExecution extends Entity {
|
||||
this.itemCount = itemCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current number of rollbacks for this execution
|
||||
*
|
||||
* @param rollbackCount the current number of rollbacks for this execution
|
||||
*/
|
||||
public void setRollbackCount(int rollbackCount) {
|
||||
this.rollbackCount = rollbackCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current number of rollbacks for this execution
|
||||
*
|
||||
@@ -358,26 +333,10 @@ public class StepExecution extends Entity {
|
||||
this.terminateOnly = true;
|
||||
}
|
||||
|
||||
public void setSkipCount(int skipCount) {
|
||||
this.skipCount = skipCount;
|
||||
}
|
||||
|
||||
public int getSkipCount() {
|
||||
return skipCount;
|
||||
}
|
||||
|
||||
public void incrementSkipCount() {
|
||||
skipCount++;
|
||||
}
|
||||
|
||||
public void setRetryCount(int retryCount) {
|
||||
this.retryCount = retryCount;
|
||||
}
|
||||
|
||||
public int getRetryCount() {
|
||||
return retryCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to get the current job parameters.
|
||||
*
|
||||
|
||||
@@ -101,39 +101,6 @@ public class StepExecutionTests extends TestCase {
|
||||
assertEquals(ExitStatus.FINISHED, execution.getExitStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.springframework.batch.core.StepExecution#incrementCommitCount()}.
|
||||
*/
|
||||
public void testIncrementCommitCount() {
|
||||
int before = execution.getCommitCount().intValue();
|
||||
execution.incrementCommitCount();
|
||||
int after = execution.getCommitCount().intValue();
|
||||
assertEquals(before + 1, after);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.springframework.batch.core.StepExecution#incrementItemCount()}.
|
||||
*/
|
||||
public void testIncrementLuwCount() {
|
||||
int before = execution.getItemCount().intValue();
|
||||
execution.incrementItemCount();
|
||||
int after = execution.getItemCount().intValue();
|
||||
assertEquals(before + 1, after);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.springframework.batch.core.StepExecution#rollback()}.
|
||||
*/
|
||||
public void testIncrementRollbackCount() {
|
||||
int before = execution.getRollbackCount().intValue();
|
||||
execution.rollback();
|
||||
int after = execution.getRollbackCount().intValue();
|
||||
assertEquals(before + 1, after);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.springframework.batch.core.StepExecution#getCommitCount()}.
|
||||
@@ -151,15 +118,6 @@ public class StepExecutionTests extends TestCase {
|
||||
execution.setItemCount(123);
|
||||
assertEquals(123, execution.getItemCount().intValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.springframework.batch.core.StepExecution#getRollbackCount()}.
|
||||
*/
|
||||
public void testGetRollbackCount() {
|
||||
execution.setRollbackCount(123);
|
||||
assertEquals(123, execution.getRollbackCount().intValue());
|
||||
}
|
||||
|
||||
public void testGetJobExecution() throws Exception {
|
||||
assertNotNull(execution.getJobExecution());
|
||||
|
||||
Reference in New Issue
Block a user