java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/Atom.java
author František Kučera <franta-hg@frantovo.cz>
Sun Jun 20 14:46:47 2010 +0200 (2010-06-20)
changeset 145 0efefbf5f8b6
parent 49 9b2a597cc862
permissions -rw-r--r--
Formátování kódu, důsledné používání tabulátorů, drobné úpravy, StringBuilder
franta-hg@49
     1
package cz.frantovo.nekurak.web;
franta-hg@49
     2
franta-hg@49
     3
import cz.frantovo.nekurak.dto.Podnik;
franta-hg@49
     4
import java.util.Collection;
franta-hg@49
     5
import java.util.Date;
franta-hg@49
     6
franta-hg@49
     7
/**
franta-hg@49
     8
 *
franta-hg@49
     9
 * @author fiki
franta-hg@49
    10
 */
franta-hg@49
    11
public class Atom {
franta-hg@49
    12
franta-hg@145
    13
	private HledacSluzby hledac = new HledacSluzby();
franta-hg@145
    14
	private Collection<Podnik> podniky;
franta-hg@49
    15
franta-hg@145
    16
	public Collection<Podnik> getPodniky() {
franta-hg@145
    17
		if (podniky == null) {
franta-hg@145
    18
			podniky = hledac.getPodnikEJB().getPodniky();
franta-hg@145
    19
		}
franta-hg@145
    20
		return podniky;
franta-hg@49
    21
	}
franta-hg@49
    22
franta-hg@145
    23
	public Date getDatumAktualizace() {
franta-hg@145
    24
		for (Podnik p : getPodniky()) {
franta-hg@145
    25
			return p.getDatum();
franta-hg@145
    26
		}
franta-hg@145
    27
		return new Date();
franta-hg@49
    28
	}
franta-hg@49
    29
}