Archive for November, 2008
Properties Loader a Helper Class
Listed is the code for Property Loader a Helper class to load properties both from a file and from system.
This
We can load file each time to read a property using getProperty(key) Method
We can read properties loaded when class is loaded and are can be read from [...]
Read Full Post | Make a Comment ( None so far )Java Program to List Tables and Their Relationships in Database
Here is sample Java Program to List all Tables and their relationships in database
/**
*
*/
package com.research.sql;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Ashwin
*
*/
public class ObjectGrapher {
/**
* @param args
*/
public static void main(String[] args) {
try {
Connection con = DBUtils.getConnection();
DatabaseMetaData metaData = con.getMetaData();
ResultSet rs = metaData.getTables(null, null, “%”, null);
List tableNamesList [...]


