public ArrayList<String> getPrimaryKeys(String tn, boolean caps){
        ArrayList<String> pkList=new ArrayList<String>();
        try {
            Connection conn;
            ResultSet pks;
            Class.forName("oracle.jdbc.driver.OracleDriver");
            conn = DriverManager.getConnection(dbUrl, un, pwd);

            pks=conn.getMetaData().getPrimaryKeys(null, null, tn.toUpperCase());
            //conn.getMetaData().getIndexInfo(null, null, tn.toUpperCase(), true, true);

            while(pks.next()){
                if (caps == CapsLock)
                    pkList.add(pks.getString("COLUMN_NAME").toUpperCase());
                else if(caps==CapsUnlock)
                    pkList.add(pks.getString("COLUMN_NAME").toLowerCase());
                else
                    pkList.add(pks.getString("COLUMN_NAME"));
            }

            conn.close();
        } catch (ClassNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            Log.Print(tn + "不存在");
            e.printStackTrace();
        }
        return pkList;
    }