/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
@Test public void testUpgradeStatusUnfinished() { assertEquals(BatchStatus.COMPLETED, BatchStatus.STARTING.upgradeTo(BatchStatus.COMPLETED)); assertEquals(BatchStatus.COMPLETED, BatchStatus.COMPLETED.upgradeTo(BatchStatus.STARTING)); assertEquals(BatchStatus.STARTED, BatchStatus.STARTING.upgradeTo(BatchStatus.STARTED)); assertEquals(BatchStatus.STARTED, BatchStatus.STARTED.upgradeTo(BatchStatus.STARTING)); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }
/** * Upgrade the status field if the provided value is greater than the * existing one. Clients using this method to set the status can be sure * that they don't overwrite a failed status with an successful one. * * @param status the new status value */ public void upgradeStatus(BatchStatus status) { this.status = this.status.upgradeTo(status); }