Ejemplo n.º 1
0
        public void SaveMassTags()
        {
            var lights = new List<MassTagLight>();
            for (var i = 0; i < 100; i++)
            {
                lights.Add(new MassTagLight());
                lights[i].Id = i;
            }

            IMassTagDAO cache = new MassTagDAOHibernate();
            cache.AddAll(lights);
        }
Ejemplo n.º 2
0
        public static FeatureDataAccessProviders CreateDataAccessProviders(string path, bool deleteIfExists)
        {
            if (deleteIfExists)
            {
                var exists = File.Exists(path);
                if (exists)
                {
                    File.Delete(path);
                }
            }
            try
            {
                NHibernateUtil.ConnectToDatabase(path, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            IUmcDAO                   featureCache      = new UmcDAOHibernate();
            IUmcClusterDAO            clusterCache      = new UmcClusterDAOHibernate();
            IMSFeatureDAO             msFeatureCache    = new MSFeatureDAOHibernate();
            IMSnFeatureDAO            msnFeatureCache   = new MSnFeatureDAOHibernate();
            IMsnFeatureToMSFeatureDAO msnMSCache        = new MSnFeatureToMSFeatureDAOHibernate();
            IDatasetDAO               datasetCache      = new DatasetDAOHibernate();
            IMassTagDAO               massTagCache      = new MassTagDAOHibernate();
            IMassTagMatchDAO          massTagMatchCache = new MassTagMatchDAO();
            ISequenceToMsnFeatureDAO  sequenceMap       = new SequenceToMsnDAOHibernate();

            var providers =
                new FeatureDataAccessProviders(featureCache,
                                               clusterCache,
                                               msFeatureCache,
                                               msnFeatureCache,
                                               msnMSCache,
                                               datasetCache,
                                               massTagMatchCache,
                                               massTagCache,
                                               new FactorDAOHibernate(),
                                               new DatasetToFactorDAOHibernate(),
                                               new MSMSClusterMapClusterDAOHibernate(),
                                               new DatabaseSearchSequenceDAOHibernate(),
                                               sequenceMap)
            {
                ScanSummaryDao           = new ScanSummaryDAOHibernate(),
                ScanSummaryProviderCache = new ScanSummaryProviderCache(),
                OptionsDao = new OptionsDAOHibernate(),
            };

            return(providers);
        }
Ejemplo n.º 3
0
        public void SaveMassTags()
        {
            var lights = new List <MassTagLight>();

            for (var i = 0; i < 100; i++)
            {
                lights.Add(new MassTagLight());
                lights[i].Id = i;
            }

            IMassTagDAO cache = new MassTagDAOHibernate();

            cache.AddAll(lights);
        }
Ejemplo n.º 4
0
        public static FeatureDataAccessProviders CreateDataAccessProviders(string path, bool deleteIfExists)
        {
            if (deleteIfExists)
            {
                var exists = File.Exists(path);
                if (exists)
                {
                    File.Delete(path);
                }
            }
            try
            {
                NHibernateUtil.ConnectToDatabase(path, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            IUmcDAO featureCache = new UmcDAOHibernate();
            IUmcClusterDAO clusterCache = new UmcClusterDAOHibernate();
            IMSFeatureDAO msFeatureCache = new MSFeatureDAOHibernate();
            IMSnFeatureDAO msnFeatureCache = new MSnFeatureDAOHibernate();
            IMsnFeatureToMSFeatureDAO msnMSCache = new MSnFeatureToMSFeatureDAOHibernate();
            IDatasetDAO datasetCache = new DatasetDAOHibernate();
            IMassTagDAO massTagCache = new MassTagDAOHibernate();
            IMassTagMatchDAO massTagMatchCache = new MassTagMatchDAO();
            ISequenceToMsnFeatureDAO sequenceMap = new SequenceToMsnDAOHibernate();

            var providers =
                new FeatureDataAccessProviders(featureCache,
                    clusterCache,
                    msFeatureCache,
                    msnFeatureCache,
                    msnMSCache,
                    datasetCache,
                    massTagMatchCache,
                    massTagCache,
                    new FactorDAOHibernate(),
                    new DatasetToFactorDAOHibernate(),
                    new MSMSClusterMapClusterDAOHibernate(),
                    new DatabaseSearchSequenceDAOHiberate(),
                    sequenceMap);

            return providers;
        }