/** * Update and persist the tag type per specified update request. * * @param tagTypeEntity the tag type entity * @param request the tag type update request */ private void updateTagTypeEntity(TagTypeEntity tagTypeEntity, TagTypeUpdateRequest request) { // Update the tag type entity fields. tagTypeEntity.setDisplayName(request.getDisplayName()); tagTypeEntity.setOrderNumber(request.getTagTypeOrder()); tagTypeEntity.setDescription(request.getDescription()); // Persist and refresh the entity. tagTypeDao.saveAndRefresh(tagTypeEntity); }
/** * Update and persist the tag type per specified update request. * * @param tagTypeEntity the tag type entity * @param request the tag type update request */ private void updateTagTypeEntity(TagTypeEntity tagTypeEntity, TagTypeUpdateRequest request) { // Update the tag type entity fields. tagTypeEntity.setDisplayName(request.getDisplayName()); tagTypeEntity.setOrderNumber(request.getTagTypeOrder()); tagTypeEntity.setDescription(request.getDescription()); // Persist and refresh the entity. tagTypeDao.saveAndRefresh(tagTypeEntity); }
/** * Creates and persists a new tag type entity. * * @param request the tag type create request * * @return the newly created tag type entity */ private TagTypeEntity createTagTypeEntity(TagTypeCreateRequest request) { TagTypeEntity tagTypeEntity = new TagTypeEntity(); tagTypeEntity.setCode(request.getTagTypeKey().getTagTypeCode()); tagTypeEntity.setDisplayName(request.getDisplayName()); tagTypeEntity.setOrderNumber(request.getTagTypeOrder()); tagTypeEntity.setDescription(request.getDescription()); return tagTypeDao.saveAndRefresh(tagTypeEntity); }
/** * Creates and persists a new tag type entity. * * @param request the tag type create request * * @return the newly created tag type entity */ private TagTypeEntity createTagTypeEntity(TagTypeCreateRequest request) { TagTypeEntity tagTypeEntity = new TagTypeEntity(); tagTypeEntity.setCode(request.getTagTypeKey().getTagTypeCode()); tagTypeEntity.setDisplayName(request.getDisplayName()); tagTypeEntity.setOrderNumber(request.getTagTypeOrder()); tagTypeEntity.setDescription(request.getDescription()); return tagTypeDao.saveAndRefresh(tagTypeEntity); }
/** * Creates and persists a new tag type entity. * * @param typeCode the tag type code * @param displayName the display name * @param orderNumber the sorting number * @param description the description * * @return the newly created tag type entity. */ public TagTypeEntity createTagTypeEntity(String typeCode, String displayName, Integer orderNumber, String description) { TagTypeEntity tagTypeEntity = new TagTypeEntity(); tagTypeEntity.setCode(typeCode); tagTypeEntity.setOrderNumber(orderNumber); tagTypeEntity.setDisplayName(displayName); tagTypeEntity.setDescription(description); return tagTypeDao.saveAndRefresh(tagTypeEntity); }