org.jpox.store.rdbms
Class JDBCUtils

java.lang.Object
  extended byorg.jpox.store.rdbms.JDBCUtils

public class JDBCUtils
extends java.lang.Object

Convenience helper for JDBC.

Version:
$Revision: 1.5 $

Constructor Summary
JDBCUtils()
           
 
Method Summary
static java.lang.String getIdentifierNameStripped(java.lang.String name, DatastoreAdapter dba)
          Utility to return an identifier name without any leading/trailing "quote" characters.
static java.lang.String getSubprotocolForURL(java.lang.String url)
          Method to return the "subprotocol" for a JDBC URL.
static boolean isValidJDBCType(java.lang.String typeName)
          Method to return whether the passed "jdbc-type" is a valid JDBC type for use in JPOX.
 
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

isValidJDBCType

public static boolean isValidJDBCType(java.lang.String typeName)
Method to return whether the passed "jdbc-type" is a valid JDBC type for use in JPOX. Uses the java.sql.Types list of types and uses the supported JPOX subset to determine if it is valid.

Parameters:
typeName - "jdbc-type" name
Returns:
Whether it is valid

getIdentifierNameStripped

public static java.lang.String getIdentifierNameStripped(java.lang.String name,
                                                         DatastoreAdapter dba)
Utility to return an identifier name without any leading/trailing "quote" characters.

Parameters:
name - The original name
dba - The database adapter
Returns:
The stripped name with no quotes

getSubprotocolForURL

public static java.lang.String getSubprotocolForURL(java.lang.String url)
Method to return the "subprotocol" for a JDBC URL. A JDBC URL is made up of "jdbc:{subprotocol}:...". For example, "jdbc:mysql:..." or "jdbc:hsqldb:...".

Parameters:
url - The JDBC URL
Returns:
The subprotocol


Copyright © -2007 . All Rights Reserved.