accountprofile.java
来自「用Hibernate开发的JiveJdon」· Java 代码 · 共 101 行
JAVA
101 行
package com.jdon.jivejdon.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Transient;
import org.apache.struts.upload.FormFile;
import com.jdon.controller.model.Model;
@Entity
public class AccountProfile extends Model{
@Id
@GeneratedValue
private Long priofileId;
@Transient
private FormFile theFile;
@Transient
private String contextPath;
private String imagePath = "/upload/image/default.jpg";
private String address = "中国";
private int point = 30;
@OneToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "userId")
private Account account;
public AccountProfile(){setCacheable(false);}
public String getImagePath(){
return imagePath;
}
public void setImagePath(String imagePath) {
this.imagePath = imagePath;
}
public String getAddress(){
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Long getPriofileId() {
return priofileId;
}
public void setPriofileId(Long priofileId) {
this.priofileId = priofileId;
}
public FormFile getTheFile() {
return theFile;
}
public void setTheFile(FormFile theFile) {
this.theFile = theFile;
}
public String getContextPath() {
return contextPath;
}
public void setContextPath(String contextPath) {
this.contextPath = contextPath;
}
public int getPoint() {
return point;
}
public void setPoint(int point) {
this.point = point;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?