# Class ConnectionParameter

java.lang.Object
uk.ac.starlink.task.Parameter<Connection>
uk.ac.starlink.ttools.task.ConnectionParameter

public class ConnectionParameter extends uk.ac.starlink.task.Parameter<Connection>
Parameter for acquiring a connection to a database using JDBC.

Since:
  15 Aug 2007
Author:
  Mark Taylor

## Field Summary

### Fields inherited from class uk.ac.starlink.task.Parameter

`BY_NAME`

## Constructor Summary

Constructors
Constructor
Description
`ConnectionParameter(String name)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`uk.ac.starlink.task.Parameter<?>[]`
`getAssociatedParameters()`
Returns parameters associated with this.
`String`
`objectToString(uk.ac.starlink.task.Environment env, Connection connection)`
`Connection`
`stringToObject(uk.ac.starlink.task.Environment env, String stringValue)`

### Methods inherited from class uk.ac.starlink.task.Parameter

`clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getUsage, getValueClass, isNullPermitted, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setUsage, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ConnectionParameter

public ConnectionParameter(String name)
Constructor.

Parameters:
  `name` - parameter name

## Method Details

### getAssociatedParameters

public uk.ac.starlink.task.Parameter<?>[] getAssociatedParameters()
Returns parameters associated with this.

Returns:
  array containing user and password parameters

### stringToObject

public Connection stringToObject(uk.ac.starlink.task.Environment env, String stringValue) throws uk.ac.starlink.task.TaskException

Specified by:
  `stringToObject` in class `uk.ac.starlink.task.Parameter<Connection>`
Throws:
  `uk.ac.starlink.task.TaskException`

### objectToString

public String objectToString(uk.ac.starlink.task.Environment env, Connection connection)

Overrides:
  `objectToString` in class `uk.ac.starlink.task.Parameter<Connection>`