comparison m-toolbox/classes/@mfir/mfir.m @ 23:a71a40911c27 database-connection-manager

Update check for repository connection parameter in constructors
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
comparison
equal deleted inserted replaced
22:b11e88004fca 23:a71a40911c27
220 if isa(varargin{1}, 'ao') 220 if isa(varargin{1}, 'ao')
221 %%%%%%%%%% f = mfir(ao-object, plist-object) %%%%%%%%%% 221 %%%%%%%%%% f = mfir(ao-object, plist-object) %%%%%%%%%%
222 utils.helper.msg(msg.OPROC1, 'constructing from AO %s', varargin{1}.name); 222 utils.helper.msg(msg.OPROC1, 'constructing from AO %s', varargin{1}.name);
223 obj = fromAO(obj, pset(varargin{2}, 'AO', varargin{1})); 223 obj = fromAO(obj, pset(varargin{2}, 'AO', varargin{1}));
224 224
225 elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) ... 225 elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) ...
226 && isnumeric(varargin{2}) 226 && isnumeric(varargin{2})
227 %%%%%%%%%% f = mfir(<database-object>, [IDs]) %%%%%%%%%% 227 %%%%%%%%%% f = mfir(<database-object>, [IDs]) %%%%%%%%%%
228 utils.helper.msg(msg.OPROC1, 'retrieve from repository'); 228 utils.helper.msg(msg.OPROC1, 'retrieve from repository');
229 obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2})); 229 obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
230 230