Mercurial > hg > ltpda
comparison m-toolbox/classes/@collection/collection.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 |
---|---|
153 if isa(varargin{1}, 'ltpda_uo') && isa(varargin{2}, 'ltpda_uo') | 153 if isa(varargin{1}, 'ltpda_uo') && isa(varargin{2}, 'ltpda_uo') |
154 %%%%%%%%%% f = collection(a1, a2) %%%%%%%%%% | 154 %%%%%%%%%% f = collection(a1, a2) %%%%%%%%%% |
155 inObjs = [num2cell(reshape(varargin{1}, 1, [])), num2cell(reshape(varargin{2}, 1, []))]; | 155 inObjs = [num2cell(reshape(varargin{1}, 1, [])), num2cell(reshape(varargin{2}, 1, []))]; |
156 obj = obj.fromInput(plist('objs', inObjs)); | 156 obj = obj.fromInput(plist('objs', inObjs)); |
157 | 157 |
158 elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2}) | 158 elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2}) |
159 %%%%%%%%%% f = collection(<database-object>, [IDs]) %%%%%%%%%% | 159 %%%%%%%%%% f = collection(<database-object>, [IDs]) %%%%%%%%%% |
160 utils.helper.msg(msg.OPROC1, 'retrieve from repository'); | 160 utils.helper.msg(msg.OPROC1, 'retrieve from repository'); |
161 obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2})); | 161 obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2})); |
162 | 162 |
163 elseif isa(varargin{1}, 'ltpda_uo') && isa(varargin{2}, 'plist') && isempty(varargin{2}.params) | 163 elseif isa(varargin{1}, 'ltpda_uo') && isa(varargin{2}, 'plist') && isempty(varargin{2}.params) |