Examples of TableDescription


Examples of com.nurkiewicz.jdbcrepository.TableDescription

  }

  @Test
  public void buildSqlForSelectByIdsWhenMultipleIdColumnsAndNoId() throws Exception {
    //given
    final TableDescription table = new TableDescription("table", null, "num1", "num2", "num3");

    //when
    final String sql = sqlGenerator.selectByIds(table, 0);

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  }

  @Test
  public void buildSqlForSelectByIdsWhenMultipleIdColumnsAndOneId() throws Exception {
    //given
    final TableDescription table = new TableDescription("table", null, "num1", "num2", "num3");

    //when
    final String sql = sqlGenerator.selectByIds(table, 1);

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  }

  @Test
  public void buildSqlForSelectByIdsWhenMultipleIdColumnsAndTwoIds() throws Exception {
    //given
    final TableDescription table = new TableDescription("table", null, "num1", "num2", "num3");

    //when
    final String sql = sqlGenerator.selectByIds(table, 2);

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  }

  @Test
  public void buildSqlForSelectByIdsWhenMultipleIdColumnsAndSeveralIds() throws Exception {
    //given
    final TableDescription table = new TableDescription("table", null, "num1", "num2", "num3");

    //when
    final String sql = sqlGenerator.selectByIds(table, 4);

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  }

  @Test
  public void buildSqlForDeleteBySingleIdColumn() throws Exception {
    //given
    final TableDescription table = new TableDescription("table", "num");

    //when
    final String sql = sqlGenerator.deleteById(table);

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  }

  @Test
  public void buildSqlForDeleteByMultipleIdColumns() throws Exception {
    //given
    final TableDescription table = new TableDescription("table", null, "num1", "num2");

    //when
    final String sql = sqlGenerator.deleteById(table);

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

            mapping.put("FAVOURITE_COUNT", comment.getFavouriteCount());
            return mapping;
          }
        },
        new CommentWithUserMssqlGenerator(),
        new TableDescription("COMMENTS", "COMMENTS c JOIN USERS u ON c.USER_NAME = u.USER_NAME", "ID")
    );
  }
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  @Test
  public void buildSqlForUpdateWithSingleIdColumn() throws Exception {
    //given
    final Object ANY = new Object();
    final TableDescription table = new TableDescription("table", "num");

    //when
    final String sql = sqlGenerator.update(table, ImmutableMap.of("x", ANY, "y", ANY, "z", ANY));

    //then
View Full Code Here

Examples of com.nurkiewicz.jdbcrepository.TableDescription

  @Test
  public void buildSqlForUpdateWithMultipleIdColumns() throws Exception {
    //given
    final Object ANY = new Object();
    final TableDescription table = new TableDescription("table", null, "num1", "num2");

    //when
    final String sql = sqlGenerator.update(table, ImmutableMap.of("x", ANY, "y", ANY, "z", ANY));

    //then
View Full Code Here

Examples of org.openxml4j.document.wordprocessing.model.table.TableDescription

   * @throws OpenXML4JException
   */
  private TableDescription buildTestData() throws OpenXML4JException {
    // build the table info
    int nbCol = 3;
    TableDescription tableDesc = new TableDescription(
        ParagraphAlignment.LEFT);
    // do not use the standar border, make our own, color red, with -.-
    TableBorder border = new TableBorder(BorderStyle.BORDER_STYLE_DOT_DASH,
        8, "FF0000");
    tableDesc.setBorder(border);

    // build cells and lines
    for (int lineNo = 0; lineNo < 5; lineNo++) {
      ArrayList<String> line = new ArrayList<String>();
      for (int col = 0; col < nbCol; col++) {
        line.add(new String("line=" + lineNo + " col=" + col));
      }
      // (a table line can be as simple as a list of string)
      tableDesc.appendLine(line);
    }

    // make a special configuration for a cell
    // set the size of the cell (not automatically computed by MS-Word
    tableDesc.getCellAt(1, 2)
        .setCellSize(
            new TableCellSize(TableWidthType.TABLE_WIDTH_DXA,
                (short) 4096));

    tableDesc.getCellAt(1, 2).setCellBackgroundColor("FA0000"); // set a red
                                  // background
    return tableDesc;
  }
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.