@Subscribe("payModeComboBox") public void onPayModeComboBoxValueChange(final HasValue.ValueChangeEvent event) throws ParseException { String mode=payModeComboBox.getValue()==null?"":payModeComboBox.getValue().toString(); String vertical=verticalComboBox.getValue()==null?"":verticalComboBox.getValue().toString(); if(!mode.equals("") && !vertical.equals("")) { setPendingData(vertical,mode); } } private void setPendingData(String vertical,String paymentMode) throws ParseException { log.info("Inside setPendingData :::: "); List> result=new ArrayList<>(); result=dataService.getPendingPaymentMode(user.getId(), paymentMode,vertical); log.info("Result :::: "+result); Listcollection = new ArrayList<>(); if(result!=null) { for (Map data:result) { Collections entity =new Collections(); entity.setVertical(data.get("vertical")==null?"":data.get("vertical").toString()); entity.setDepositionTransId(data.get("deposition_trans_id")==null?"":data.get("deposition_trans_id").toString()); String transactionDate = data.get("created_on")==null?"":data.get("created_on").toString(); String formattedDate = utility.dateFormatterWithDateTime(transactionDate); SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss"); Date date = outputFormat.parse(formattedDate); entity.setCreatedOn(date); entity.setAmount(data.get("amount")==null?"":data.get("amount").toString()); entity.setType(data.get("type")==null?"":data.get("type").toString()); entity.setRemarks(data.get("remarks")==null?"":data.get("remarks").toString()); entity.setPaymentMode(data.get("payment_mode")==null?"": data.get("payment_mode").toString()); entity.setModifiedOn(data.get("modified_on")==null?null: (Date) data.get("modified_on")); collection.add(entity); } pendingDc.setItems(collection); } } public List> getPendingDepositionByPaymentMode(Long userId, String paymentMode, String vertical) { //using below jdbctemplate to execute custom sql query List> resultList = jdbcTemplate.queryForList(query.toString(), parameterList.toArray()); }