Mercurial > hg > ltpda
comparison testing/utp_1.1/utp_fcns/utpCloseConnection.m @ 50:7d2e2e065cf1 database-connection-manager
Update unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:24:37 +0100 |
parents | 409a22968d5e |
children |
comparison
equal
deleted
inserted
replaced
49:0bcdf74587d1 | 50:7d2e2e065cf1 |
---|---|
9 % | 9 % |
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
11 | 11 |
12 function utpCloseConnection(conn) | 12 function utpCloseConnection(conn) |
13 | 13 |
14 if isa(conn, 'database') | 14 conn.close(); |
15 % MATLAB connection | |
16 if isconnection(conn) | |
17 close(conn); | |
18 end | |
19 elseif isa(conn, 'mpipeline.repository.RepositoryConnection') | |
20 % java connection | |
21 conn.closeConnection(); | |
22 else | |
23 error('### Unknown connection [%s]. Can not close the connection', class(conn)); | |
24 end | |
25 | 15 |
26 end | 16 end |