java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/dao/ClanekDAO.java
changeset 96 9f6225d83611
parent 94 ac4a5fc868eb
child 145 0efefbf5f8b6
     1.1 --- a/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/dao/ClanekDAO.java	Tue Apr 06 01:02:49 2010 +0200
     1.2 +++ b/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/dao/ClanekDAO.java	Tue Apr 06 02:38:47 2010 +0200
     1.3 @@ -4,7 +4,6 @@
     1.4  import java.util.Collection;
     1.5  import javax.ejb.LocalBean;
     1.6  import javax.ejb.Stateless;
     1.7 -import javax.jms.Session;
     1.8  import javax.persistence.EntityManager;
     1.9  import javax.persistence.PersistenceContext;
    1.10  import javax.persistence.Query;
    1.11 @@ -29,11 +28,13 @@
    1.12  	return dotaz.getResultList();
    1.13      }
    1.14  
    1.15 -    public void zalozClanek(Clanek clanek) {
    1.16 +    public int zalozClanek(Clanek clanek) {
    1.17  	em.persist(clanek);
    1.18 +	return clanek.getId();
    1.19      }
    1.20  
    1.21      public void upravClanek(Clanek clanek) {
    1.22 +	System.out.println("XXXXXXX: upravuji článek: " + clanek.getId());
    1.23  	em.merge(clanek);
    1.24      }
    1.25