/** * Updates and persists the tag entity per the specified update request. * * @param tagEntity the tag entity * @param request the tag update request * @param parentTagEntity the parent tag entity, maybe null */ private void updateTagEntity(TagEntity tagEntity, TagUpdateRequest request, TagEntity parentTagEntity) { tagEntity.setDisplayName(request.getDisplayName()); tagEntity.setSearchScoreMultiplier(request.getSearchScoreMultiplier()); tagEntity.setDescription(request.getDescription()); tagEntity.setParentTagEntity(parentTagEntity); tagDao.saveAndRefresh(tagEntity); }
/** * Updates and persists the tag entity per the specified update request. * * @param tagEntity the tag entity * @param request the tag update request * @param parentTagEntity the parent tag entity, maybe null */ private void updateTagEntity(TagEntity tagEntity, TagUpdateRequest request, TagEntity parentTagEntity) { tagEntity.setDisplayName(request.getDisplayName()); tagEntity.setSearchScoreMultiplier(request.getSearchScoreMultiplier()); tagEntity.setDescription(request.getDescription()); tagEntity.setParentTagEntity(parentTagEntity); tagDao.saveAndRefresh(tagEntity); }
/** * Creates and persists a new Tag entity. * * @param request the tag create request * @param tagTypeEntity the specified tag type entity. * @param parentTagEntity the specified parent tag entity * * @return the newly created tag entity. */ private TagEntity createTagEntity(TagCreateRequest request, TagTypeEntity tagTypeEntity, TagEntity parentTagEntity) { TagEntity tagEntity = new TagEntity(); tagEntity.setTagType(tagTypeEntity); tagEntity.setTagCode(request.getTagKey().getTagCode()); tagEntity.setDisplayName(request.getDisplayName()); tagEntity.setSearchScoreMultiplier(request.getSearchScoreMultiplier()); tagEntity.setDescription(request.getDescription()); tagEntity.setParentTagEntity(parentTagEntity); return tagDao.saveAndRefresh(tagEntity); }
/** * Creates and persists a new Tag entity. * * @param request the tag create request * @param tagTypeEntity the specified tag type entity. * @param parentTagEntity the specified parent tag entity * * @return the newly created tag entity. */ private TagEntity createTagEntity(TagCreateRequest request, TagTypeEntity tagTypeEntity, TagEntity parentTagEntity) { TagEntity tagEntity = new TagEntity(); tagEntity.setTagType(tagTypeEntity); tagEntity.setTagCode(request.getTagKey().getTagCode()); tagEntity.setDisplayName(request.getDisplayName()); tagEntity.setSearchScoreMultiplier(request.getSearchScoreMultiplier()); tagEntity.setDescription(request.getDescription()); tagEntity.setParentTagEntity(parentTagEntity); return tagDao.saveAndRefresh(tagEntity); }
/** * Creates and persists a new tag entity. * * @param tagTypeEntity the tag type entity * @param tagCode the tag code * @param tagDisplayName the tag display name * @param tagSearchScoreMultiplier the tag's search score multiplier * @param tagDescription the description of the tag * @param parentTagEntity the parent tag entity * * @return the newly created tag entity */ public TagEntity createTagEntity(TagTypeEntity tagTypeEntity, String tagCode, String tagDisplayName, BigDecimal tagSearchScoreMultiplier, String tagDescription, TagEntity parentTagEntity) { TagEntity tagEntity = new TagEntity(); tagEntity.setTagType(tagTypeEntity); tagEntity.setTagCode(tagCode); tagEntity.setDisplayName(tagDisplayName); tagEntity.setSearchScoreMultiplier(tagSearchScoreMultiplier); tagEntity.setDescription(tagDescription); tagEntity.setParentTagEntity(parentTagEntity); return tagDao.saveAndRefresh(tagEntity); } }