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, toURIpublic ConnectionConverter(String optionName)
optionName - The option name, may be null.protected Connection convertImpl(String value) throws SQLException
AbstractBaseConverterconvertImpl in class AbstractBaseConverter<Connection>value - the value to convertSQLExceptionCopyright © 2016-2016 Gary Gregory. All Rights Reserved.
Use is subject to The Apache Software License, Version 2.0