org.aksw.commons.util.jdbc
Class JdbcUtils

java.lang.Object
  extended by org.aksw.commons.util.jdbc.JdbcUtils

public class JdbcUtils
extends Object


Constructor Summary
JdbcUtils()
           
 
Method Summary
static Map<String,Relation> fetchColumns(Connection conn)
           
static com.google.common.collect.Multimap<String,ForeignKey> fetchForeignKeys(Connection conn)
           
static Map<String,PrimaryKey> fetchPrimaryKeys(Connection conn)
           
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcUtils

public JdbcUtils()
Method Detail

fetchForeignKeys

public static com.google.common.collect.Multimap<String,ForeignKey> fetchForeignKeys(Connection conn)
                                                                              throws SQLException
Throws:
SQLException

fetchPrimaryKeys

public static Map<String,PrimaryKey> fetchPrimaryKeys(Connection conn)
                                               throws SQLException
Throws:
SQLException

fetchRelationNames

public static Set<String> fetchRelationNames(Connection conn)
                                      throws SQLException
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

Parameters:
conn -
Throws:
SQLException

fetchColumns

public static Map<String,Relation> fetchColumns(Connection conn)
                                         throws SQLException
Throws:
SQLException


Copyright © 2012. All Rights Reserved.