org.apache.openjpa.jdbc.sql
Class DBDictionaryFactory

java.lang.Object
  extended by org.apache.openjpa.jdbc.sql.DBDictionaryFactory

public class DBDictionaryFactory
extends Object

Factory class to instantiate a dictionary. It will use the following heuristic:

Author:
Marc Prud'hommeaux

Constructor Summary
DBDictionaryFactory()
           
 
Method Summary
static DBDictionary calculateDBDictionary(JDBCConfiguration conf, String url, String driver, String props)
          Attempt to create the dictionary from the given connection URL and driver name, either or both of which may be null.
(package private) static String getProtocol(String url)
           
static DBDictionary newDBDictionary(JDBCConfiguration conf, DataSource ds, String props)
          Create the dictionary using connection metadata to determine its type.
static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props)
          Create the dictionary for the given class name and properties.
static String toString(DatabaseMetaData meta)
          Return a string containing all the property values of the given database metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBDictionaryFactory

public DBDictionaryFactory()
Method Detail

newDBDictionary

public static DBDictionary newDBDictionary(JDBCConfiguration conf,
                                           String dclass,
                                           String props)
Create the dictionary for the given class name and properties.


calculateDBDictionary

public static DBDictionary calculateDBDictionary(JDBCConfiguration conf,
                                                 String url,
                                                 String driver,
                                                 String props)
Attempt to create the dictionary from the given connection URL and driver name, either or both of which may be null. If the dictionary cannot be calculated, returns null.


newDBDictionary

public static DBDictionary newDBDictionary(JDBCConfiguration conf,
                                           DataSource ds,
                                           String props)
Create the dictionary using connection metadata to determine its type.


getProtocol

static String getProtocol(String url)

toString

public static String toString(DatabaseMetaData meta)
                       throws SQLException
Return a string containing all the property values of the given database metadata.

Throws:
SQLException


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.