Search in sources :

Example 1 with DeleteUnidentifiedModelException

use of easytests.core.services.exceptions.DeleteUnidentifiedModelException in project easy-tests by malinink.

the class SolutionsService method delete.

@Override
public void delete(SolutionModelInterface solutionModel) {
    final SolutionEntity solutionEntity = this.map(solutionModel);
    if (solutionEntity.getId() == null) {
        throw new DeleteUnidentifiedModelException();
    }
    this.solutionsMapper.delete(solutionEntity);
}
Also used : SolutionEntity(easytests.core.entities.SolutionEntity) DeleteUnidentifiedModelException(easytests.core.services.exceptions.DeleteUnidentifiedModelException)

Example 2 with DeleteUnidentifiedModelException

use of easytests.core.services.exceptions.DeleteUnidentifiedModelException in project easy-tests by malinink.

the class TopicsService method delete.

@Override
public void delete(TopicModelInterface topicModel) {
    final TopicEntity topicEntity = this.map(topicModel);
    if (topicEntity.getId() == null) {
        throw new DeleteUnidentifiedModelException();
    }
    this.topicsMapper.delete(topicEntity);
}
Also used : TopicEntity(easytests.core.entities.TopicEntity) DeleteUnidentifiedModelException(easytests.core.services.exceptions.DeleteUnidentifiedModelException)

Example 3 with DeleteUnidentifiedModelException

use of easytests.core.services.exceptions.DeleteUnidentifiedModelException in project easy-tests by malinink.

the class UsersService method delete.

@Override
public void delete(UserModelInterface userModel) {
    final UserEntity userEntity = this.map(userModel);
    if (userEntity.getId() == null) {
        throw new DeleteUnidentifiedModelException();
    }
    this.usersMapper.delete(userEntity);
}
Also used : DeleteUnidentifiedModelException(easytests.core.services.exceptions.DeleteUnidentifiedModelException) UserEntity(easytests.core.entities.UserEntity)

Example 4 with DeleteUnidentifiedModelException

use of easytests.core.services.exceptions.DeleteUnidentifiedModelException in project easy-tests by malinink.

the class IssuesService method delete.

@Override
public void delete(IssueModelInterface issueModel) {
    final IssueEntity issueEntity = this.map(issueModel);
    if (issueEntity.getId() == null) {
        throw new DeleteUnidentifiedModelException();
    }
    this.issuesMapper.delete(issueEntity);
}
Also used : IssueEntity(easytests.core.entities.IssueEntity) DeleteUnidentifiedModelException(easytests.core.services.exceptions.DeleteUnidentifiedModelException)

Example 5 with DeleteUnidentifiedModelException

use of easytests.core.services.exceptions.DeleteUnidentifiedModelException in project easy-tests by malinink.

the class AnswersService method delete.

@Override
public void delete(AnswerModelInterface answerModel) {
    final AnswerEntity answerEntity = this.map(answerModel);
    if (answerEntity.getId() == null) {
        throw new DeleteUnidentifiedModelException();
    }
    this.answersMapper.delete(answerEntity);
}
Also used : AnswerEntity(easytests.core.entities.AnswerEntity) DeleteUnidentifiedModelException(easytests.core.services.exceptions.DeleteUnidentifiedModelException)

Aggregations

DeleteUnidentifiedModelException (easytests.core.services.exceptions.DeleteUnidentifiedModelException)11 AnswerEntity (easytests.core.entities.AnswerEntity)1 IssueEntity (easytests.core.entities.IssueEntity)1 IssueStandardQuestionTypeOptionEntity (easytests.core.entities.IssueStandardQuestionTypeOptionEntity)1 IssueStandardTopicPriorityEntity (easytests.core.entities.IssueStandardTopicPriorityEntity)1 PointEntity (easytests.core.entities.PointEntity)1 QuestionEntity (easytests.core.entities.QuestionEntity)1 QuizEntity (easytests.core.entities.QuizEntity)1 SolutionEntity (easytests.core.entities.SolutionEntity)1 TesteeEntity (easytests.core.entities.TesteeEntity)1 TopicEntity (easytests.core.entities.TopicEntity)1 UserEntity (easytests.core.entities.UserEntity)1