我见过的大多数例子都是这样的,
private int productId;
private String proName;
private double price;
public void **set**ProductId(int productId)
{
this.productId = productId;
}
public int **get**ProductId()
{
return productId;
}
public void setProName(String proName)
{
this.proName = proName;
}
public String getProName()
{
return proName;
}
public void setPrice(double price)
{
this.price = price;
}
public double getPrice()
{
return price;
}
使用 Hibernate 时是否需要这种命名约定?