Package co.nubetech.crux.model

Examples of co.nubetech.crux.model.RowAliasFilter


  @Test
  public void testFirstRowAliasNull() {
    RowAlias rowAlias = new RowAlias();
    rowAlias.setId(1);
    RowAliasFilter rowFilter1 = new RowAliasFilter(new Report(), new FilterType(),
        "value", null);
    RowAliasFilter rowFilter2 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias);
    RowFilterComparator rowFilterComparator = new RowFilterComparator();
    int result = rowFilterComparator.compare(rowFilter1, rowFilter2);
    assertEquals(-1, result);
  }
View Full Code Here


  @Test
  public void testSecondRowAliasNull() {
    RowAlias rowAlias = new RowAlias();
    rowAlias.setId(1);
    RowAliasFilter rowFilter1 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias);
    RowAliasFilter rowFilter2 = new RowAliasFilter(new Report(), new FilterType(),
        "value", null);
    RowFilterComparator rowFilterComparator = new RowFilterComparator();
    int result = rowFilterComparator.compare(rowFilter1, rowFilter2);
    assertEquals(1, result);
  }
View Full Code Here

    assertEquals(1, result);
  }

  @Test
  public void testBothRowAliasNull() {
    RowAliasFilter rowFilter1 = new RowAliasFilter(new Report(), new FilterType(),
        "value", null);
    RowAliasFilter rowFilter2 = new RowAliasFilter(new Report(), new FilterType(),
        "value", null);
    RowFilterComparator rowFilterComparator = new RowFilterComparator();
    int result = rowFilterComparator.compare(rowFilter1, rowFilter2);
    assertEquals(0, result);
  }
View Full Code Here

  public void testFirstRowAliasIdGreater() {
    RowAlias rowAlias1 = new RowAlias();
    rowAlias1.setId(2);
    RowAlias rowAlias2 = new RowAlias();
    rowAlias2.setId(1);
    RowAliasFilter rowFilter1 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias1);
    RowAliasFilter rowFilter2 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias2);
    RowFilterComparator rowFilterComparator = new RowFilterComparator();
    int result = rowFilterComparator.compare(rowFilter1, rowFilter2);
    assertEquals(1, result);
  }
View Full Code Here

  public void testSecondRowAliasIdGreater() {
    RowAlias rowAlias1 = new RowAlias();
    rowAlias1.setId(1);
    RowAlias rowAlias2 = new RowAlias();
    rowAlias2.setId(2);
    RowAliasFilter rowFilter1 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias1);
    RowAliasFilter rowFilter2 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias2);
    RowFilterComparator rowFilterComparator = new RowFilterComparator();
    int result = rowFilterComparator.compare(rowFilter1, rowFilter2);
    assertEquals(-1, result);
  }
View Full Code Here

  public void testBothRowAliasIdEqual() {
    RowAlias rowAlias1 = new RowAlias();
    rowAlias1.setId(2);
    RowAlias rowAlias2 = new RowAlias();
    rowAlias2.setId(2);
    RowAliasFilter rowFilter1 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias1);
    RowAliasFilter rowFilter2 = new RowAliasFilter(new Report(), new FilterType(),
        "value", rowAlias2);
    RowFilterComparator rowFilterComparator = new RowFilterComparator();
    int result = rowFilterComparator.compare(rowFilter1, rowFilter2);
    assertEquals(0, result);
  }
View Full Code Here

    cAlias.setAlias("col");
    cAlias.setColumnFamily("cf");
    cAlias.setValueType(valueType);
    mapping.addColumnAlias(cAlias);

    RowAliasFilter rowFilter = new RowAliasFilter();
    FilterType filter1 = new FilterType();
    filter1.setType("Equals");
    rowFilter.setFilterType(filter1);
    rowFilter.setRowAlias(rAlias);
    rowFilter.setReport(report);

    ArrayList<RowAliasFilter> filters = new ArrayList<RowAliasFilter>();
    filters.add(rowFilter);
    report.setRowAliasFilters(filters);

    rowFilter.setValue("row5");

    HBaseFacade hbaseFacade = new HBaseFacade(pool);
    CruxScanner scanner = hbaseFacade.execute(connection, report, mapping);

  }
View Full Code Here

    cAlias1.setAlias("col1");
    cAlias1.setColumnFamily("cf1");
    cAlias1.setValueType(valueType);
    mapping.addColumnAlias(cAlias1);

    RowAliasFilter rowFilter = new RowAliasFilter();
    FilterType filter1 = new FilterType();
    filter1.setType("Equals");
    rowFilter.setFilterType(filter1);
    rowFilter.setRowAlias(rAlias);
    rowFilter.setReport(report);

    ArrayList<RowAliasFilter> filters = new ArrayList<RowAliasFilter>();
    filters.add(rowFilter);
    report.setRowAliasFilters(filters);

    rowFilter.setValue("row5");
   
    ReportDesign colDesign1 = new ReportDesign();
    colDesign1.setColumnAlias(cAlias);
    report.addDesign(colDesign1);
   
View Full Code Here

    valueTypeInt.setClassName("java.lang.Integer");
   
    cAlias2.setValueType(valueTypeInt);
    mapping.addColumnAlias(cAlias2);

    RowAliasFilter rowFilter = new RowAliasFilter();
    FilterType filter1 = new FilterType();
    filter1.setType("Equals");
    rowFilter.setFilterType(filter1);
    rowFilter.setRowAlias(rAlias);
    rowFilter.setReport(report);

    ArrayList<RowAliasFilter> filters = new ArrayList<RowAliasFilter>();
    filters.add(rowFilter);
    report.setRowAliasFilters(filters);

    rowFilter.setValue("4");
    ReportDesign colDesign = new ReportDesign();
    colDesign.setColumnAlias(cAlias);
    report.addDesign(colDesign);
   
    ReportDesign colDesign1 = new ReportDesign();
View Full Code Here

    ValueType valueTypeLong = new ValueType();
    valueTypeLong.setClassName("java.lang.Long");
    cAlias1.setValueType(valueTypeLong);
    mapping.addColumnAlias(cAlias1);

    RowAliasFilter rowFilter = new RowAliasFilter();
    FilterType filter1 = new FilterType();
    filter1.setType("Equals");
    rowFilter.setFilterType(filter1);
    rowFilter.setRowAlias(rAlias);

    ArrayList<RowAliasFilter> filters = new ArrayList<RowAliasFilter>();
    filters.add(rowFilter);
    report.setRowAliasFilters(filters);
    rowFilter.setValue("4");
   
    ReportDesign colDesign1 = new ReportDesign();
    colDesign1.setColumnAlias(cAlias);
    report.addDesign(colDesign1);
   
View Full Code Here

TOP

Related Classes of co.nubetech.crux.model.RowAliasFilter

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.