信息时代的生存哲学

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
Listing B
/*
 * 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;
      }
 
 
}
posted on 2004-08-11 13:08  信息时代的生存哲学  阅读(594)  评论(0)    收藏  举报