Esempio n. 1
0
        /// <summary>
        /// Load scan summaries from database from dataset specified by <see cref="GroupId" />,
        /// given an existing data-access-object to use.
        /// </summary>
        /// <param name="dao">The existing data-access-object to use to access the database.</param>
        public void LoadFromDatabase(ScanSummaryDAOHibernate dao)
        {
            this.scanSummaryDao = dao;
            var data = dao.FindByDatasetId(this.GroupId);

            foreach (var summary in data)
            {
                this.summary.ScanMetaData.Add(summary.Scan, summary);

                this.MinScan = Math.Min(this.MinScan, summary.Scan);
                this.MaxScan = Math.Max(this.MaxScan, summary.Scan);
            }

            this.TotalScans     = this.MaxScan - this.MinScan;
            this.IsBackedByFile = false;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScanSummaryProvider"/> class.
 /// For initializing a ScanSummaryProvider from a database data access object.
 /// </summary>
 /// <param name="groupId">The identifier for the dataset that this provider is a part of.</param>
 /// <param name="scanSummaryDao"></param>
 public ScanSummaryProvider(int groupId, ScanSummaryDAOHibernate scanSummaryDao)
     : this(groupId)
 {
     this.scanSummaryDao = scanSummaryDao;
     this.IsBackedByFile = false;
 }
Esempio n. 3
0
        /// <summary>
        /// Load scan summaries from database from dataset specified by <see cref="GroupId" />.
        /// </summary>
        public void LoadFromDatabase()
        {
            var dao = new ScanSummaryDAOHibernate();

            this.LoadFromDatabase(dao);
        }