Station.java 6.23 KB
package com.bsth.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.geolatte.geom.Point;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * 
 * @ClassName : Station(站点实体类)
 * 
 * @Author : bsth@lq
 * 
 * @Description : TODO(站点)
 * 
 * @Data :2016-04-19
 *
 * @Version 公交调度系统BS版 0.1
 * 
 */

@Entity
@Table(name = "bsth_c_station")
@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}, ignoreUnknown = true)
@DynamicInsert
@DynamicUpdate
public class Station {
	
	@Id
	private Integer id;

	/**
	 * 站点编码
	 */
	private String stationCode;

	/**
	 * 站点名称
	 */
	private String stationName;

	/**
	 * 所在道路编码
 	 */
	private String roadCoding;

	/**
	 * 站点的具体地址
 	 */
	private String address;

	/**
	 * 是否撤销 1:撤销 0:未撤销
	 */
	private Integer destroy = 0;

	/**
	 * 版本号
 	 */
	private Integer versions;
	
	/**
	 * 是否有电子站牌 这里是老调度系统的原始字段,暂时保留该字段。
	 */
	private Integer isHaveLed;
	
	/** 是否有候车亭  这里是老调度系统的原始字段,暂时保留该字段。*/
	private Integer isHaveShelter;
	
	/** 是否港湾式公交站  这里是老调度系统的原始字段,暂时保留该字段。*/
	private Integer isHarbourStation;

	/**
	 * 描述
 	 */
	private String descriptions;

	/**
	 * 创建人
 	 */
	private Integer createBy;

	/**
	 * 修改人
 	 */
	private Integer updateBy;

	/**
	 * 创建日期
 	 */
	@Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
	private Date createDate;

	/**
	 * 修改日期
 	 */
	@Column(name = "update_date", columnDefinition = "timestamp  DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
	private Date updateDate;

	/**
	 * 中心点 字符格式 Point(lon, lat)
	 */
	@JsonIgnore
	private Point centerPoint;

	/**
	 * 中心点 数字格式
	 */
	@Transient
	private String centerPointWkt;

	@JsonIgnore
	private Point centerPointWgs;

	@Transient
	private String centerPointWgsWkt;

	/**
	 * 途经线路
	 */
	private String passLines;

	private Integer ewDirection;

	private Integer snDirection;

	private String standardStationCode;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getStationCode() {
		return stationCode;
	}

	public void setStationCode(String stationCode) {
		this.stationCode = stationCode;
	}

	public String getStationName() {
		return stationName;
	}

	public void setStationName(String stationName) {
		this.stationName = stationName;
	}

	public String getRoadCoding() {
		return roadCoding;
	}

	public void setRoadCoding(String roadCoding) {
		this.roadCoding = roadCoding;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Integer getDestroy() {
		return destroy;
	}

	public void setDestroy(Integer destroy) {
		this.destroy = destroy;
	}

	public Integer getVersions() {
		return versions;
	}

	public void setVersions(Integer versions) {
		this.versions = versions;
	}

	public Integer getIsHaveLed() {
		return isHaveLed;
	}

	public void setIsHaveLed(Integer isHaveLed) {
		this.isHaveLed = isHaveLed;
	}

	public Integer getIsHaveShelter() {
		return isHaveShelter;
	}

	public void setIsHaveShelter(Integer isHaveShelter) {
		this.isHaveShelter = isHaveShelter;
	}

	public Integer getIsHarbourStation() {
		return isHarbourStation;
	}

	public void setIsHarbourStation(Integer isHarbourStation) {
		this.isHarbourStation = isHarbourStation;
	}

	public String getDescriptions() {
		return descriptions;
	}

	public void setDescriptions(String descriptions) {
		this.descriptions = descriptions;
	}

	public Integer getCreateBy() {
		return createBy;
	}

	public void setCreateBy(Integer createBy) {
		this.createBy = createBy;
	}

	public Integer getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(Integer updateBy) {
		this.updateBy = updateBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Point getCenterPoint() {
		return centerPoint;
	}

	public void setCenterPoint(Point centerPoint) {
		this.centerPoint = centerPoint;
	}

	public String getCenterPointWkt() {
		if (centerPointWkt == null && this.centerPoint != null) {
			centerPointWkt = this.centerPoint.toString();
		}

		return centerPointWkt;
	}

	public void setCenterPointWkt(String centerPointWkt) {
		this.centerPointWkt = centerPointWkt;
	}

	public Point getCenterPointWgs() {
		return centerPointWgs;
	}

	public void setCenterPointWgs(Point centerPointWgs) {
		this.centerPointWgs = centerPointWgs;
	}

	public String getCenterPointWgsWkt() {
		if (centerPointWgsWkt == null && this.centerPointWgs != null) {
			centerPointWgsWkt = this.centerPointWgs .toString();
		}

		return centerPointWgsWkt;
	}

	public void setCenterPointWgsWkt(String centerPointWgsWkt) {
		this.centerPointWgsWkt = centerPointWgsWkt;
	}

	public String getPassLines() {
		return passLines;
	}

	public void setPassLines(String passLines) {
		this.passLines = passLines;
	}

	public Integer getEwDirection() {
		return ewDirection;
	}

	public void setEwDirection(Integer ewDirection) {
		this.ewDirection = ewDirection;
	}

	public Integer getSnDirection() {
		return snDirection;
	}

	public void setSnDirection(Integer snDirection) {
		this.snDirection = snDirection;
	}

	public String getStandardStationCode() {
		return standardStationCode;
	}

	public void setStandardStationCode(String standardStationCode) {
		this.standardStationCode = standardStationCode;
	}
}