checkValidWaterStates method

void checkValidWaterStates()

Implementation

void checkValidWaterStates() {
  if (!initialized) throw ArgumentError(AbstractDao.C_MUST_INIT);
  if (validWaterStates == null) return;
  if (passedWaterState == null)
    throw SqlException(SqlExceptionEnum.FAILED_UPDATE,
        cause: C_EXCEPTION_STATE_TYPE_MUST);
  if (!validWaterStates!.contains(passedWaterState))
    throw SqlException(SqlExceptionEnum.FAILED_UPDATE,
        cause: "$passedWaterState is an invalid state");
}