1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/Atom.java Thu Mar 04 10:20:28 2010 +0100
1.3 @@ -0,0 +1,29 @@
1.4 +package cz.frantovo.nekurak.web;
1.5 +
1.6 +import cz.frantovo.nekurak.dto.Podnik;
1.7 +import java.util.Collection;
1.8 +import java.util.Date;
1.9 +
1.10 +/**
1.11 + *
1.12 + * @author fiki
1.13 + */
1.14 +public class Atom {
1.15 +
1.16 + private HledacSluzby hledac = new HledacSluzby();
1.17 + private Collection<Podnik> podniky;
1.18 +
1.19 + public Collection<Podnik> getPodniky() {
1.20 + if (podniky == null) {
1.21 + podniky = hledac.getPodnikEJB().getPodniky();
1.22 + }
1.23 + return podniky;
1.24 + }
1.25 +
1.26 + public Date getDatumAktualizace() {
1.27 + for (Podnik p : getPodniky()) {
1.28 + return p.getDatum();
1.29 + }
1.30 + return new Date();
1.31 + }
1.32 +}