author | František Kučera <franta-hg@frantovo.cz> |
Thu Mar 04 11:00:19 2010 +0100 (2010-03-04) | |
changeset 50 | d259a2dfea67 |
parent 40 | 67d332d48562 |
child 56 | 7021b32ce3d1 |
permissions | -rw-r--r-- |
franta-hg@28 | 1 |
package cz.frantovo.nekurak.ejb; |
franta-hg@28 | 2 |
|
franta-hg@39 | 3 |
import cz.frantovo.nekurak.dao.PodnikDAO; |
franta-hg@28 | 4 |
import cz.frantovo.nekurak.dto.Podnik; |
franta-hg@28 | 5 |
import java.util.Collection; |
franta-hg@40 | 6 |
import javax.annotation.security.RolesAllowed; |
franta-hg@39 | 7 |
import javax.ejb.EJB; |
franta-hg@28 | 8 |
import javax.ejb.Stateless; |
franta-hg@28 | 9 |
|
franta-hg@28 | 10 |
/** |
franta-hg@28 | 11 |
* |
franta-hg@28 | 12 |
* @author fiki |
franta-hg@28 | 13 |
*/ |
franta-hg@28 | 14 |
@Stateless |
franta-hg@39 | 15 |
public class PodnikEJB implements PodnikRemote { |
franta-hg@28 | 16 |
|
franta-hg@39 | 17 |
@EJB |
franta-hg@50 | 18 |
private PodnikDAO podnikDAO; |
franta-hg@28 | 19 |
|
franta-hg@28 | 20 |
public Collection<Podnik> getPodniky() { |
franta-hg@39 | 21 |
Collection<Podnik> vysledek = podnikDAO.getPodniky(); |
franta-hg@39 | 22 |
return vysledek; |
franta-hg@28 | 23 |
} |
franta-hg@40 | 24 |
|
franta-hg@40 | 25 |
@RolesAllowed("opravneny") |
franta-hg@40 | 26 |
public void zalozPodnik(Podnik p) { |
franta-hg@40 | 27 |
podnikDAO.uloz(p); |
franta-hg@40 | 28 |
} |
franta-hg@40 | 29 |
|
franta-hg@40 | 30 |
@RolesAllowed("opravneny") |
franta-hg@40 | 31 |
public void upravPodnik(Podnik p) { |
franta-hg@40 | 32 |
podnikDAO.uloz(p); |
franta-hg@40 | 33 |
} |
franta-hg@28 | 34 |
} |