@Test @Sql(scripts = { "/sql/clearAction.sql", "/sql/insertActionData.sql" }) public void TestCheckActionNameExit() { boolean exist = actionRepository.checkActionNameExit("Get all ReceivingMode"); assertThat(exist == true); }
public boolean checkActionNameExit(String actionName) { String Query = ActionQueryBuilder.checkActionNameExit(); final Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("name", actionName); SqlRowSet sqlRowSet = namedParameterJdbcTemplate.queryForRowSet(Query, parametersMap); if (sqlRowSet.next() && sqlRowSet.getLong("id") > 0) { return true; } return false; }
ActionRepository { public boolean checkActionNameExit(String actionName) { String Query = ActionQueryBuilder.checkActionNameExit(); final Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("name", actionName); SqlRowSet sqlRowSet = namedParameterJdbcTemplate.queryForRowSet(Query, parametersMap); if (sqlRowSet.next() && sqlRowSet.getLong("id") > 0) { return true; } return false; } }
ActionRepository { public boolean checkActionNameExit(String actionName) { String Query = ActionQueryBuilder.checkActionNameExit(); final Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("name", actionName); SqlRowSet sqlRowSet = namedParameterJdbcTemplate.queryForRowSet(Query, parametersMap); if (sqlRowSet.next() && sqlRowSet.getLong("id") > 0) { return true; } return false; }  }
ActionRepository { public boolean checkActionNameExit(String actionName) { String Query = ActionQueryBuilder.checkActionNameExit(); final Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("name", actionName); SqlRowSet sqlRowSet = namedParameterJdbcTemplate.queryForRowSet(Query, parametersMap); if (sqlRowSet.next() && sqlRowSet.getLong("id") > 0) { return true; } return false; }  List<Action> createAction(final ActionRequest actionRequest); List<Action> updateAction(final ActionRequest actionRequest); boolean checkActionNameExit(String actionName); boolean checkCombinationOfUrlAndqueryparamsExist(String url, String queryParams); ActionService getAllActionsBasedOnRoles(ActionRequest actionRequest); List<Action> getAllActions(ActionRequest actionRequest); List<Action> getAllMDMSActions(ActionRequest actionRequest); static RequestInfo getRInfo(); }
ActionRepository { public boolean checkActionNameExit(String actionName) { String Query = ActionQueryBuilder.checkActionNameExit(); final Map<String, Object> parametersMap = new HashMap<String, Object>(); parametersMap.put("name", actionName); SqlRowSet sqlRowSet = namedParameterJdbcTemplate.queryForRowSet(Query, parametersMap); if (sqlRowSet.next() && sqlRowSet.getLong("id") > 0) { return true; } return false; }  List<Action> createAction(final ActionRequest actionRequest); List<Action> updateAction(final ActionRequest actionRequest); boolean checkActionNameExit(String actionName); boolean checkCombinationOfUrlAndqueryparamsExist(String url, String queryParams); ActionService getAllActionsBasedOnRoles(ActionRequest actionRequest); List<Action> getAllActions(ActionRequest actionRequest); List<Action> getAllMDMSActions(ActionRequest actionRequest); static RequestInfo getRInfo(); static final Logger LOGGER; }