@Override public boolean isExistCreate(AcademicKPI domain) { boolean returnValue = false; try { String sqltmp = "select count(*) as totalItem from academic_kpi t where t.name='" + StringEscapeUtils.escapeSql(domain.getName()) + "' and t.work_type_code='" + domain.getWorkTypeCode() + "' and t.academic_year='" + domain.getAcademicYear() + "'"; Long found = this.jdbcTemplate.queryForLong(sqltmp); if (found != null && found.intValue() > 0) { returnValue = true; } } catch (Exception ex) { ex.printStackTrace(); } return returnValue; }