Changeset 3479


Ignore:
Timestamp:
09/07/10 15:25:09 (17 months ago)
Author:
rwagner
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molgenis_projects/col7a1/handwritten/java/plugin/ui/BackgroundPlugin.java

    r2659 r3479  
    88package plugin.ui; 
    99 
     10import java.util.ArrayList; 
     11import java.util.List; 
     12 
    1013import org.molgenis.framework.db.Database; 
    1114import org.molgenis.framework.ui.ScreenModel; 
    1215import org.molgenis.framework.ui.PluginModel; 
     16import org.molgenis.framework.ui.html.HtmlForm; 
     17import org.molgenis.framework.ui.html.HtmlInput; 
     18import org.molgenis.framework.ui.html.IntInput; 
     19import org.molgenis.framework.ui.html.StringInput; 
    1320import org.molgenis.util.Tuple; 
     21 
     22import col7a1.Mutation; 
     23import col7a1.Patient; 
    1424 
    1525public class BackgroundPlugin extends PluginModel 
    1626{ 
     27        private int numMutations; 
     28        private int numPatients; 
     29 
    1730        public BackgroundPlugin(String name, ScreenModel parent) 
    1831        { 
     
    5669        public void reload(Database db) 
    5770        { 
    58 //              try 
    59 //              { 
    60 //                      Database db = this.getDatabase(); 
    61 //                      Query q = db.query(Experiment.class); 
    62 //                      q.like("name", "test"); 
    63 //                      List<Experiment> recentExperiments = q.find(); 
    64 //                       
    65 //                      //do something 
    66 //              } 
    67 //              catch(Exception e) 
    68 //              { 
    69 //                      //... 
    70 //              } 
     71                try 
     72                { 
     73                        this.numMutations = db.query(Mutation.class).find().size(); 
     74                        this.numPatients  = db.query(Patient.class).find().size(); 
     75                } 
     76                catch(Exception e) 
     77                { 
     78                        //... 
     79                } 
    7180        } 
    7281         
     
    7988                return true; 
    8089        } 
     90         
     91        public int getNumMutations() 
     92        { 
     93                return this.numMutations; 
     94        } 
     95         
     96        public int getNumPatients() 
     97        { 
     98                return this.numPatients; 
     99        } 
    81100} 
Note: See TracChangeset for help on using the changeset viewer.