public boolean checkUrlExist(String url) { // TODO Auto-generated method stub SqlRowSet s = this.queryForRowSet("SELECT * " + " FROM log_url " + "WHERE name= '" + url + "';"); if (s.first() == true) return true; else return false; }
@Override public Integer getLineId(final int lineNo, final String file, final String project) { final String sql = "SELECT (lineid) FROM lines WHERE " + "project=? AND file=? AND lineno=?;"; SqlRowSet lineRows = jdbcTemplate.queryForRowSet(sql, new Object[] {project, file, lineNo}); if (lineRows.first()) { return lineRows.getInt("lineId"); } return null; }
@Override public LikelihoodData retrieve(final Long likelihoodId) { final SqlRowSet likelihood = this._getLikelihood(likelihoodId); likelihood.first(); return new LikelihoodData( likelihood.getLong("id"), likelihood.getString("name"), likelihood.getString("code"), likelihood.getLong("enabled")); }
public boolean checkVisitExist(String ip, String date, String configOs, String configBrowser) { // TODO Auto-generated method stub SqlRowSet s = this.queryForRowSet( "SELECT *" + " FROM log_visit " + "WHERE ip= '" + ip + "'" + " AND visit_date= '" + DateUtil.handleDateFormat(date) + "'" + " AND config_os= '" + configOs + "'" + " AND config_browser_name= '" + configBrowser + "';"); if (s.first() == true) return true; else return false; }