在hiberate中些了个实体类bo,一般还要些一个相应的映射文件,把它映射到数据库中。但是像这样的bo大家见过吗?怎么回事?
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Table(name = "tree", catalog = "tree")
public class Capacity extends RemovableBO implements OptimizationLockedBOStyleTwo {
// Fields
/**
*
*/
private static final long serialVersionUID = 2772774L;
private String capacityId;
private String driverLicence;
// Property accessors
@Id
@Column(name = "CAPACITY_ID", unique = true, nullable = false, length = 16)
public String getCapacityId() {
return this.capacityId;
}
public void setCapacityId(String capacityId) {
this.capacityId = capacityId;
}
@Column(name = "DRIVER_LICENCE", length = 64)
public String getDriverLicence() {
return driverLicence;
}
@Override
@Transient
public Serializable getEntityId() {
return this.getCapacityId();
}
}
[b]问题补充:[/b]
各位gg能讲的再详细点吗?谢谢/