de.oio.sqlrest.db
Class DatabaseUtil

java.lang.Object
  |
  +--de.oio.sqlrest.db.DatabaseUtil

public class DatabaseUtil
extends java.lang.Object

Author:
tbayer

Constructor Summary
DatabaseUtil()
           
 
Method Summary
static void deleteRow(java.lang.String tableName, java.lang.String primaryKey)
          Method deleteRow.
static java.util.Collection getCatalogs()
          A Catalog is a logical database in a dbms.
static java.util.Collection getColumnsMetaData(java.lang.String tableName)
          Method getColumnsMetaData.
static int getColumnType(java.lang.String tableName, java.lang.String columnName)
          Method getColumnType.
static java.lang.String getPrimaryKeyColumnName(java.lang.String tableName)
           
static java.util.Collection getPrimaryKeyValuesFromTable(java.lang.String tableName)
          Method getTable.
static java.lang.String getSQLParameterSubstring(java.lang.String value, int type)
           
static java.util.ArrayList getTableDetails(java.lang.String tableName, java.lang.String id)
          Method getTableDetails.
static java.util.Collection getTableNames()
           
static boolean isNumericType(int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseUtil

public DatabaseUtil()
Method Detail

getCatalogs

public static java.util.Collection getCatalogs()
A Catalog is a logical database in a dbms. The method returns a list of catalognames.

Returns:
Collection containing Strings with the names of the database Catalogs.

getTableNames

public static java.util.Collection getTableNames()

getPrimaryKeyValuesFromTable

public static java.util.Collection getPrimaryKeyValuesFromTable(java.lang.String tableName)
Method getTable.

Parameters:
tableName -

getTableDetails

public static java.util.ArrayList getTableDetails(java.lang.String tableName,
                                                  java.lang.String id)
Method getTableDetails.


getSQLParameterSubstring

public static java.lang.String getSQLParameterSubstring(java.lang.String value,
                                                        int type)

isNumericType

public static boolean isNumericType(int type)

getPrimaryKeyColumnName

public static java.lang.String getPrimaryKeyColumnName(java.lang.String tableName)

getColumnType

public static int getColumnType(java.lang.String tableName,
                                java.lang.String columnName)
Method getColumnType.

Parameters:
tableName -
Returns:
String

deleteRow

public static void deleteRow(java.lang.String tableName,
                             java.lang.String primaryKey)
                      throws java.sql.SQLException
Method deleteRow.

java.sql.SQLException

getColumnsMetaData

public static java.util.Collection getColumnsMetaData(java.lang.String tableName)
Method getColumnsMetaData.

Parameters:
tableName -
Returns:
Collection


Copyright © Orientation in Objects GmbH. All Rights Reserved.