Java SQL ResultSet Read getDuplicacy(ResultSet rs)

Here you can find the source of getDuplicacy(ResultSet rs)

Description

get Duplicacy

License

Open Source License

Declaration

public static boolean getDuplicacy(ResultSet rs) throws SQLException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {
    public static boolean getDuplicacy(ResultSet rs) throws SQLException {
        int cc = rs.getMetaData().getColumnCount();
        int j = 1;
        String prev = null;/* w w  w.  j  a va2 s. c  om*/
        String next;
        while (j <= cc) {
            if (j > 1)
                prev = rs.getString(j - 1);
            next = rs.getString(j);
            if (null != prev && prev.equals(next))
                return true;
            j++;
        }
        return false;
    }
}

Related

  1. getData(final ResultSet rs)
  2. getDataDupls(ResultSet rs)
  3. getDateList(ResultSet resultSet, String columnName)
  4. getDbDateValue(ResultSet rs, String columnName)
  5. getDebugData(ResultSet rs)
  6. getEntityMap(ResultSet rs, ResultSetMetaData rsmd)
  7. getEnum(Class enumClass, ResultSet rs, String columnName)
  8. getEnum(ResultSet r, String columnName, Class enumType)
  9. getEnum(ResultSet rs, int index, Class type)