Package org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model

Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Advertising


  public void invalidateCaches()
  {
    int size = 0;
    for (int i = 0; i < advertisings.size(); i++)
    {
      final Advertising inv = getAdvertising(i);
      size += inv.getArticleCount();
    }
    this.totalSize = size;
    this.adPerRow = null;
    this.articlesPerRow = null;
    this.reducedPricePerRow = null;
View Full Code Here


    int currentRow = 0;
    final int invoiceSize = advertisings.size();
    for (int i = 0; i < invoiceSize; i++)
    {
      final Advertising inv = (Advertising) advertisings.get(i);
      final int articleCount = inv.getArticleCount();
      for (int ac = 0; ac < articleCount; ac++)
      {
        adPerRow[currentRow] = inv;
        articlesPerRow[currentRow] = inv.getArticle(ac);
        reducedPricePerRow[currentRow] = inv.getArticleReducedPrice(ac);
        currentRow += 1;
      }
    }
  }
View Full Code Here

   */
  public Object getValueAt(final int rowIndex, final int columnIndex)
  {
    // just make sure we can access the advertisings by the array
    fillCache();
    final Advertising inv = adPerRow[rowIndex];
    final Article art = articlesPerRow[rowIndex];

    switch (columnIndex)
    {
      case 0:
        return inv;
      case 1:
        return inv.getCustomer().getFirstName();
      case 2:
        return inv.getCustomer().getLastName();
      case 3:
        return inv.getCustomer().getStreet();
      case 4:
        return inv.getCustomer().getTown();
      case 5:
        return inv.getCustomer().getPostalCode();
      case 6:
        return inv.getCustomer().getCountry();
      case 7:
        return inv.getCustomer().getSalutation();
      case 8:
        return inv.getDate();
      case 9:
        return inv.getAdNumber();
      case 10:
        return art.getName();
      case 11:
        return art.getArticleNumber();
      case 12:
View Full Code Here

  private AdvertisingTableModel createDataModel()
  {
    final Customer customer =
        new Customer("Will", "Snowman", "Mr.", "12 Federal Plaza",
            "12346", "AnOtherTown", "Lilliput");
    final Advertising ad = new Advertising(customer, new Date(), "A-000-0123");

    final Article mainboard = new Article("MB.A02", "ZUSE Z0001 Mainboard", 1299.50f);
    final Article hardDisk = new Article
        ("HD.201", "Sillicium Core HDD", 99.50f,
            "Even the babylonians used stone for long term document archiving, so why shouldn't you?");
    final Article memory = new Article("MEM.30", "ferrit core memory", 119.99f);
    final Article operatingSystem = new Article
        ("OS.36", "Windows XP", 259.99f, "Experience the world of tomorrow by spreading trojans today.");
    ad.addArticle(mainboard, 999.99d);
    ad.addArticle(hardDisk, 79.50);
    ad.addArticle(memory, 99.99f);
    ad.addArticle(operatingSystem, 199.99);

    final AdvertisingTableModel data = new AdvertisingTableModel();
    data.addAdvertising(ad);
    return data;
  }
View Full Code Here

  }

  private AdvertisingTableModel initAdData(final Customer customer)
  {
    final GregorianCalendar gc = new GregorianCalendar(2000, 10, 23);
    final Advertising ad = new Advertising(customer, gc.getTime(), "A-000-0123");

    final Article mainboard = new Article("MB.A02", "ZUSE Z0001 Mainboard", 1299.50f);
    final Article hardDisk = new Article
        ("HD.201", "Sillicium Core HDD", 99.50f,
            "Even the babylonians used stone for long term document archiving, so why shouldn't you?");
    final Article memory = new Article("MEM.30", "ferrit core memory", 119.99f);
    final Article operatingSystem = new Article
        ("OS.36", "Windows XP", 259.99f, "Experience the world of tomorrow by spreading trojans today.");
    ad.addArticle(mainboard, 999.99d);
    ad.addArticle(hardDisk, 79.50);
    ad.addArticle(memory, 99.99f);
    ad.addArticle(operatingSystem, 199.99);

    final AdvertisingTableModel adData = new AdvertisingTableModel();
    adData.addAdvertising(ad);
    return adData;
  }
View Full Code Here

  }

  private AdvertisingTableModel initAdData(final Customer customer)
  {
    final GregorianCalendar gc = new GregorianCalendar(2000, 10, 23);
    final Advertising ad = new Advertising(customer, gc.getTime(), "A-000-0123");

    final Article mainboard = new Article("MB.A02", "ZUSE Z0001 Mainboard", 1299.50f);
    final Article hardDisk = new Article
        ("HD.201", "Sillicium Core HDD", 99.50f,
            "Even the babylonians used stone for long term document archiving, so why shouldn't you?");
    final Article memory = new Article("MEM.30", "ferrit core memory", 119.99f);
    final Article operatingSystem = new Article
        ("OS.36", "Windows XP", 259.99f, "Experience the world of tomorrow by spreading trojans today.");
    ad.addArticle(mainboard, 999.99d);
    ad.addArticle(hardDisk, 79.50);
    ad.addArticle(memory, 99.99f);
    ad.addArticle(operatingSystem, 199.99);

    final AdvertisingTableModel adData = new AdvertisingTableModel();
    adData.addAdvertising(ad);
    return adData;
  }
View Full Code Here

  private AdvertisingTableModel createDataModel()
  {
    final Customer customer =
        new Customer("Will", "Snowman", "Mr.", "12 Federal Plaza",
            "12346", "AnOtherTown", "Lilliput");
    final Advertising ad = new Advertising(customer, new Date(), "A-000-0123");

    final Article mainboard = new Article("MB.A02", "ZUSE Z0001 Mainboard", 1299.50f);
    final Article hardDisk = new Article
        ("HD.201", "Sillicium Core HDD", 99.50f,
            "Even the babylonians used stone for long term document archiving, so why shouldn't you?");
    final Article memory = new Article("MEM.30", "ferrit core memory", 119.99f);
    final Article operatingSystem = new Article
        ("OS.36", "Windows XP", 259.99f, "Experience the world of tomorrow by spreading trojans today.");
    ad.addArticle(mainboard, 999.99d);
    ad.addArticle(hardDisk, 79.50);
    ad.addArticle(memory, 99.99f);
    ad.addArticle(operatingSystem, 199.99);

    final AdvertisingTableModel data = new AdvertisingTableModel();
    data.addAdvertising(ad);
    return data;
  }
View Full Code Here

  public void invalidateCaches()
  {
    int size = 0;
    for (int i = 0; i < advertisings.size(); i++)
    {
      final Advertising inv = getAdvertising(i);
      size += inv.getArticleCount();
    }
    this.totalSize = size;
    this.adPerRow = null;
    this.articlesPerRow = null;
    this.reducedPricePerRow = null;
View Full Code Here

    int currentRow = 0;
    final int invoiceSize = advertisings.size();
    for (int i = 0; i < invoiceSize; i++)
    {
      final Advertising inv = (Advertising) advertisings.get(i);
      final int articleCount = inv.getArticleCount();
      for (int ac = 0; ac < articleCount; ac++)
      {
        adPerRow[currentRow] = inv;
        articlesPerRow[currentRow] = inv.getArticle(ac);
        reducedPricePerRow[currentRow] = inv.getArticleReducedPrice(ac);
        currentRow += 1;
      }
    }
  }
View Full Code Here

   */
  public Object getValueAt(final int rowIndex, final int columnIndex)
  {
    // just make sure we can access the advertisings by the array
    fillCache();
    final Advertising inv = adPerRow[rowIndex];
    final Article art = articlesPerRow[rowIndex];

    switch (columnIndex)
    {
      case 0:
        return inv;
      case 1:
        return inv.getCustomer().getFirstName();
      case 2:
        return inv.getCustomer().getLastName();
      case 3:
        return inv.getCustomer().getStreet();
      case 4:
        return inv.getCustomer().getTown();
      case 5:
        return inv.getCustomer().getPostalCode();
      case 6:
        return inv.getCustomer().getCountry();
      case 7:
        return inv.getCustomer().getSalutation();
      case 8:
        return inv.getDate();
      case 9:
        return inv.getAdNumber();
      case 10:
        return art.getName();
      case 11:
        return art.getArticleNumber();
      case 12:
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Advertising

Copyright © 2018 www.massapicom. 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.