public final class DatabaseUtil extends Object
Modifier and Type | Method and Description |
---|---|
static DbmsType |
dbmsTypeOf(DbmsHandlerComponent handler,
Dbms dbms)
|
static String |
findConnectionUrl(DbmsHandlerComponent dbmsHandlerComponent,
Dbms dbms)
Determines the connection URL to use for the specified
Dbms by
first:
checking if the CONNECTION_URL property is set;
otherwise, calculate it using the DbmsType . |
static DbmsType |
findDbmsType(DbmsHandlerComponent dbmsHandlerComponent,
Dbms dbms)
|
public static DbmsType dbmsTypeOf(DbmsHandlerComponent handler, Dbms dbms)
handler
- the dbms handler to usedbms
- the dbmspublic static String findConnectionUrl(DbmsHandlerComponent dbmsHandlerComponent, Dbms dbms) throws SpeedmentException
Dbms
by
first:
CONNECTION_URL
property is set;
DbmsType
.
DbmsType
can not be found by calling
dbmsTypeOf(DbmsHandlerComponent, Dbms)
, a
SpeedmentException
will be thrown.dbmsHandlerComponent
- the dbms handler component instancedbms
- the database managerSpeedmentException
- if the DbmsType
couldn't be foundpublic static DbmsType findDbmsType(DbmsHandlerComponent dbmsHandlerComponent, Dbms dbms)
DbmsType
corresponding to the specified Dbms
,
or throws a SpeedmentException
if it can not be found.dbmsHandlerComponent
- the handler to look indbms
- the dbms to look forCopyright © 2018 Speedment, Inc.. All rights reserved.