Mercurial > hg > ltpda
comparison m-toolbox/classes/@collection/fromRepository.m @ 24:056f8e1e995e database-connection-manager
Properly record history in fromRepository constructors
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | b11e88004fca |
children |
comparison
equal
deleted
inserted
replaced
23:a71a40911c27 | 24:056f8e1e995e |
---|---|
28 cids = find(pl, 'cid'); | 28 cids = find(pl, 'cid'); |
29 bin = find(pl, 'binary'); | 29 bin = find(pl, 'binary'); |
30 | 30 |
31 collFound = false; | 31 collFound = false; |
32 | 32 |
33 %%% check if using binary or not: 'yes'/'no' or true/false or | 33 % check if using binary download |
34 %%% 'true'/'false' | |
35 bin = utils.prog.yes2true(bin); | 34 bin = utils.prog.yes2true(bin); |
36 | 35 |
37 % database connection | 36 % database connection |
38 conn = LTPDADatabaseConnectionManager().connect(pl); | 37 conn = LTPDADatabaseConnectionManager().connect(pl); |
39 | 38 |
63 robj = ltpda_uo.retrieve(conn, 'binary', id); | 62 robj = ltpda_uo.retrieve(conn, 'binary', id); |
64 else | 63 else |
65 robj = ltpda_uo.retrieve(conn, id); | 64 robj = ltpda_uo.retrieve(conn, id); |
66 end | 65 end |
67 | 66 |
68 %---- remove the connection from the history plist | 67 %---- Set connection parameters in the plist |
69 if plh.isparam('conn') | 68 utils.repository.adjustPlist(conn, plh); |
70 plh.remove('conn'); | |
71 end | |
72 | 69 |
73 %---- Set only the ID of the current object to the plist | 70 %---- Set only the ID of the current object to the plist |
74 plh.pset('ID', id); | 71 plh.pset('ID', id); |
75 | 72 |
76 %---- Add history | 73 %---- Add history |