diff --git a/.gitignore b/.gitignore index 1b7eb22..55b66ce 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ nbdist/ src/main/resources/application.properties .checkstyle .asscache +*.class +com/ diff --git a/src/main/groovy/com/xinra/growthlectures/service/LectureServiceImpl.groovy b/src/main/groovy/com/xinra/growthlectures/service/LectureServiceImpl.groovy index 600ec97..357606a 100644 --- a/src/main/groovy/com/xinra/growthlectures/service/LectureServiceImpl.groovy +++ b/src/main/groovy/com/xinra/growthlectures/service/LectureServiceImpl.groovy @@ -14,11 +14,11 @@ class LectureServiceImpl extends GrowthlecturesServiceImpl { //TODO: remove private LectureSummaryDto getSampleLecture() { - LectureSummaryDtoImpl dto = new LectureSummaryDtoImpl(); + LectureSummaryDto dto = dtoFactory.createDto(LectureSummaryDto.class); NamedDto cat = new NamedDtoImpl() as NamedDto; cat.setName("Peter"); cat.setSlug("peter"); - dto.category = cat; + dto.setCategory(cat); dto.description = "Das ist die Beschreibung"; dto.duration = 817; dto.rating = 3.5D; diff --git a/src/main/groovy/com/xinra/growthlectures/service/LectureSummaryDtoImpl.groovy b/src/main/groovy/com/xinra/growthlectures/service/LectureSummaryDtoImpl.groovy index 9d93c65..e04b4df 100644 --- a/src/main/groovy/com/xinra/growthlectures/service/LectureSummaryDtoImpl.groovy +++ b/src/main/groovy/com/xinra/growthlectures/service/LectureSummaryDtoImpl.groovy @@ -1,16 +1,24 @@ package com.xinra.growthlectures.service import groovy.transform.CompileStatic -import org.apache.catalina.UserDatabase @CompileStatic class LectureSummaryDtoImpl extends NamedDtoImpl { - def NamedDto category; + //def NamedDto category; def Boolean played; def String description; def Double rating; def Integer userRating; def Integer duration; + private NamedDto category; + + public NamedDto getCategory() { + return category; + } + + public void setCategory(NamedDto category) { + this.category = category; + } }