package com.casic.accessControl.feature.domain; import com.casic.accessControl.user.domain.Company; import com.casic.accessControl.user.domain.User; import javax.persistence.*; import java.util.List; /** * Created by lenovo on 2016/5/16. */ //点的信息 @Entity @Table(name = "feature") public class Feature { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "longitude") private Double longitude; @Column(name = "latitude") private Double latitude; @Column(name = "featureName") private String featureName; @Column(name = "type") private int type; @Column(name = "isValid") private Integer isValid; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "parent") private Feature parent; @OneToMany(fetch = FetchType.LAZY, mappedBy = "parent") private List<Feature> children; @Column(name = "memo") private String memo; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "owner", referencedColumnName = "id") private User owner; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "company", referencedColumnName = "id") private Company company; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Double getLongitude() { return longitude; } public void setLongitude(Double longitude) { this.longitude = longitude; } public Double getLatitude() { return latitude; } public void setLatitude(Double latitude) { this.latitude = latitude; } public String getFeatureName() { return featureName; } public void setFeatureName(String featureName) { this.featureName = featureName; } public int getType() { return type; } public void setType(int type) { this.type = type; } public Integer isValid() { return isValid; } public void setValid(Integer isValid) { this.isValid = isValid; } public Feature getParent() { return parent; } public void setParent(Feature parent) { this.parent = parent; } public List<Feature> getChildren() { return children; } public void setChildren(List<Feature> children) { this.children = children; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } public User getOwner() { return owner; } public void setOwner(User owner) { this.owner = owner; } public Company getCompany() { return company; } public void setCompany(Company company) { this.company = company; } }