Package co.nubetech.crux.model

Examples of co.nubetech.crux.model.ReportDesign


    ColumnAliasDAO detail = new ColumnAliasDAO();
    detail.session = session;

    ReportDesignDAO reportDesignDAO = new ReportDesignDAO();

    ReportDesign reportDesign = new ReportDesign();
    reportDesignDAO.session = session;

    ReportTypeDAO type = new ReportTypeDAO();
    type.session = session;

    ReportDAO report = new ReportDAO();
    report.session = session;

    reportDesign.setMappingAxis("x");
    reportDesign.setColumnAlias(detail.findById(99999l));
    reportDesign.setReport(report.findById(99999l));

    reportDesignDAO.transaction = reportDesignDAO.session.getTransaction();
    long reportId = reportDesignDAO.save(reportDesign);

    ResultSet rs1 = stmt
View Full Code Here


    Session session = com.googlecode.s2hibernate.struts2.plugin.util.HibernateSessionFactory
        .getNewSession();

    ReportDesignDAO reportDesignDAO = new ReportDesignDAO();
    ReportDesign reportDesign = new ReportDesign();
    reportDesignDAO.session = session;
    reportDesign = reportDesignDAO.findById(99999l);

    assertEquals(reportDesign.getId(), 99999l);
    assertEquals(reportDesign.getReport().getId(), 99999l);

    assertEquals(reportDesign.getMappingAxis(), "x");

    stmt.executeUpdate("delete from reportDesign where id=" + 99999);
    stmt.executeUpdate("delete from report where id=" + 99999);
    stmt.executeUpdate("delete from columnAlias where id=" + 99999);
    stmt.executeUpdate("delete from mapping where id=" + 99999);
View Full Code Here

    Session session = com.googlecode.s2hibernate.struts2.plugin.util.HibernateSessionFactory
        .getNewSession();

    ReportDesignDAO reportDesignDAO = new ReportDesignDAO();
    ReportDesign reportDesign = new ReportDesign();
    reportDesignDAO.session = session;
    reportDesign = reportDesignDAO.findById(99999l);
    reportDesignDAO.transaction = reportDesignDAO.session.getTransaction();

    long id = reportDesignDAO.delete(reportDesign);
View Full Code Here

    ColumnAliasDAO detail = new ColumnAliasDAO();
    detail.session = session;

    ReportDesignDAO reportDesignDAO = new ReportDesignDAO();

    ReportDesign reportDesign = new ReportDesign();
    reportDesignDAO.session = session;

    ReportTypeDAO type = new ReportTypeDAO();
    type.session = session;

    ReportDAO report = new ReportDAO();
    report.session = session;

    reportDesign.setMappingAxis("x");
    reportDesign.setColumnAlias(detail.findById(99999l));

    reportDesignDAO.transaction = reportDesignDAO.session.getTransaction();

    try {
      reportDesign.setReport(report.findById(99999l));
      long reportId = reportDesignDAO.save(reportDesign);
    } catch (CruxException e) {
      exceptionExists = true;
    }
View Full Code Here

  Session session;
  @TransactionTarget
  Transaction transaction;

  public ReportDesign findById(Long id) {
    ReportDesign report = (ReportDesign) session
        .get(ReportDesign.class, id);
    return report;
  }
View Full Code Here

public class TestServerUtil {
 
  @Test
  public void testGetRowAlias() {
    Report report = TestingUtil.getReportWithoutAggregateFunctions();
    ReportDesign rowDesign = report.getDesigns().get(0);
   
    System.out.println("Getting alias for " + rowDesign);
    Alias rowAlias = ServerUtil.getAlias(rowDesign);
    assertEquals("rowAlias", rowAlias.getAlias());
    assertEquals("co.nubetech.crux.model.RowAlias",
View Full Code Here

 

  @Test
  public void testGetColumnAlias() {
    Report report = TestingUtil.getReportWithoutAggregateFunctions();
    ReportDesign columnDesign = report.getDesigns().get(1);
   
    System.out.println("Getting alias for " + columnDesign);   
    assertEquals("alias", ServerUtil.getAlias(columnDesign).getAlias());
    assertEquals("co.nubetech.crux.model.ColumnAlias",
        ServerUtil.getAlias(columnDesign).getClass().getName());
View Full Code Here

  }
 
  @Test
  public void testGetValueRow() {
    Report report = TestingUtil.getReportWithoutAggregateFunctions();
    ReportDesign rowDesign = report.getDesigns().get(0);
    RowAlias alias = rowDesign.getRowAlias();
    byte[] row = new String("abcdefgh").getBytes();
    byte[] family = new String("f").getBytes();
    byte[] q = new String("q").getBytes();
    byte[] value = new String("I am the val").getBytes();
    KeyValue kv = new KeyValue(row, family, q, value);
View Full Code Here

  @Test
  public void testSetSelectedColumnsScanForColumnAliasNull() {
    Report report = new Report();
   
    ReportDesign design4 = new ReportDesign();
    RowAlias rowAlias = new RowAlias();
    rowAlias.setAlias("row");
    report.addDesign(design4);
   
    Scan scan = new Scan();
View Full Code Here

  @Test
  public void testSetSelectedColumnsGetForColumnAliasNull() {
    Report report = new Report();
   
    ReportDesign design4 = new ReportDesign();
    RowAlias rowAlias = new RowAlias();
    rowAlias.setAlias("row");
    report.addDesign(design4);
   
    Get get = new Get();
View Full Code Here

TOP

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

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.