Examples of TrafficCountRecord


Examples of org.worldbank.transport.tamt.shared.TrafficCountRecord

   
    // set the column header style
    trafficCountRecordsTable.getRowFormatter().setStyleName(0, style.columnHeader());
   
    for (int i = 0; i < trafficCountRecords.size(); i++) {
      final TrafficCountRecord trafficCountRecord = trafficCountRecords.get(i);
     
      final String id = trafficCountRecord.getId();
     
      // setup the checkbox
      CheckBox cb = new CheckBox();
      cb.setFormValue(id); //store the id in the checkbox value
      checkboxes.add(cb); // keep track for selecting all|none to delete
      cb.setStyleName(style.checkbox());
     
      // extract the attributes
      String date = fmt.format(trafficCountRecord.getDate());
      String startTime = fmtHHMM.format(trafficCountRecord.getStartTime());
      String endTime = fmtHHMM.format(trafficCountRecord.getEndTime());
      String dayType = trafficCountRecord.getDayType();
      String tag = trafficCountRecord.getTag();
     
      // create labels for each attribute we show in the table
      Label dateLabel = new Label(date);
      dateLabel.setStyleName(style.record());
      dateLabel.addStyleName(style.clickable());
View Full Code Here

Examples of org.worldbank.transport.tamt.shared.TrafficCountRecord

    eventBus.addHandler(AddTrafficCountRecordEvent.TYPE,
        new AddTrafficCountRecordEventHandler() {
         
          @Override
          public void onAddTrafficCountRecord(AddTrafficCountRecordEvent event) {
            currentTrafficCountRecord = new TrafficCountRecord();
            String tempId = "TEMP-" + UUID.uuid(10);
            currentTrafficCountRecord.setId(tempId);
            GWT.log(currentTrafficCountRecord.toString());
            resetFormFields();
          }
View Full Code Here

Examples of org.worldbank.transport.tamt.shared.TrafficCountRecord

        int LDC = r.getInt(12);
        int HDC = r.getInt(13);
        int MDB = r.getInt(14);
        int HDB = r.getInt(15);

        TrafficCountRecord trafficCountRecord = new TrafficCountRecord();
        trafficCountRecord.setId(id);
        trafficCountRecord.setDate(date);
        trafficCountRecord.setDayType(dayType);
        trafficCountRecord.setEndTime(endTime);
        trafficCountRecord.setHDB(HDB);
        trafficCountRecord.setHDC(HDC);
        trafficCountRecord.setLDC(LDC);
        trafficCountRecord.setLDV(LDV);
        trafficCountRecord.setMDB(MDB);
        trafficCountRecord.setPC(PC);
        trafficCountRecord.setStartTime(startTime);
        trafficCountRecord.setTag(tag);
        trafficCountRecord.setTX(TX);
        trafficCountRecord.setW2(W2);
        trafficCountRecord.setW3(W3);
       
        trafficCountRecordList.add(trafficCountRecord);
      }

      connection.close(); // returns connection to the pool
View Full Code Here

Examples of org.worldbank.transport.tamt.shared.TrafficCountRecord

      // there will always be 24 results from the trafficCountReport function
      while (r.next()) {
        // Piggy-back on the TrafficCount model
        // realizing it is not a real TrafficCount,
        // but it has the placeholders we like
        TrafficCountRecord record = new TrafficCountRecord();
        int hour = r.getInt(1);
        //logger.debug("hour="+hour);
        int w2 = r.getInt(2);
        //logger.debug("w2="+w2);
        int w3 = r.getInt(3);
        //logger.debug("w3="+w3);
        int pc = r.getInt(4);
        //logger.debug("pc="+pc);
        int tx = r.getInt(5);
        //logger.debug("tx="+tx);
        int ldv = r.getInt(6);
        //logger.debug("ldv="+ldv);
        int ldc = r.getInt(7);
        //logger.debug("ldc="+ldc);
        int hdc = r.getInt(8);
        //logger.debug("hdc="+hdc);
        int mdb = r.getInt(9);
        //logger.debug("mdb="+mdb);
        int hdb = r.getInt(10);
        //logger.debug("hdb="+hdb);
       
        // nowhere to set the hour as int in TrafficCountRecord
        record.setW2(w2);
        record.setW3(w3);
        record.setPC(pc);
        record.setTX(tx);
        record.setLDV(ldv);
        record.setLDC(ldc);
        record.setHDC(hdc);
        record.setMDB(mdb);
        record.setHDB(hdb);
       
        //logger.debug("hour=("+hour+"), record=" + record);
       
        records.add(record);
       
View Full Code Here

Examples of org.worldbank.transport.tamt.shared.TrafficCountRecord

   
    return trafficCountReport;
  }

  public TrafficCountRecord getTrafficCountRecordById(String id) throws Exception {
    TrafficCountRecord trafficCountRecord = new TrafficCountRecord();
    try {
      Connection connection = getConnection();
      Statement s = connection.createStatement();
      String sql = "select id, tag, countdate, daytype, starttime," +
      "endtime, w2, w3, pc, tx, ldv, ldc, hdc, mdb, hdb from trafficcount"
      + "where id = '" + id + "' ORDER BY countdate";
      ResultSet r = s.executeQuery(sql);
      while (r.next()) {
       
        String tag = r.getString(2);
        Date date = r.getDate(3);
        String dayType = r.getString(4);
        Date startTime = r.getDate(5);
        Date endTime = r.getDate(6);
        int W2 = r.getInt(7);
        int W3 = r.getInt(8);
        int PC = r.getInt(9);
        int TX = r.getInt(10);
        int LDV = r.getInt(11);
        int LDC = r.getInt(12);
        int HDC = r.getInt(13);
        int MDB = r.getInt(14);
        int HDB = r.getInt(15);

        trafficCountRecord.setId(id);
        trafficCountRecord.setDate(date);
        trafficCountRecord.setDayType(dayType);
        trafficCountRecord.setEndTime(endTime);
        trafficCountRecord.setHDB(HDB);
        trafficCountRecord.setHDC(HDC);
        trafficCountRecord.setLDC(LDC);
        trafficCountRecord.setLDV(LDV);
        trafficCountRecord.setMDB(MDB);
        trafficCountRecord.setPC(PC);
        trafficCountRecord.setStartTime(startTime);
        trafficCountRecord.setTag(tag);
        trafficCountRecord.setTX(TX);
        trafficCountRecord.setW2(W2);
        trafficCountRecord.setW3(W3);

      }

      connection.close(); // returns connection to pool
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.