/** * converts a comma separated String to PropertyTagEntities * * @param propertyTagsString * @return */ public List<PropertyTagEntity> convertToTags(String propertyTagsString) { List<PropertyTagEntity> ptes = new ArrayList<>(); if (propertyTagsString != null && !propertyTagsString.isEmpty()) { String[] tagStrings = propertyTagsString.split(","); for (String tagString : tagStrings) { ptes.add(createPropertyTagEntity(tagString)); } } return ptes; }
private List<PropertyTagEntity> createPropertyTags(List<String> tags) { List<PropertyTagEntity> propertyTagEntities = new LinkedList<>(); for (String tag : tags) { propertyTagEntities.add(propertyTagService.addPropertyTag((propertyTagService.createPropertyTagEntity(tag.trim())))); } return propertyTagEntities; } }