public class DerbyConnectionCreator extends AbstractConnectionCreator
Modifier and Type | Class and Description |
---|---|
static class |
DerbyConnectionCreator.DerbySubprotocol
Enum that document the allowed subprotocols for a derby jdbc
connection.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DERBY_CLIENT_DRIVER_CLASS
Class name for the client jdbc driver class.
|
static java.lang.String |
DERBY_EMBEDDED_DRIVER_CLASS
Class name for the embedded jdbc driver class.
|
static java.lang.String |
SUBPROTOCOL_CLASS_REFTYPE
Optional subprotocol for the derby driver - valid values are defined by
the
DerbyConnectionCreator.DerbySubprotocol enum. |
static java.lang.String |
SUBTYPE_DERBY
Connection subtype for Derby - used as a value for
DatabaseProvider.SUBTYPE_CLASS_REFTYPE |
Constructor and Description |
---|
DerbyConnectionCreator() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowNullPassword()
Returns false by default if
password is an allowed
property. |
java.lang.String |
getConnectionURL(java.util.Properties props)
The default implementation on this abstract class return the
DatabaseProvider.DRIVER_CLASS_REFTYPE property.
|
java.lang.String |
getDriverClassName(java.util.Properties props)
The default implementation on this class returns the
DatabaseProvider.CUSTOM_URL_CLASS_REFTYPE property.
|
java.util.Collection<java.lang.String> |
listAllowedProperties()
Gets a list of the properties that are relevant to this creator.
|
java.util.Collection<JDBCParameterInfo> |
listJDBCParameterInfos(java.util.Properties connectionProps)
Lists the information for jdbc parameters that are associated with the
given connection.
|
java.util.Collection<java.lang.String> |
listRequiredProperties()
Gets a list of the properties that are required for this creator to be
able to create a connection.
|
convertToJDBCParameterInfos, getBundle, getConnection, getDriver, getInvalidURLMessage, getJDBCProperties, getLogger, getPropertyOrThrow, hasLength, loadDriver, setCustomProperties, shouldEncrypt, shouldPromptForPassword, throwMissingPropertyException
public static final java.lang.String DERBY_EMBEDDED_DRIVER_CLASS
public static final java.lang.String DERBY_CLIENT_DRIVER_CLASS
public static final java.lang.String SUBTYPE_DERBY
DatabaseProvider.SUBTYPE_CLASS_REFTYPE
public static final java.lang.String SUBPROTOCOL_CLASS_REFTYPE
DerbyConnectionCreator.DerbySubprotocol
enum. As all Properties values are
Strings the enum is only for reference.public java.lang.String getDriverClassName(java.util.Properties props) throws java.sql.SQLException
AbstractConnectionCreator
getDriverClassName
in interface ConnectionCreator
getDriverClassName
in class AbstractConnectionCreator
java.sql.SQLException
public java.lang.String getConnectionURL(java.util.Properties props) throws java.sql.SQLException
AbstractConnectionCreator
getConnectionURL
in interface ConnectionCreator
getConnectionURL
in class AbstractConnectionCreator
props
- the properties from the underlying DatabaseProvider
connection definitionjava.sql.SQLException
- if a valid connection URL cannot be created with
the given props.public java.util.Collection<java.lang.String> listAllowedProperties()
ConnectionCreator
listAllowedProperties
in interface ConnectionCreator
listAllowedProperties
in class AbstractConnectionCreator
ConnectionCreator.listRequiredProperties()
public java.util.Collection<java.lang.String> listRequiredProperties()
ConnectionCreator
DatabaseProvider.SUBTYPE_CLASS_REFTYPE
is always implicitly
required, it does not need to be included in this list.
listRequiredProperties
in interface ConnectionCreator
listRequiredProperties
in class AbstractConnectionCreator
ConnectionCreator.listAllowedProperties()
protected boolean allowNullPassword()
AbstractConnectionCreator
password
is an allowed
property.allowNullPassword
in class AbstractConnectionCreator
AbstractConnectionCreator.listAllowedProperties()
public java.util.Collection<JDBCParameterInfo> listJDBCParameterInfos(java.util.Properties connectionProps) throws java.sql.SQLException
ConnectionCreator
These parameters are supported by the
DatabaseProvider.PARAMETERS_CLASS_REFTYPE
property, and do not
include any properties that we test separately in this layer via the
connection properties (like
user
and
password
).
listJDBCParameterInfos
in interface ConnectionCreator
listJDBCParameterInfos
in class AbstractConnectionCreator
connectionProps
- the connection properties to get the parameter
information forjava.sql.SQLException