/* * Sample class for Lucene article to demonstrate a business * value object. * * @author Jeff Linwood, jeff@greenninja.com * */ package com.greenninja.lucene; public class Product { private String name; private String shortDescription; private String longDescription; private String id; /** * Constructor to create a new product */ public Product(String i, String n, String sd, String ld) { this.id = i; this.name= n; this.shortDescription = sd; this.longDescription = ld; } /** * Get the unique id * * @return */ public String getId() { return id; } /** * Get a long description for a web page * * @return */ public String getLongDescription() { return longDescription; } /** * Get the name of the product * * @return */ public String getName() { return name; } /** * Get a short summary description of the product, for catalogs * * @return */ public String getShortDescription() { return shortDescription; } /** * Set the unique id of the product * * @param string */ public void setId(String string) { id = string; } /** * Set the long description of the product * * @param string */ public void setLongDescription(String string) { longDescription = string; } /** * Set the name of the product * * @param string */ public void setName(String string) { name = string; } /** * Set the summary description of the product * * @param string */ public void setShortDescription(String string) { shortDescription = string; } } |