On 22 Feb., 00:53, Thomas Broyer <[email protected]> wrote:
> Are your service methods instance methods on POIService? are they returning
> Request<?> (as opposed to InstanceRequest<?,?>) as declared on POIRequest?

Yes, they are. It is a simple spring-backend:



@Transactional(propagation = Propagation.REQUIRED)
public interface POIService {

        @Transactional(readOnly = true)
        Long countPOIs();

        @Transactional(readOnly = true)
        List<POIEntity> findAllPOIs();

        void persist(POIEntity e);

        void remove(POIEntity e);

        @Transactional(readOnly = true)
        POIEntity find(Long id);
}

The impl:


@Component
public class POIServiceBean implements POIService {

        private POIDao dao;

        @Autowired(required = true)
        public void setDao(POIDao dao) {
                this.dao = dao;
        }

        @Override
        public Long countPOIs() {
                return dao.count();
        }

        @Override
        public List<POIEntity> findAllPOIs() {
                return dao.readAll();
        }

        @Override
        public POIEntity find(Long id) {
                return dao.readByPrimaryKey(id);
        }

        @Override
        public void persist(POIEntity e) {
                dao.save(e);

        }

        @Override
        public void remove(POIEntity e) {
                dao.delete(e);
        }

}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to