internalUpdate(startDate, finishDate, script);
if (previousRateScript != null) {
if (!previousRateScript.getStartDate().getDate()
.before(startDate.getDate())) {
throw new UserException(
"The start date must be after the start date of the previous rate script.");
}
previousRateScript.internalUpdate(
previousRateScript.getStartDate(), startDate.getPrevious(),
previousRateScript.getScript());
}
if (nextRateScript != null) {
if (finishDate == null) {
throw new UserException(
"The finish date must be before the finish date of the next rate script.");
}
if (nextRateScript.getFinishDate() != null
&& !finishDate.getDate().before(
nextRateScript.getFinishDate().getDate())) {
throw new UserException(
"The finish date must be before the finish date of the next rate script.");
}
nextRateScript.internalUpdate(finishDate.getNext(),
nextRateScript.getFinishDate(), nextRateScript.getScript());
}