|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<SupportedDBProvider>
net.java.ao.db.SupportedDBProvider
public enum SupportedDBProvider
Contains a list of all internally supported database providers and their associated JDBC prefixes (e.g. "jdbc:mysql"). This list is used in the auto-magical database driver selection based on JDBC URI.
This list does not include third-party database providers. Thus,
if you implement a database provider for Sybase, you must pass it directly
to EntityManager
; you cannot rely upon the auto-magical URI
parsing as it will not apply to the new provider.
This enum is designed primarily for INTERNAL use within AO. While it is perfectly acceptible to utilize this enum externally, the API may change unnexpectedly, undocumented results may occur, you know the drill.
DatabaseProvider
Enum Constant Summary | |
---|---|
EMBEDDED_DERBY
|
|
EMBEDDED_HSQLDB
|
|
JTDS_MS_SQL_SERVER
|
|
MS_SQL_SERVER
|
|
MYSQL
|
|
NETWORK_DERBY
|
|
NETWORK_HSQLDB
|
|
ORACLE_OCI
|
|
ORACLE_THIN
|
|
POSTGRESQL
|
Method Summary | |
---|---|
DatabaseProvider |
createInstance(String uri,
String username,
String password)
|
String |
getPrefix()
|
static SupportedDBProvider |
getProviderForURI(String uri)
Returns the SupportedDBProvider which corresponds to the
database provider which corresponds to the specified JDBC URI. |
Class<? extends DatabaseProvider> |
getType()
|
static SupportedDBProvider |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SupportedDBProvider[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SupportedDBProvider MYSQL
public static final SupportedDBProvider NETWORK_DERBY
public static final SupportedDBProvider EMBEDDED_DERBY
public static final SupportedDBProvider ORACLE_THIN
public static final SupportedDBProvider ORACLE_OCI
public static final SupportedDBProvider POSTGRESQL
public static final SupportedDBProvider MS_SQL_SERVER
public static final SupportedDBProvider JTDS_MS_SQL_SERVER
public static final SupportedDBProvider NETWORK_HSQLDB
public static final SupportedDBProvider EMBEDDED_HSQLDB
Method Detail |
---|
public static SupportedDBProvider[] values()
for (SupportedDBProvider c : SupportedDBProvider.values()) System.out.println(c);
public static SupportedDBProvider valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String getPrefix()
public Class<? extends DatabaseProvider> getType()
public DatabaseProvider createInstance(String uri, String username, String password)
public static SupportedDBProvider getProviderForURI(String uri)
SupportedDBProvider
which corresponds to the
database provider which corresponds to the specified JDBC URI. If no corresponding
proivder is found, null
is returned.
uri
- The JDBC URI for which a database provider is required.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |