public PrimaryKey getPrimaryKey(JDBCDataStore store, String schema, String table, Connection cx) throws SQLException { List<PrimaryKeyColumn> columns = tryForPrimaryKey1(schema, table, cx); if (columns.isEmpty()) { columns = tryForPrimaryKey(schema, table, cx); } if (columns.isEmpty()) { columns = tryForSequence(schema, table, cx); } if (columns.isEmpty()) { columns = tryAsView(schema, table, cx); } if (columns.isEmpty()) { return null; } else { return new PrimaryKey(table, columns); } }
if (columns.size() > 0) return new PrimaryKey(table, columns); else return null; } catch (SQLException e) {
return new PrimaryKey(tableName, cols);
return new PrimaryKey(tableName, cols);
pkey = new PrimaryKey(tableName, kcols);
return new PrimaryKey(table, columns); else return null;
return new PrimaryKey( tableName, cols );
return new PrimaryKey(tableName, cols);
pkey = new PrimaryKey( tableName, cols );
pkey = new PrimaryKey(tableName, kcols);