java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/Hlasovani.java
author František Kučera <franta-hg@frantovo.cz>
Tue, 27 Apr 2010 17:13:23 +0200
changeset 108 f74a9fc683da
parent 107 e8371105fcc8
child 145 0efefbf5f8b6
permissions -rw-r--r--
Hlasování: zobrazujeme grafy na základě hlasování uloženého v databázi.
     1 package cz.frantovo.nekurak.web;
     2 
     3 import cz.frantovo.nekurak.dto.VysledekHlasovani;
     4 
     5 /**
     6  *
     7  * @author fiki
     8  */
     9 public class Hlasovani {
    10 
    11     private HledacSluzby hledac = new HledacSluzby();
    12     private int podnik;
    13     private VysledekHlasovani vysledek;
    14 
    15     public void setPodnik(int podnik) {
    16 	this.podnik = podnik;
    17 	vysledek = null;
    18     }
    19 
    20     public VysledekHlasovani getVysledek() {
    21 	if (vysledek == null) {
    22 	    vysledek = hledac.getPodnikEJB().getVysledekHlasovani(podnik);
    23 	}
    24 	return vysledek;
    25     }
    26 }