From 2ab1eeb036e0d5344eef5751c2602927a2040c93 Mon Sep 17 00:00:00 2001 From: mujah Date: Wed, 9 Nov 2016 18:36:32 +0800 Subject: [PATCH] refactoring model --- .../spring/data/solr/model/Product.java | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/spring-data-solr/src/main/java/com/baeldung/spring/data/solr/model/Product.java b/spring-data-solr/src/main/java/com/baeldung/spring/data/solr/model/Product.java index 54962b7e51..7cd0890718 100644 --- a/spring-data-solr/src/main/java/com/baeldung/spring/data/solr/model/Product.java +++ b/spring-data-solr/src/main/java/com/baeldung/spring/data/solr/model/Product.java @@ -6,58 +6,50 @@ import org.springframework.data.solr.core.mapping.SolrDocument; @SolrDocument(solrCoreName = "product") public class Product { - + @Id - @Indexed(name="id",type = "string") + @Indexed(name = "id", type = "string") private String id; - - @Indexed(name="name",type = "string") + @Indexed(name = "name", type = "string") private String name; - - @Indexed(name="category",type = "string") + @Indexed(name = "category", type = "string") private String category; - - @Indexed(name="description",type = "string") + @Indexed(name = "description", type = "string") private String description; - public Product(){ - - } - - public String getId() { return id; } - + public void setId(String id) { this.id = id; } - + public String getName() { return name; } - + public void setName(String name) { this.name = name; } - + public String getCategory() { return category; } - + public void setCategory(String category) { this.category = category; } - + public String getDescription() { return description; } - + public void setDescription(String description) { this.description = description; } - + }