Enum Class JdbcDatabaseType
- All Implemented Interfaces:
Serializable
,Comparable<JdbcDatabaseType>
,Constable
type of database we are connecting to
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptioncolumnAliases
(String fromClause) get the column aliases from a query select a,b,c fromabstract boolean
abstract boolean
matchesUrlMaybe
(String url) abstract String
change a query into a paging querystatic JdbcDatabaseType
resolveDatabaseType
(Connection connection) return the database type for this connection or nullstatic String
selectPart
(String query) get the select part from a querystatic JdbcDatabaseType
Returns the enum constant of this class with the specified name.static JdbcDatabaseType
valueOfIgnoreCase
(String string, boolean exceptionOnNull) do a case-insensitive matchingstatic JdbcDatabaseType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
oracle
oracle db -
mysql
mysql db -
postgres
postgres
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
resolveDatabaseType
return the database type for this connection or null- Parameters:
connection
-- Returns:
- the database type
-
columnAliases
get the column aliases from a query select a,b,c from- Parameters:
fromClause
-- Returns:
- the aliases
-
selectPart
get the select part from a query- Parameters:
query
-- Returns:
- the select part, everything up to the from, or null if cant find
-
pageQuery
change a query into a paging query- Parameters:
query
-pageSize
-- Returns:
- the new query
-
matchesUrlDefinitely
- Parameters:
url
-- Returns:
- true if this is definitely this db type
-
matchesUrlMaybe
- Parameters:
url
-- Returns:
- true if this is maybe this db type
-
valueOfIgnoreCase
do a case-insensitive matching- Parameters:
string
-exceptionOnNull
- will not allow null or blank entries- Returns:
- the enum or null or exception if not found
-