private void regulationtDuplicateValid(RegulationDTO regulationDto, List<Object[]> resultSetCount)
throws ERPException {
for (Object[] object : resultSetCount) {
Long regId = null;
String regName = null;
String regFullName = null;
String regShortName = null;
if (object[0] != null || object[1] != null || object[2] != null || object[3] != null) {
regId = (Long) object[1];
regName = (String) object[2];
regFullName = (String) object[3];
regShortName = (String) object[4];
if (!(regId.equals(regulationDto.getRegId()))) {
if (regName.equalsIgnoreCase(regulationDto.getRegName())) {
throw new ERPException(ExaminationEnumApiErrorCode.getResponseCode(DUPLICATE_REGULATION_NAME));
}
if (regFullName.equalsIgnoreCase(regulationDto.getRegFullName())) {
throw new ERPException(
ExaminationEnumApiErrorCode.getResponseCode(DUPLICATE_REGULATION_FULL_NAME));
}
if (regShortName.equalsIgnoreCase(regulationDto.getRegShortName())) {
throw new ERPException(
ExaminationEnumApiErrorCode.getResponseCode(DUPLICATE_REGULATION_SHORT_NAME));
}
}
}
}
}