public void saveLogUrl(LogUrl logUrl) { // TODO Auto-generated method stub String sql = "INSERT INTO log_url(NAME,STATUS,type) VALUES('" + logUrl.getName() + "','" + logUrl.getStatus() + "','" + logUrl.getType() + "');"; this.getJt().execute(sql); }
public void updateLogUrl(LogUrl logUrl) { // TODO Auto-generated method stub String sql = "UPDATE log_url " + "SET viewed = '" + logUrl.getViewed() + "',unique_view = '" + logUrl.getUniqueView() + "'" + "WHERE idurl = '" + logUrl.getIdUrl() + "'"; this.getJt().execute(sql); /* float visit = getVisitOnlyOnePage(logUrl.getIdUrl()); float exit = getVisitExitPage(logUrl.getIdUrl()); sql="UPDATE log_url "+ "SET bounce_rate = "+visit+"/viewed ,exit_rate = "+exit+"/viewed "+ "WHERE idurl = '"+logUrl.getIdUrl()+"'"; this.getJt().execute(sql);*/ }
public LogUrl getLogUrl(String url) { // TODO Auto-generated method stub SqlRowSet s = this.queryForRowSet("SELECT * " + " FROM log_url " + "WHERE name= '" + url + "';"); LogUrl l = new LogUrl(); while (s.next()) { l.setIdUrl(s.getInt("idurl")); l.setName(s.getString("name")); l.setStatus(s.getString("status")); l.setViewed(s.getInt("viewed")); l.setUniqueView(s.getInt("unique_view")); } return l; }