public class ConnectionConverter extends AbstractBaseConverter<Connection>
String
into a SQL Connection
.
For a description of the format, see DriverManager.getConnection(String)
.
Example:
@Parameter(names = { "--connection" }, converter = ConnectionConverter.class)
private Connection connection;
Connection
,
DriverManager.getConnection(String)
failOnNull, targetClass
Constructor and Description |
---|
ConnectionConverter(String optionName)
Constructs a converter.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
convertImpl(String value)
Converts a value.
|
convert, getErrorString, isSingle, newParameterException, newParameterException, split, toInt, toURI
public ConnectionConverter(String optionName)
optionName
- The option name, may be null.protected Connection convertImpl(String value) throws SQLException
AbstractBaseConverter
convertImpl
in class AbstractBaseConverter<Connection>
value
- the value to convertSQLException
Copyright © 2016-2016 Gary Gregory. All Rights Reserved.
Use is subject to The Apache Software License, Version 2.0