Class DBURI
Wrap JDBC settings for use by PMD: optional parameters specify the source
code to be passed to PMD, or are inherited from the associated
DBType.
A DBURI is a faux-URI: it does not have a formal specification and
comprises a JDBC(-ish) URL and an optional query, e.g.
jdbc : subprotocol [ : subname ] : connection details [ query ] .
The subprotocol and optional subname parts should be a valid DBType JDBC(-ish) URL jdbc:oracle:thin:username/password@//192.168.100.21:1521/ORCL JDBC(-ish) URL jdbc:thin:username/password@//192.168.100.21:1521/ORCL
The query includes one or more of these:
- characterset
- utf8
- languages
- comma-separated list of desired PMD languages
- schemas
- comma-separated list of database schemas
- sourcecodetypes
- comma-separated list of database source code types
- sourcecodenames
- comma-separated list of database source code names
- Author:
- sturton
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetUri()getURL()voidsetCharacterSet(String characterSet) voidvoidsetDriverClass(String driverClass) voidsetLanguagesList(List<String> languagesList) voidsetParameters(Map<String, String> parameters) voidsetSchemasList(List<String> schemasList) voidsetSourceCodeNamesList(List<String> sourceCodeNamesList) voidsetSourceCodeType(int sourceCodeType) voidsetSourceCodeTypesList(List<String> sourceCodeTypesList) voidsetSubnamePrefix(String subnamePrefix) voidsetSubprotocol(String subprotocol) voidvoidtoString()
-
Constructor Details
-
DBURI
Create DBURI from a string, combining a JDBC URL and query parameters.From the JDBC URL component, infer:
- JDBC driver class
- supported languages
- default source code types
- default schemas
From the query component, define these values, overriding any defaults:
- parsing language
- source code types
- schemas
- source code
- Parameters:
string- URL string- Throws:
URISyntaxExceptionIOException
-
DBURI
Create DBURI from a URI, combining a JDBC URL and query parameters.From the JDBC URL component, infer:
- JDBC driver class
- supported languages
- default source code types
- default schemas
From the query component, define these values, overriding any defaults:
- parsing language
- source code types
- schemas
- source code
- Parameters:
uri- A URI- Throws:
URISyntaxExceptionIOException
-
-
Method Details
-
getUri
-
setUri
-
getDbType
-
setDbType
-
getSchemasList
-
setSchemasList
-
getSourceCodeTypesList
-
setSourceCodeTypesList
-
getSourceCodeNamesList
-
setSourceCodeNamesList
-
getLanguagesList
-
setLanguagesList
-
getDriverClass
-
setDriverClass
-
getCharacterSet
-
setCharacterSet
-
getSourceCodeType
public int getSourceCodeType() -
setSourceCodeType
public void setSourceCodeType(int sourceCodeType) -
getSubprotocol
-
setSubprotocol
-
getSubnamePrefix
-
setSubnamePrefix
-
getParameters
-
setParameters
-
getURL
- Returns:
- the url
-
setURL
- Parameters:
jdbcURL- the url to set
-
toString
-