⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product.java

📁 这是一个好的compass的示例,想学习的人可以下载看一看...
💻 JAVA
字号:
package com.lwz.model;

import org.compass.annotations.*;
/**
 * Product entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Searchable
public class Product implements java.io.Serializable {

	// Fields
	
	@SearchableId
	private Integer id;
	@SearchableProperty(name="name")
	private String name;
	@SearchableProperty(name="price")
	private Double price;
	@SearchableProperty(name="brand")
	private String brand;
	@SearchableProperty(name="description")
	private String description;

	// Constructors

	/** default constructor */
	public Product() {
	}

	/** full constructor */
	public Product( String name, Double price, String brand,
			String description) {
		this.name = name;
		this.price = price;
		this.brand = brand;
		this.description = description;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getBrand() {
		return this.brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -