Package com.ketayao.ketacustom.generate.vo

Examples of com.ketayao.ketacustom.generate.vo.Column


   * @throws SQLException
   */
  private void getColumns(ResultSet rs, Table t) throws SQLException {
    while (rs.next()) {
      // 这里没有提供获取当前列是否主键/外键的信息提示
      Column col = new Column();
      col.setName(rs.getString("COLUMN_NAME"));
      col.setType(rs.getString("TYPE_NAME"));
      col.setSize(rs.getInt("COLUMN_SIZE"));
      col.setNullable(rs.getBoolean("NULLABLE"));
      col.setDigits(rs.getInt("DECIMAL_DIGITS"));
      col.setDefaultValue(rs.getString("COLUMN_DEF"));
      col.setComment(rs.getString("REMARKS"));
      t.getColumns().add(col);
    }
  }
View Full Code Here


   * @param rs
   * @return
   * @throws SQLException
   */
  private Column getPk(ResultSet rs) throws SQLException {
    Column pk = new Column();
    // ResultSetMetaData rsmd = rs.getMetaData();
    // int columnsCount = rsmd.getColumnCount();
    while (rs.next()) {
      pk.setName(rs.getString("COLUMN_NAME"));
      // System.out.println(rs.getString("COLUMN_NAME"));
    }
    return pk;
  }
View Full Code Here

   * @throws SQLException
   */
  private void getColumns(ResultSet rs, Table t) throws SQLException {
    while (rs.next()) {
      // 这里没有提供获取当前列是否主键/外键的信息提示
      Column col = new Column();
      col.setName(rs.getString("COLUMN_NAME"));
      col.setType(rs.getString("TYPE_NAME"));
      col.setSize(rs.getInt("COLUMN_SIZE"));
      col.setNullable(rs.getBoolean("NULLABLE"));
      col.setDigits(rs.getInt("DECIMAL_DIGITS"));
      col.setDefaultValue(rs.getString("COLUMN_DEF"));
      col.setComment(rs.getString("REMARKS"));
      t.getColumns().add(col);
    }
  }
View Full Code Here

   * @param rs
   * @return
   * @throws SQLException
   */
  private Column getPk(ResultSet rs) throws SQLException {
    Column pk = new Column();
    // ResultSetMetaData rsmd = rs.getMetaData();
    // int columnsCount = rsmd.getColumnCount();
    while (rs.next()) {
      pk.setName(rs.getString("COLUMN_NAME"));
      // System.out.println(rs.getString("COLUMN_NAME"));
    }
    return pk;
  }
View Full Code Here

TOP

Related Classes of com.ketayao.ketacustom.generate.vo.Column

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.