多对一的增删改查-实体类

package com.lzl.pojo;

import java.io.Serializable;

/**
* @author Administrator
*
*/
public class Company implements Serializable{

/**
*
*/
private static final long serialVersionUID = -6941413336662415209L;
private Integer id;
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Company(Integer id, String name) {
super();
this.id = id;
this.name = name;
}
@Override
public String toString() {
return "Company [id=" + id + ", name=" + name + "]";
}
public Company() {
super();
// TODO Auto-generated constructor stub
}

}

-------------------------------------------------------------------------------------------

package com.lzl.pojo;

import java.io.Serializable;


public class Pantent implements Serializable{

/**
*
*/
private static final long serialVersionUID = 6090484139922582701L;
private Integer id;
private Integer company_id;
private String pantentno;
private String pantentname;
private String category;
private Double sales1;
private Double sales2;
private Double wucha;
private Double rewards;
private Double sales1zong;
private Double sales2zong;
private Double rewardszong;
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCompany_id() {
return company_id;
}
public void setCompany_id(Integer company_id) {
this.company_id = company_id;
}
public String getPantentno() {
return pantentno;
}
public void setPantentno(String pantentno) {
this.pantentno = pantentno;
}
public String getPantentname() {
return pantentname;
}
public void setPantentname(String pantentname) {
this.pantentname = pantentname;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public Double getSales1() {
return sales1;
}
public void setSales1(Double sales1) {
this.sales1 = sales1;
}
public Double getSales2() {
return sales2;
}
public void setSales2(Double sales2) {
this.sales2 = sales2;
}
public Double getWucha() {
return wucha;
}
public void setWucha(Double wucha) {
this.wucha = wucha;
}
public Double getRewards() {
return rewards;
}
public void setRewards(Double rewards) {
this.rewards = rewards;
}
public Double getSales1zong() {
return sales1zong;
}
public void setSales1zong(Double sales1zong) {
this.sales1zong = sales1zong;
}
public Double getSales2zong() {
return sales2zong;
}
public void setSales2zong(Double sales2zong) {
this.sales2zong = sales2zong;
}
public Double getRewardszong() {
return rewardszong;
}
public void setRewardszong(Double rewardszong) {
this.rewardszong = rewardszong;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Pantent(Integer id, Integer company_id, String pantentno, String pantentname, String category, Double sales1,
Double sales2, Double wucha, Double rewards, Double sales1zong, Double sales2zong, Double rewardszong,
String name) {
super();
this.id = id;
this.company_id = company_id;
this.pantentno = pantentno;
this.pantentname = pantentname;
this.category = category;
this.sales1 = sales1;
this.sales2 = sales2;
this.wucha = wucha;
this.rewards = rewards;
this.sales1zong = sales1zong;
this.sales2zong = sales2zong;
this.rewardszong = rewardszong;
this.name = name;
}
@Override
public String toString() {
return "Pantent [id=" + id + ", company_id=" + company_id + ", pantentno=" + pantentno + ", pantentname="
+ pantentname + ", category=" + category + ", sales1=" + sales1 + ", sales2=" + sales2 + ", wucha="
+ wucha + ", rewards=" + rewards + ", sales1zong=" + sales1zong + ", sales2zong=" + sales2zong
+ ", rewardszong=" + rewardszong + ", name=" + name + "]";
}
public Pantent() {
super();
// TODO Auto-generated constructor stub
}
 }

原文地址:https://www.cnblogs.com/liuzhaolong/p/12921341.html