
**Inheritance:**
java.lang.Object
```
public class DataConnection
```

Abstracts communication between one or more DataRecordset elements and a non-XML data source.
## Constructors

| Constructor | Description |
| --- | --- |
| [DataConnection()](#DataConnection--) | Constructor. |
## Methods

| Method | Description |
| --- | --- |
| [equals(Object arg0)](#equals-java.lang.Object-) |  |
| [getAlwaysUseConnectionFile()](#getAlwaysUseConnectionFile--) | The default value is false. |
| [getClass()](#getClass--) |  |
| [getCommand()](#getCommand--) | The command string used to query the data source. |
| [getConnectionString()](#getConnectionString--) | The connection string that defines the parameters necessary to connect to a data source. |
| [getFileName()](#getFileName--) | The name of the connection file. |
| [getID()](#getID--) | The ID assigned by Visio for a given connection, unique within the document. |
| [getTimeout()](#getTimeout--) | wait time in minutes while trying to establish a connection before terminating the attempt. |
| [hashCode()](#hashCode--) |  |
| [notify()](#notify--) |  |
| [notifyAll()](#notifyAll--) |  |
| [setAlwaysUseConnectionFile(int value)](#setAlwaysUseConnectionFile-int-) | For the description of this property, please see [getAlwaysUseConnectionFile()](../../com.aspose.diagram/dataconnection\#getAlwaysUseConnectionFile--) |
| [setCommand(String value)](#setCommand-java.lang.String-) | For the description of this property, please see [getCommand()](../../com.aspose.diagram/dataconnection\#getCommand--) |
| [setConnectionString(String value)](#setConnectionString-java.lang.String-) | For the description of this property, please see [getConnectionString()](../../com.aspose.diagram/dataconnection\#getConnectionString--) |
| [setFileName(String value)](#setFileName-java.lang.String-) | For the description of this property, please see [getFileName()](../../com.aspose.diagram/dataconnection\#getFileName--) |
| [setID(long value)](#setID-long-) | For the description of this property, please see \{@link DataConnection\#(getID() & 0xFFFFFFFFL)\} |
| [setTimeout(long value)](#setTimeout-long-) | For the description of this property, please see [getTimeout()](../../com.aspose.diagram/dataconnection\#getTimeout--) |
| [toString()](#toString--) |  |
| [wait()](#wait--) |  |
| [wait(long arg0)](#wait-long-) |  |
| [wait(long arg0, int arg1)](#wait-long-int-) |  |
### DataConnection() {#DataConnection--}
```
public DataConnection()
```


Constructor.

### equals(Object arg0) {#equals-java.lang.Object-}
```
public boolean equals(Object arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | java.lang.Object |  |

**Returns:**
boolean
### getAlwaysUseConnectionFile() {#getAlwaysUseConnectionFile--}
```
public int getAlwaysUseConnectionFile()
```


The default value is false. See Remarks for more information.

**Returns:**
int
### getClass() {#getClass--}
```
public final native Class<?> getClass()
```




**Returns:**
java.lang.Class<?>
### getCommand() {#getCommand--}
```
public String getCommand()
```


The command string used to query the data source.

**Returns:**
java.lang.String
### getConnectionString() {#getConnectionString--}
```
public String getConnectionString()
```


The connection string that defines the parameters necessary to connect to a data source.

**Returns:**
java.lang.String
### getFileName() {#getFileName--}
```
public String getFileName()
```


The name of the connection file. See Remarks for more information.

**Returns:**
java.lang.String
### getID() {#getID--}
```
public long getID()
```


The ID assigned by Visio for a given connection, unique within the document.

**Returns:**
long
### getTimeout() {#getTimeout--}
```
public long getTimeout()
```


wait time in minutes while trying to establish a connection before terminating the attempt.

**Returns:**
long
### hashCode() {#hashCode--}
```
public native int hashCode()
```




**Returns:**
int
### notify() {#notify--}
```
public final native void notify()
```




### notifyAll() {#notifyAll--}
```
public final native void notifyAll()
```




### setAlwaysUseConnectionFile(int value) {#setAlwaysUseConnectionFile-int-}
```
public void setAlwaysUseConnectionFile(int value)
```


For the description of this property, please see [getAlwaysUseConnectionFile()](../../com.aspose.diagram/dataconnection\#getAlwaysUseConnectionFile--)

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int |  |

### setCommand(String value) {#setCommand-java.lang.String-}
```
public void setCommand(String value)
```


For the description of this property, please see [getCommand()](../../com.aspose.diagram/dataconnection\#getCommand--)

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setConnectionString(String value) {#setConnectionString-java.lang.String-}
```
public void setConnectionString(String value)
```


For the description of this property, please see [getConnectionString()](../../com.aspose.diagram/dataconnection\#getConnectionString--)

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setFileName(String value) {#setFileName-java.lang.String-}
```
public void setFileName(String value)
```


For the description of this property, please see [getFileName()](../../com.aspose.diagram/dataconnection\#getFileName--)

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### setID(long value) {#setID-long-}
```
public void setID(long value)
```


For the description of this property, please see \{@link DataConnection\#(getID() & 0xFFFFFFFFL)\}

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | long |  |

### setTimeout(long value) {#setTimeout-long-}
```
public void setTimeout(long value)
```


For the description of this property, please see [getTimeout()](../../com.aspose.diagram/dataconnection\#getTimeout--)

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | long |  |

### toString() {#toString--}
```
public String toString()
```




**Returns:**
java.lang.String
### wait() {#wait--}
```
public final void wait()
```




### wait(long arg0) {#wait-long-}
```
public final native void wait(long arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}
```
public final void wait(long arg0, int arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |

