Changeset 3479
- Timestamp:
- 09/07/10 15:25:09 (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molgenis_projects/col7a1/handwritten/java/plugin/ui/BackgroundPlugin.java
r2659 r3479 8 8 package plugin.ui; 9 9 10 import java.util.ArrayList; 11 import java.util.List; 12 10 13 import org.molgenis.framework.db.Database; 11 14 import org.molgenis.framework.ui.ScreenModel; 12 15 import org.molgenis.framework.ui.PluginModel; 16 import org.molgenis.framework.ui.html.HtmlForm; 17 import org.molgenis.framework.ui.html.HtmlInput; 18 import org.molgenis.framework.ui.html.IntInput; 19 import org.molgenis.framework.ui.html.StringInput; 13 20 import org.molgenis.util.Tuple; 21 22 import col7a1.Mutation; 23 import col7a1.Patient; 14 24 15 25 public class BackgroundPlugin extends PluginModel 16 26 { 27 private int numMutations; 28 private int numPatients; 29 17 30 public BackgroundPlugin(String name, ScreenModel parent) 18 31 { … … 56 69 public void reload(Database db) 57 70 { 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 } 71 80 } 72 81 … … 79 88 return true; 80 89 } 90 91 public int getNumMutations() 92 { 93 return this.numMutations; 94 } 95 96 public int getNumPatients() 97 { 98 return this.numPatients; 99 } 81 100 }
Note: See TracChangeset
for help on using the changeset viewer.