public class JdbcUtils extends Object
| Constructor and Description |
|---|
JdbcUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Relation> |
fetchColumns(Connection conn) |
static com.google.common.collect.Multimap<String,ForeignKey> |
fetchForeignKeys(Connection conn) |
static com.google.common.collect.Multimap<String,ForeignKey> |
fetchForeignKeys(Connection conn,
Collection<String> tableNames) |
static com.google.common.collect.Multimap<String,ForeignKey> |
fetchForeignKeys(Connection conn,
String tableName) |
static Map<String,PrimaryKey> |
fetchPrimaryKeys(Connection conn) |
static Map<String,PrimaryKey> |
fetchPrimaryKeys(Connection conn,
Collection<String> tableNames) |
static Map<String,PrimaryKey> |
fetchPrimaryKeys(Connection conn,
String tableName) |
static Set<String> |
fetchRelationNames(Connection conn)
For each table retrieve all columns and their foreign key relations
Retrieving foreign keys:
http://www.java2s.com/Code/Java/Database-SQL-JDBC/GetForeignKeys.htm
|
public static com.google.common.collect.Multimap<String,ForeignKey> fetchForeignKeys(Connection conn) throws SQLException
SQLExceptionpublic static com.google.common.collect.Multimap<String,ForeignKey> fetchForeignKeys(Connection conn, Collection<String> tableNames) throws SQLException
SQLExceptionpublic static com.google.common.collect.Multimap<String,ForeignKey> fetchForeignKeys(Connection conn, String tableName) throws SQLException
SQLExceptionpublic static Map<String,PrimaryKey> fetchPrimaryKeys(Connection conn) throws SQLException
SQLExceptionpublic static Map<String,PrimaryKey> fetchPrimaryKeys(Connection conn, Collection<String> tableNames) throws SQLException
SQLExceptionpublic static Map<String,PrimaryKey> fetchPrimaryKeys(Connection conn, String tableName) throws SQLException
SQLExceptionpublic static Set<String> fetchRelationNames(Connection conn) throws SQLException
conn - SQLExceptionpublic static Map<String,Relation> fetchColumns(Connection conn) throws SQLException
SQLExceptionCopyright © 2013. All Rights Reserved.