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

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


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

	@Id
	@Column(name="C_ID")
	private long cId;

	@Column(name="C_BRAND")
	private String cBrand;

	@Column(name="C_COLOR")
	private String cColor;

	@Column(name="C_MODEL")
	private String cModel;

	@Column(name="C_PRICE")
	private BigDecimal cPrice;

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

	public Car() {
	}

	public long getCId() {
		return this.cId;
	}

	public void setCId(long cId) {
		this.cId = cId;
	}

	public String getCBrand() {
		return this.cBrand;
	}

	public void setCBrand(String cBrand) {
		this.cBrand = cBrand;
	}

	public String getCColor() {
		return this.cColor;
	}

	public void setCColor(String cColor) {
		this.cColor = cColor;
	}

	public String getCModel() {
		return this.cModel;
	}

	public void setCModel(String cModel) {
		this.cModel = cModel;
	}

	public BigDecimal getCPrice() {
		return this.cPrice;
	}

	public void setCPrice(BigDecimal cPrice) {
		this.cPrice = cPrice;
	}

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

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

	public Car(long cId, String cBrand, String cColor, String cModel, BigDecimal cPrice, Carid carid) {
		super();
		this.cId = cId;
		this.cBrand = cBrand;
		this.cColor = cColor;
		this.cModel = cModel;
		this.cPrice = cPrice;
		this.carid = carid;
	}
	public Car(long cId, String cBrand, String cColor, String cModel, BigDecimal cPrice) {
		super();
		this.cId = cId;
		this.cBrand = cBrand;
		this.cColor = cColor;
		this.cModel = cModel;
		this.cPrice = cPrice;
	}

	@Override
	public String toString() {
		return "Car [cId=" + cId + ", cBrand=" + cBrand + ", cColor=" + cColor + ", cModel=" + cModel + ", cPrice="
				+ cPrice + "]";
	}

}
最近下载更多
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日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友