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

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


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

	@Id
	@Column(name="I_ID")
	private long iId;

	@Column(name="I_CARD")
	private String iCard;

	@Column(name="I_COLOR")
	private String iColor;

	@Column(name="I_TEXTURE")
	private String iTexture;

	@Column(name="I_TYPE")
	private String iType;

	//bi-directional one-to-one association to Car
	@OneToOne
	@JoinColumn(name="C_ID")
	private Car car;

	//bi-directional one-to-one association to User
	@OneToOne(mappedBy="carid")
	private User user;

	public Carid() {
	}

	public long getIId() {
		return this.iId;
	}

	public void setIId(long iId) {
		this.iId = iId;
	}

	public String getICard() {
		return this.iCard;
	}

	public void setICard(String iCard) {
		this.iCard = iCard;
	}

	public String getIColor() {
		return this.iColor;
	}

	public void setIColor(String iColor) {
		this.iColor = iColor;
	}

	public String getITexture() {
		return this.iTexture;
	}

	public void setITexture(String iTexture) {
		this.iTexture = iTexture;
	}

	public String getIType() {
		return this.iType;
	}

	public void setIType(String iType) {
		this.iType = iType;
	}

	public Car getCar() {
		return this.car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String toString() {
		return "Carid [iId=" + iId + ", iCard=" + iCard + ", iColor=" + iColor + ", iTexture=" + iTexture + ", iType="
				+ iType + ", car=" + car + "]";
	}

	public Carid(long iId, String iCard, String iColor, String iTexture, String iType, Car car, User user) {
		super();
		this.iId = iId;
		this.iCard = iCard;
		this.iColor = iColor;
		this.iTexture = iTexture;
		this.iType = iType;
		this.car = car;
		this.user = user;
	}
	public Carid(long iId, String iCard, String iColor, String iTexture, String iType, Car car) {
		super();
		this.iId = iId;
		this.iCard = iCard;
		this.iColor = iColor;
		this.iTexture = iTexture;
		this.iType = iType;
		this.car = car;
	}
}
最近下载更多
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日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友