Package honeycrm.client.reports

Examples of honeycrm.client.reports.ReportMetaData


  protected void showReport(final int startingReport) {
    reportService.getReport(startingReport, new AsyncCallback<ReportData<Map<Integer, Map<String, Integer>>>>() {
      @Override
      public void onSuccess(ReportData<Map<Integer, Map<String, Integer>>> reportData) {
        final ReportMetaData[] allMeta = reportData.getMeta();
        final ReportMetaData reportMeta = ReportMetaData.getReportById(startingReport, allMeta);

        view.setChart(reportData, reportMeta);
        view.setRelatedReports(reportMeta.getRelatedReports(allMeta));
      }

      @Override
      public void onFailure(Throwable caught) {
      }
View Full Code Here


import junit.framework.TestCase;

public class ReportSuggestionTest extends TestCase {
  public void testRelation() {
    final ReportMetaData a = new ReportMetaData(0, "a", new String[] { "a", "b" }, new String[] { "a" });
    final ReportMetaData b = new ReportMetaData(1, "b", new String[] { "c", "d" }, new String[] { "b" });

    assertEquals(0, a.getRelatedReports(new ReportMetaData[] { a, b }).length);

    final ReportMetaData c = new ReportMetaData(1, "b", new String[] { "c", "d" }, new String[] { "a", "b" });

    assertEquals(1, a.getRelatedReports(new ReportMetaData[] { a, c }).length);
  }
View Full Code Here

  }

  private ReportMetaData[] internalGetAllReportMetaData() {
    final ArrayList<ReportMetaData> metaData = new ArrayList<ReportMetaData>();

    metaData.add(new ReportMetaData(0, "Expenses Per Category Per Year", new String[] { "Expenses for A", "Expenses for B", "Expenses for C" }, new String[] { "expenses", "category", "revenue" }));
    metaData.add(new ReportMetaData(1, "Revenue Per Product Per Year", new String[] { "Product1", "Product2", "Product3", "Product4", "Product5" }, new String[] { "revenue", "product" }));
    metaData.add(new ReportMetaData(2, "Dummy Report", new String[] { "Product1", "Product2", "Product3" }, new String[] { "product", "math" }));

    return metaData.toArray(new ReportMetaData[0]);
  }
View Full Code Here

TOP

Related Classes of honeycrm.client.reports.ReportMetaData

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.