use of wooteco.prolog.member.domain.MemberTag in project prolog by woowacourse.
the class MemberTagService method registerMemberTag.
public void registerMemberTag(Tags tags, Member member) {
final List<MemberTag> memberTags = tags.toMemberTags(member);
memberTagRepository.register(new MemberTags(memberTags));
}
use of wooteco.prolog.member.domain.MemberTag in project prolog by woowacourse.
the class MemberTagService method removeMemberTag.
public void removeMemberTag(Tags tags, Member member) {
final List<MemberTag> memberTags = tags.toMemberTags(member);
memberTagRepository.unregister(new MemberTags(memberTags));
}
use of wooteco.prolog.member.domain.MemberTag in project prolog by woowacourse.
the class MemberTagService method updateMemberTag.
public void updateMemberTag(Tags originalTags, Tags newTags, Member member) {
final List<MemberTag> originalMemberTags = originalTags.toMemberTags(member);
final List<MemberTag> newMemberTags = newTags.toMemberTags(member);
memberTagRepository.update(new MemberTags(originalMemberTags), new MemberTags(newMemberTags));
}
use of wooteco.prolog.member.domain.MemberTag in project prolog by woowacourse.
the class MemberTagApplicationListener method updateMemberTags.
private void updateMemberTags() {
final List<StudylogTag> studylogTags = studylogTagService.findAll();
for (StudylogTag studylogTag : studylogTags) {
final Tag tag = studylogTag.getTag();
final Member member = studylogTag.getStudylog().getMember();
memberTagRepository.register(new MemberTags(Collections.singletonList(new MemberTag(member, tag))));
}
}
Aggregations