product.java
来自「这是一个好的compass的示例,想学习的人可以下载看一看...」· Java 代码 · 共 82 行
JAVA
82 行
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 + =
减小字号Ctrl + -
显示快捷键?