title: Getting the JDBC column types
body: <p>I need to ask about my column jdbc type in a table, today I am looping throw my columns and then asking about its type, see my code below :</p>
  
  <pre><code>public int getColumnDataTypeFromDB(String columnName) {
      int datatype = 0;
  
      ResultSet columns = null;
      try {
          String schema =
              getMetaDataCatalogName() != null
                  ? getMetaDataCatalogName()
                  : getMetaDataSchemaName();
  
          if (TableManagerFactory.isCatalogBasedDatabase()) {
              columns =
                  getMetaData().getColumns(
                      schema,
                      null,
                      tableName,
                      columnName);
          } else {
              columns =
                  getMetaData().getColumns(
                      null,
                      schema,
                      tableName,
                      columnName);
          }
          //          columns =
          //              getMetaData().getColumns(getMetaDataCatalogName(), getMetaDataSchemaName(), tableName, columnName);
          if (columns.next()) {
              datatype = columns.getInt("DATA_TYPE");
          }
      } catch (SQLException ex) {
          Log.error(
              this,
              "Error while getting columns information: " + ex.getMessage(),
              ex);
          //return false;
      } catch (DDLCreationException ex) {
          Log.error(this, ex.getMessage());
      } finally {
          try {
              if (columns != null) {
                  columns.close();
              }
          } catch (SQLException ex) {
          Log.error(this, ex.getLocalizedMessage());
          }
      }
  
      return datatype;
  }
  </code></pre>
  
  <p>Can I get all the columns metadata in such a table at the same time ?
  if yes, how can I do it ??</p>