comparison m-toolbox/classes/@ltpda_uo/retrieve.m @ 43:bc767aaa99a8

CVS Update
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 11:09:25 +0100
parents f0afece42f48
children a59cdb8aaf31
comparison
equal deleted inserted replaced
0:f0afece42f48 43:bc767aaa99a8
26 % then the output is a cell array of objects. 26 % then the output is a cell array of objects.
27 % 27 %
28 % If only a single object is requested, it is returned as an object, 28 % If only a single object is requested, it is returned as an object,
29 % not packed in a cell array. 29 % not packed in a cell array.
30 % 30 %
31 % VERSION: $Id: retrieve.m,v 1.28 2011/07/01 14:38:57 ingo Exp $ 31 % VERSION: $Id: retrieve.m,v 1.29 2011/11/30 06:49:01 hewitson Exp $
32 % 32 %
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 34
35 function varargout = retrieve(varargin) 35 function varargout = retrieve(varargin)
36 36
139 % Get object 139 % Get object
140 if binary 140 if binary
141 % Retrieve the bytes 141 % Retrieve the bytes
142 q = sprintf('select mat from bobjs where obj_id="%d"', ids(j)); 142 q = sprintf('select mat from bobjs where obj_id="%d"', ids(j));
143 results = conn.query(q); 143 results = conn.query(q);
144 % dd = '';
144 while results.next 145 while results.next
145 dd = results.getObject(1); 146 dd = results.getObject(1);
146 end 147 end
147 148
148 if strcmp(dd, 'No Data') || isempty(dd) 149 if strcmp(dd, 'No Data') || isempty(dd)
203 end % End binary 204 end % End binary
204 end % End id loop 205 end % End id loop
205 206
206 catch ME 207 catch ME
207 fprintf(2, [ME.message, '\n\n']); 208 fprintf(2, [ME.message, '\n\n']);
208 utils.helper.msg(msg.PROC1, '### Retrieve error.'); 209 conn.setLocked(false);
209 rethrow(ME) 210 rethrow(ME)
210 end 211 end
211 212
212 if unlockConnection 213 if unlockConnection
213 conn.setLocked(false); 214 conn.setLocked(false);
244 else 245 else
245 sets = {'Default'}; 246 sets = {'Default'};
246 pl = getDefaultPlist; 247 pl = getDefaultPlist;
247 end 248 end
248 % Build info object 249 % Build info object
249 ii = minfo(mfilename, 'ltpda_uo', 'ltpda', utils.const.categories.internal, '$Id: retrieve.m,v 1.28 2011/07/01 14:38:57 ingo Exp $', sets, pl); 250 ii = minfo(mfilename, 'ltpda_uo', 'ltpda', utils.const.categories.internal, '$Id: retrieve.m,v 1.29 2011/11/30 06:49:01 hewitson Exp $', sets, pl);
250 ii.setModifier(false); 251 ii.setModifier(false);
251 end 252 end
252 253
253 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
254 % 255 %