changeset 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 b11e88004fca
children 056f8e1e995e
files m-toolbox/classes/@ao/ao.m m-toolbox/classes/@collection/collection.m m-toolbox/classes/@filterbank/filterbank.m m-toolbox/classes/@matrix/matrix.m m-toolbox/classes/@mfir/mfir.m m-toolbox/classes/@miir/miir.m m-toolbox/classes/@parfrac/parfrac.m m-toolbox/classes/@pest/pest.m m-toolbox/classes/@plist/plist.m m-toolbox/classes/@pzmodel/pzmodel.m m-toolbox/classes/@rational/rational.m m-toolbox/classes/@smodel/smodel.m m-toolbox/classes/@ssm/ssm.m m-toolbox/classes/@timespan/timespan.m
diffstat 14 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/m-toolbox/classes/@ao/ao.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@ao/ao.m	Mon Dec 05 16:20:06 2011 +0100
@@ -580,7 +580,7 @@
           %%%%%%%%%%%%%%%%%%%%%%%%%%%   two inputs   %%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           
-          if isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')
+          if isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')
             %%%%%%%%%%   ao(database-object, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.PROC1, 'constructing from database object');
             pl = plist('conn', varargin{1}, 'id', varargin{2});
--- a/m-toolbox/classes/@collection/collection.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@collection/collection.m	Mon Dec 05 16:20:06 2011 +0100
@@ -155,7 +155,7 @@
             inObjs = [num2cell(reshape(varargin{1}, 1, [])), num2cell(reshape(varargin{2}, 1, []))];
             obj = obj.fromInput(plist('objs', inObjs));
             
-          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  f = collection(<database-object>, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
--- a/m-toolbox/classes/@filterbank/filterbank.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@filterbank/filterbank.m	Mon Dec 05 16:20:06 2011 +0100
@@ -130,7 +130,7 @@
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%   two input   %%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  mdl = filterbank(<database-object>, [IDs])   %%%%%%%%%%
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
             
--- a/m-toolbox/classes/@matrix/matrix.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@matrix/matrix.m	Mon Dec 05 16:20:06 2011 +0100
@@ -151,7 +151,7 @@
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
             obj = obj.fromInput(plist('objs', varargin), callerIsMethod);
             
-          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) ...
+          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) ...
               && isnumeric(varargin{2})
             %%%%%%%%%%  f = matrix(<database-object>, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
--- a/m-toolbox/classes/@mfir/mfir.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@mfir/mfir.m	Mon Dec 05 16:20:06 2011 +0100
@@ -222,7 +222,7 @@
             utils.helper.msg(msg.OPROC1, 'constructing from AO %s', varargin{1}.name);
             obj = fromAO(obj, pset(varargin{2}, 'AO', varargin{1}));
             
-          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) ...
+          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) ...
               && isnumeric(varargin{2})
             %%%%%%%%%%  f = mfir(<database-object>, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
--- a/m-toolbox/classes/@miir/miir.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@miir/miir.m	Mon Dec 05 16:20:06 2011 +0100
@@ -248,7 +248,7 @@
           plf = combine(plist('parfrac', varargin{1}),varargin{2});
           obj =  fromParfrac(obj, plf);
           
-        elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+        elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
           %%%%%%%%%%  f = miir(<database-object>, [IDs])   %%%%%%%%%%
           utils.helper.msg(msg.OPROC1, 'retrieve from repository');
           obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
--- a/m-toolbox/classes/@parfrac/parfrac.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@parfrac/parfrac.m	Mon Dec 05 16:20:06 2011 +0100
@@ -202,7 +202,7 @@
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%% Two inputs %%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  f = parfrac(<database-object>, [IDs])   %%%%%%%%%%
             % parfrac(<database-object>, [IDs])
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
--- a/m-toolbox/classes/@pest/pest.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@pest/pest.m	Mon Dec 05 16:20:06 2011 +0100
@@ -305,7 +305,7 @@
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%   two input   %%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  obj = pest(<database-object>, [IDs])   %%%%%%%%%%
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
             
--- a/m-toolbox/classes/@plist/plist.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@plist/plist.m	Mon Dec 05 16:20:06 2011 +0100
@@ -163,7 +163,7 @@
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%   two inputs   %%%%%%%%%%%%%%%%%%%%%%%%%%%%
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
         
-        if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection'))
+        if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection'))
           %%%%%%%%%%%   From DATABASE   %%%%%%%%%%%
           utils.helper.msg(msg.OPROC1, 'constructing from database object');
           pl = pl.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
--- a/m-toolbox/classes/@pzmodel/pzmodel.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@pzmodel/pzmodel.m	Mon Dec 05 16:20:06 2011 +0100
@@ -191,7 +191,7 @@
           %%%%%%%%%%%%% Two inputs %%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           
-          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  f = pzmodel(<database-object>, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
--- a/m-toolbox/classes/@rational/rational.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@rational/rational.m	Mon Dec 05 16:20:06 2011 +0100
@@ -180,7 +180,7 @@
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%% Two inputs %%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  f = rational(<database-object>, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
--- a/m-toolbox/classes/@smodel/smodel.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@smodel/smodel.m	Mon Dec 05 16:20:06 2011 +0100
@@ -311,7 +311,7 @@
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%   two input   %%%%%%%%%%%%%%%%%%%%%%%%%%%
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          if (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  mdl = smodel(<database-object>, [IDs])   %%%%%%%%%%
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
             
--- a/m-toolbox/classes/@ssm/ssm.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@ssm/ssm.m	Mon Dec 05 16:20:06 2011 +0100
@@ -617,7 +617,7 @@
               s.validate();
             end
             
-          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  s = ssm(<database-object>, [IDs])   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
             s = s.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));
--- a/m-toolbox/classes/@timespan/timespan.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@timespan/timespan.m	Mon Dec 05 16:20:06 2011 +0100
@@ -215,7 +215,7 @@
             pli = plist('startT', varargin{1}, 'endT', varargin{2});
             obj = obj.fromTimespanDef(pli);
 
-          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')) && isnumeric(varargin{2})
+          elseif (isa(varargin{1}, 'database') || isa(varargin{1}, 'java.sql.Connection')) && isnumeric(varargin{2})
             %%%%%%%%%%  f = timespan(database, IDs)   %%%%%%%%%%
             utils.helper.msg(msg.OPROC1, 'retrieve from repository');
             obj = obj.fromRepository(plist('conn', varargin{1}, 'id', varargin{2}));