Examples of HhStartDate


Examples of net.sf.chellow.physical.HhStartDate

            if (action.equals("insert")) {
              String mpanCore = allValues[2];
              boolean isImport = Boolean
                  .parseBoolean(allValues[4]);
              boolean isKwh = Boolean.parseBoolean(allValues[5]);
              HhStartDate startDate = new HhStartDate(
                  allValues[3]);
              String hhString = allValues[6].trim();
              if (hhString.endsWith(",")) {
                hhString = hhString + " ";
              }
              String[] vals = hhString.split(",");
              if (vals.length % 2 != 0) {
                StringBuilder valsBuilder = new StringBuilder();
                for (String val : vals) {
                  valsBuilder.append(val + " ");
                }
                throw new UserException(
                    "There must be an even number of values in the list of hh data. This list is "
                        + valsBuilder + ".");
              }
              for (int i = 0; i < vals.length; i += 2) {
                String bigDecimal = vals[i];
                if (bigDecimal.length() > 0) {
                  Character status = null;
                  String statusString = vals[i + 1].trim();
                  if (statusString.length() > 0) {
                    status = statusString.charAt(0);
                  }
                  hhData.add(new HhDatumRaw(mpanCore,
                      isImport, isKwh, startDate,
                      new BigDecimal(bigDecimal), status));
                }
                startDate = startDate.getNext();
              }
              HhDatum.insert(hhData.iterator(), halt);
              hhData.clear();
            }
            totalHhTime = totalHhTime + System.currentTimeMillis()
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

          .getParticipant(participantCode);
      String name = GeneralImport.addField(csvElement, "Name", values, 2);

      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 3);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String finishDateStr = GeneralImport.addField(csvElement,
          "Finish Date", values, 4);
      HhStartDate finishDate = null;
      if (finishDateStr.length() > 0) {
        finishDate = new HhStartDate(finishDateStr);
      }
      String chargeScript = GeneralImport.addField(csvElement,
          "Charge Script", values, 5);

      String rateScriptIdStr = GeneralImport.addField(csvElement,
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

    Date startDate = inv.getDate("start");

    if (!inv.isValid()) {
      throw new UserException(document());
    }
    DnoContract contract = dno.insertContract(null, name, new HhStartDate(
        startDate), null, "", null, "");
    Hiber.commit();
    inv.sendSeeOther(contract.getEditUri());
  }
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

          "Rate Script Id", values, 5);
      Long rateScriptId = rateScriptIdStr.length() > 0 ? new Long(
          rateScriptIdStr) : null;
      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 6);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String finishDateStr = GeneralImport.addField(csvElement,
          "Finish Date", values, 7);
      HhStartDate finishDate = finishDateStr.trim().length() == 0 ? null
          : new HhStartDate(finishDateStr);
      String rateScript = GeneralImport.addField(csvElement,
          "Rate Script", values, 8);
      NonCoreContract.insertNonCoreContract(id, isCore, participant,
          name, startDate, finishDate, chargeScript, rateScriptId,
          rateScript);
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

      if (idStr.length() > 0) {
        id = new Long(idStr);
      }
      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 2);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String script = GeneralImport.addField(csvElement, "Script",
          values, 3);
      contract.insertRateScript(id, startDate, script);
    } else if (action.equals("update")) {
    }
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

      if (idStr.length() > 0) {
        id = new Long(idStr);
      }
      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 3);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String script = GeneralImport.addField(csvElement, "Script",
          values, 4);
      contract.insertRateScript(id, startDate, script);
    } else if (action.equals("update")) {
    }
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

      if (idStr.length() > 0) {
        id = new Long(idStr);
      }
      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 2);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String script = GeneralImport.addField(csvElement, "Script",
          values, 3);
      contract.insertRateScript(id, startDate, script);
    } else if (action.equals("update")) {
    }
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

      if (idStr.length() > 0) {
        id = new Long(idStr);
      }
      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 2);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String script = GeneralImport.addField(csvElement, "Script",
          values, 3);
      contract.insertRateScript(id, startDate, script);
    } else if (action.equals("update")) {
    }
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

      if (idStr.length() > 0) {
        id = new Long(idStr);
      }
      String startDateStr = GeneralImport.addField(csvElement,
          "Start Date", values, 2);
      HhStartDate startDate = new HhStartDate(startDateStr);
      String script = GeneralImport.addField(csvElement, "Script",
          values, 3);
      contract.insertRateScript(id, startDate, script);
    } else if (action.equals("update")) {
    }
View Full Code Here

Examples of net.sf.chellow.physical.HhStartDate

    setScript(script);
  }

  public void update(HhStartDate startDate, HhStartDate finishDate,
      String script) throws HttpException {
    HhStartDate originalStartDate = getStartDate();
    HhStartDate originalFinishDate = getFinishDate();
    RateScript previousRateScript = contract.getPreviousRateScript(this);
    RateScript nextRateScript = contract.getNextRateScript(this);

    internalUpdate(startDate, finishDate, script);
    if (previousRateScript != null) {
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.