ChoiceServiceImpl.java from crlove at Krugle
Show ChoiceServiceImpl.java syntax highlighted
package com.witfriend.apollo.service.impl;
import java.io.Serializable;
import org.springframework.transaction.annotation.Transactional;
import com.witfriend.apollo.domain.Choice;
import com.witfriend.apollo.domain.Choices;
import com.witfriend.apollo.domain.exception.choice.ChoiceExistedException;
import com.witfriend.apollo.domain.exception.choice.ChoiceNotFoundException;
import com.witfriend.apollo.domain.exception.exam.ExamNotFoundException;
import com.witfriend.apollo.service.ChoiceService;
/**
* DOCUMENT ME!
* @author wangyz
* @since 2006.10.07
* @version $Id$
*/
@Transactional
public class ChoiceServiceImpl implements ChoiceService {
public Serializable add(Choice choice) throws ChoiceExistedException, ExamNotFoundException {
return choice.add();
}
public void edit(Choice choice) throws ChoiceExistedException, ExamNotFoundException {
choice.edit();
}
@Transactional(readOnly = true)
public Choice view(Serializable id) throws ChoiceNotFoundException {
return Choices.view(id);
}
}
See more files for this project here