首页>代码>spring data JPA运用案例(oracle)>/HomeWork-JPQL/src/main/java/com/jcl/pojo/User.java
package com.jcl.pojo;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the USERS database table.
 * 
 */
@Entity
@Table(name="USERS")
@NamedQuery(name="User.findAll", query="SELECT u FROM User u")
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="U_ID")
	private long uId;

	@Column(name="U_NAME")
	private String uName;

	//bi-directional one-to-one association to Carid
	@OneToOne
	@JoinColumn(name="I_ID")
	private Carid carid;

	public User() {
	}

	public long getUId() {
		return this.uId;
	}

	public void setUId(long uId) {
		this.uId = uId;
	}

	public String getUName() {
		return this.uName;
	}

	public void setUName(String uName) {
		this.uName = uName;
	}

	public Carid getCarid() {
		return this.carid;
	}

	public void setCarid(Carid carid) {
		this.carid = carid;
	}

	public User(long uId, String uName, Carid carid) {
		super();
		this.uId = uId;
		this.uName = uName;
		this.carid = carid;
	}

	@Override
	public String toString() {
		return "User [uId=" + uId + ", uName=" + uName + ", carid=" + carid + "]";
	}

}
最近下载更多
wh7019230  LV1 2021年1月28日
1483128871  LV1 2019年4月25日
jiajia91323  LV23 2019年4月22日
最代码官方  LV167 2018年12月9日
最近浏览更多
jkjfdgbkl  LV2 2023年11月2日
dmyafda  LV5 2023年3月26日
crosa_Don  LV18 2022年6月7日
big123  LV2 2021年11月5日
dongliuxi  LV3 2021年10月26日
wangxiaolaugh  LV2 2021年9月30日
徐万强  LV9 2021年6月2日
939867966  LV1 2021年2月25日
wh7019230  LV1 2021年1月28日
250979238  LV2 2021年1月24日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友