Package br.com.mystudies.service

Source Code of br.com.mystudies.service.StoryServiceBean

package br.com.mystudies.service;

import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;

import br.com.mystudies.domain.entity.Story;
import br.com.mystudies.domain.enun.StoryStatus;
import br.com.mystudies.service.persistence.StoryDao;

@Stateless
@Remote(StoryService.class)
public class StoryServiceBean implements StoryService {

  @EJB
  private StoryDao storyDao;


  @Override
  public Story getStory(Long id) {
    // FIXME: validate parameters
    return storyDao.getStory(id);
  }


  @Override
  public Story updateStatusStory(Long storyID, StoryStatus storyStatus) {
    // FIXME: validate parameters

    Story story =
        getStory(storyID);


    story.setStatus(storyStatus);


    return storyDao.update(story);
  }

}
TOP

Related Classes of br.com.mystudies.service.StoryServiceBean

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.