Class DBType
- java.lang.Object
-
- net.sourceforge.pmd.util.database.DBType
-
public class DBType extends java.lang.Object
Encapsulate the settings needed to access database source code.- Author:
- sturton
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DBType.Property
The names of the properties
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getCharacterSet()
java.lang.String
getDriverClass()
java.lang.String
getLanguages()
java.util.Properties
getProperties()
java.lang.String
getPropertiesSource()
static java.util.Properties
getResourceBundleAsProperties(java.util.ResourceBundle resourceBundle)
ConvertresourceBundle
to usableProperties
.int
getSourceCodeReturnType()
java.lang.String
getSourceCodeTypes()
int
hashCode()
void
setProperties(java.util.Properties properties)
java.lang.String
toString()
-
-
-
Constructor Detail
-
DBType
public DBType(java.lang.String dbType) throws java.lang.Exception
- Parameters:
dbType
-- Throws:
java.lang.Exception
-
DBType
public DBType(java.lang.String subProtocol, java.lang.String subnamePrefix) throws java.io.IOException
Load the most specific dbType for the protocol- Parameters:
subProtocol
-subnamePrefix
-- Throws:
java.io.IOException
-
-
Method Detail
-
getProperties
public java.util.Properties getProperties()
-
getResourceBundleAsProperties
public static java.util.Properties getResourceBundleAsProperties(java.util.ResourceBundle resourceBundle)
ConvertresourceBundle
to usableProperties
.- Parameters:
resourceBundle
- ResourceBundle- Returns:
- Properties
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getDriverClass
public java.lang.String getDriverClass()
- Returns:
- the driverClass
-
getCharacterSet
public java.lang.String getCharacterSet()
- Returns:
- the characterSet
-
getSourceCodeTypes
public java.lang.String getSourceCodeTypes()
- Returns:
- the sourceCodeTypes
-
getLanguages
public java.lang.String getLanguages()
- Returns:
- the languages
-
getSourceCodeReturnType
public int getSourceCodeReturnType()
- Returns:
- the sourceCodeReturnType
-
getPropertiesSource
public java.lang.String getPropertiesSource()
- Returns:
- the propertiesSource
-
setProperties
public void setProperties(java.util.Properties properties)
- Parameters:
properties
- the properties to set
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-