org.jdesktop.dataset.io.schema
Class DataSetIOUtility

java.lang.Object
  extended by org.jdesktop.dataset.io.schema.DataSetIOUtility

public class DataSetIOUtility
extends java.lang.Object

Static utility class for the io package, meant for use internally within the package.

Author:
Adam Barclay, Patrick Wright

Method Summary
static void dumpCatalogDetails(java.sql.DatabaseMetaData databaseMetaData, java.io.PrintWriter pw)
           
static java.util.List<java.lang.String> extractColumn(java.sql.ResultSet tableResultSet, java.lang.String columnName)
           
static java.util.Map<java.lang.String,java.util.Set<java.lang.String>> extractTableList(java.lang.String... tableNames)
          Parses an array of table names, where each table may either be named by itself, or have a column name associated with it, in the format table-name.column-name.
static java.lang.String getDefaultSchemaName(java.sql.DatabaseMetaData databaseMetaData)
           
static java.lang.Class getType(int type)
          Utility class to convert between a java.sql.Types value and a corresponding Java object that would typically be used to represent the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public static java.lang.Class getType(int type)
Utility class to convert between a java.sql.Types value and a corresponding Java object that would typically be used to represent the data.

Parameters:
type - the java.sql.Types value
Returns:
a corresponding object typically used to represent data of the given type

extractTableList

public static java.util.Map<java.lang.String,java.util.Set<java.lang.String>> extractTableList(java.lang.String... tableNames)
Parses an array of table names, where each table may either be named by itself, or have a column name associated with it, in the format table-name.column-name. Returns a Map keyed by table name, mapped to a Set of the column names parsed out. The Set will be null if no column names were found, meaning all columns should be included from the table.

Parameters:
tableNames - The array of table names to parse; see method docs.
Returns:
A Map, keyed by table name, mapped to a Set of column names for the table, or mapped to null if no columns were specified.

getDefaultSchemaName

public static java.lang.String getDefaultSchemaName(java.sql.DatabaseMetaData databaseMetaData)

extractColumn

public static java.util.List<java.lang.String> extractColumn(java.sql.ResultSet tableResultSet,
                                                             java.lang.String columnName)

dumpCatalogDetails

public static void dumpCatalogDetails(java.sql.DatabaseMetaData databaseMetaData,
                                      java.io.PrintWriter pw)


Copyright © 2005 Sun Microsystems All Rights Reserved.