java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/Uvod.java
changeset 170 56deca862adc
parent 145 0efefbf5f8b6
child 171 e619057bad66
     1.1 --- a/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/Uvod.java	Sun Jun 20 14:46:47 2010 +0200
     1.2 +++ b/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/Uvod.java	Sat Jan 15 00:57:45 2011 +0100
     1.3 @@ -1,5 +1,6 @@
     1.4  package cz.frantovo.nekurak.web;
     1.5  
     1.6 +import cz.frantovo.nekurak.dto.Kategorie;
     1.7  import cz.frantovo.nekurak.dto.Podnik;
     1.8  import java.util.Collection;
     1.9  
    1.10 @@ -10,8 +11,21 @@
    1.11  public class Uvod {
    1.12  
    1.13  	private HledacSluzby hledac = new HledacSluzby();
    1.14 +	Integer kategorie = null;
    1.15 +
    1.16 +	public void setKategorie(Integer kategorie) {
    1.17 +		this.kategorie = kategorie;
    1.18 +	}
    1.19 +
    1.20 +	public Integer getKategorie() {
    1.21 +		return kategorie;
    1.22 +	}
    1.23  
    1.24  	public Collection<Podnik> getPodniky() {
    1.25 -		return hledac.getPodnikEJB().getPodniky();
    1.26 +		if (kategorie == null) {
    1.27 +			return hledac.getPodnikEJB().getPodniky();
    1.28 +		} else {
    1.29 +			return hledac.getPodnikEJB().getPodniky(new Kategorie(kategorie));
    1.30 +		}
    1.31  	}
    1.32  }