package com.casic.PgInterface.devTable.domain; import com.casic.PgInterface.construction.domain.PgConstruction; import javax.persistence.*; import java.io.Serializable; import java.util.Date; import java.util.List; /** * Created by yxw on 2017/10/31. */ @Entity @Table(name = "PG_PARTITION") @SequenceGenerator(name = "SEQ_PG_PARTITION_ID", sequenceName = "SEQ_PG_PARTITION_ID", allocationSize = 1, initialValue = 1) public class PgPartition implements Serializable { private static final long serialVersionUID = 1L; private long id; private String parName;//分区名称 // private String road;//所属道路 private String pgPosition;//仓段位置 private String pgNum;//仓位数量 private String pgType;//仓位类型 private String pgLength;//分区长度 private Date buildDate;//建设年代 private String material;//建设材质 private int active;//状态位 private long pgRoadId;//所属道路 private List<PipeGallery> pipeGalleryList;//管廊仓 private List<PgConstruction> pgConstructionList;//施工 @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID") public long getId() { return id; } public void setId(long id) { this.id = id; } @Column(name = "PARNAME") public String getParName() { return parName; } public void setParName(String parName) { this.parName = parName; } // @Column(name = "ROAD") // public String getRoad() { // return road; // } // // public void setRoad(String road) { // this.road = road; // } @Column(name = "PGPOSITION") public String getPgPosition() { return pgPosition; } public void setPgPosition(String pgPosition) { this.pgPosition = pgPosition; } @Column(name = "PGNUM") public String getPgNum() { return pgNum; } public void setPgNum(String pgNum) { this.pgNum = pgNum; } @Column(name = "PGTYPE") public String getPgType() { return pgType; } public void setPgType(String pgType) { this.pgType = pgType; } @Column(name = "PGLENGTH") public String getPgLength() { return pgLength; } public void setPgLength(String pgLength) { this.pgLength = pgLength; } @Column(name = "BUILDDATE") public Date getBuildDate() { return buildDate; } public void setBuildDate(Date buildDate) { this.buildDate = buildDate; } @Column(name = "MATERIAL") public String getMaterial() { return material; } public void setMaterial(String material) { this.material = material; } @Column(name = "ACTIVE") public int getActive() { return active; } public void setActive(int active) { this.active = active; } @Column(name="PGROADID") public long getPgRoadId() { return pgRoadId; } public void setPgRoadId(long pgRoadId) { this.pgRoadId = pgRoadId; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId") public List<PipeGallery> getPipeGalleryList() { return pipeGalleryList; } public void setPipeGalleryList(List<PipeGallery> pipeGalleryList) { this.pipeGalleryList = pipeGalleryList; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId") public List<PgConstruction> getPgConstructionList() { return pgConstructionList; } public void setPgConstructionList(List<PgConstruction> pgConstructionList) { this.pgConstructionList = pgConstructionList; } }