Java SQL Table Column toFlag(ResultSetMetaData metaData, int column)

Here you can find the source of toFlag(ResultSetMetaData metaData, int column)

Description

to Flag

License

Apache License

Declaration

public static int toFlag(ResultSetMetaData metaData, int column) throws SQLException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.ResultSetMetaData;
import java.sql.SQLException;

public class Main {
    public static int toFlag(ResultSetMetaData metaData, int column) throws SQLException {

        int flags = 0;
        if (metaData.isNullable(column) == 1) {
            flags |= 0001;/*from  w  w  w . j a v  a2  s.  c  o m*/
        }

        if (metaData.isSigned(column)) {
            flags |= 0020;
        }

        if (metaData.isAutoIncrement(column)) {
            flags |= 0200;
        }
        return flags;
    }
}

Related

  1. resultSetValue(ResultSet resultSet, Class parameterClass, Object object, String columnLabel)
  2. retrieveCoulmns(String tableName, String columnArray[], Statement statement, long offset, long numberOfRecords)
  3. tableContainsColumn(Connection conn, String table, String column)
  4. tableContainsIndex(Connection conn, String table, String column, String index)
  5. toColumnNameList(final ResultSet rs)
  6. toFormatList(ResultSet results, List column)
  7. toMap(ResultSet rs, List wantedColumnNames)
  8. toValuesList(ResultSet results, String column)