roadinspection.java

来自「Java的框架」· Java 代码 · 共 285 行

JAVA
285
字号
package mcaps.apps.prrm.roadinspection.model;

import mcaps.apps.prrm.roaddefect.model.RoadDefectSeverity;
import mcaps.apps.prrm.roaddefect.model.RoadDefectType;
import mcap.core.base.model.BaseTimeObject;

import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * The <code>RoadInspection</code> represents a road inspection.
 * @author jov
 * @date 13-Oct-2005
 * @version 1.0.1.0
 */
public class RoadInspection extends BaseTimeObject implements Comparable {
	
	private static final long serialVersionUID = 7514804464920367406L;
	private Integer roadDefectId;
	private Integer taskId;
	private String defectDetail;
	private String roadName;
	private String location;
	private String summary;
	private String solution;
	private String defectType = RoadDefectType.NULL;
	private String severity = RoadDefectSeverity.NULL;
	private Boolean repairRequired;
	
		
	/**
	 * Returns the defectDetail.
	 * @return String
	 */
	public String getDefectDetail () {
		return defectDetail;
	}

	
	/**
	 * Sets the defectDetail.
	 * @param defectDetail The defectDetail to set.
	 */
	public void setDefectDetail (String defectDetail) {
		this.defectDetail = defectDetail;
	}

	
	/**
	 * Returns the defectType.
	 * @return RoadDefectType
	 */
	public String getDefectType () {
		return defectType;
	}

	
	/**
	 * Sets the defectType.
	 * @param defectType The defectType to set.
	 */
	public void setDefectType (String defectType) {
		this.defectType = defectType;
	}

	
	/**
	 * Returns the location.
	 * @return String
	 */
	public String getLocation () {
		return location;
	}

	
	/**
	 * Sets the location.
	 * @param location The location to set.
	 */
	public void setLocation (String location) {
		this.location = location;
	}

	
	/**
	 * Returns the repairRequired.
	 * @return Boolean
	 */
	public Boolean getRepairRequired () {
		return repairRequired;
	}

	
	/**
	 * Sets the repairRequired.
	 * @param repairRequired The repairRequired to set.
	 */
	public void setRepairRequired (Boolean repairRequired) {
		this.repairRequired = repairRequired;
	}

	
	/**
	 * Returns the roadDefectId.
	 * @return Integer
	 */
	public Integer getRoadDefectId () {
		return roadDefectId;
	}

	
	/**
	 * Sets the roadDefectId.
	 * @param roadDefectId The roadDefectId to set.
	 */
	public void setRoadDefectId (Integer roadDefectId) {
		this.roadDefectId = roadDefectId;
	}

	
	/**
	 * Returns the roadName.
	 * @return String
	 */
	public String getRoadName () {
		return roadName;
	}

	
	/**
	 * Sets the roadName.
	 * @param roadName The roadName to set.
	 */
	public void setRoadName (String roadName) {
		this.roadName = roadName;
	}

	
	/**
	 * Returns the severity.
	 * @return RoadDefectSeverity
	 */
	public String getSeverity () {
		return severity;
	}

	
	/**
	 * Sets the severity.
	 * @param severity The severity to set.
	 */
	public void setSeverity (String severity) {
		this.severity = severity;
	}

	
	/**
	 * Returns the solution.
	 * @return String
	 */
	public String getSolution () {
		return solution;
	}

	
	/**
	 * Sets the solution.
	 * @param solution The solution to set.
	 */
	public void setSolution (String solution) {
		this.solution = solution;
	}

	
	/**
	 * Returns the summary.
	 * @return String
	 */
	public String getSummary () {
		return summary;
	}

	
	/**
	 * Sets the summary.
	 * @param summary The summary to set.
	 */
	public void setSummary (String summary) {
		this.summary = summary;
	}

	
	/**
	 * Returns the taskId.
	 * @return Integer
	 */
	public Integer getTaskId () {
		return taskId;
	}

	
	/**
	 * Sets the taskId.
	 * @param taskId The taskId to set.
	 */
	public void setTaskId (Integer taskId) {
		this.taskId = taskId;
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-1435729939, 67271073).append(this.creationTime).append(this.taskId)
				.append(this.summary).append(this.defectType).append(
						this.repairRequired).append(this.roadName).append(
						this.severity).append(this.id).append(this.solution)
				.append(this.roadDefectId).append(this.defectDetail).append(
						this.location).append(this.lastModifiedTime)
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof RoadInspection)) {
			return false;
		}
		RoadInspection rhs = (RoadInspection) object;
		return new EqualsBuilder().append(
				this.creationTime, rhs.creationTime).append(this.taskId,
				rhs.taskId).append(this.summary, rhs.summary).append(
				this.defectType, rhs.defectType).append(this.repairRequired,
				rhs.repairRequired).append(this.roadName, rhs.roadName).append(
				this.severity, rhs.severity).append(this.id, rhs.id).append(
				this.solution, rhs.solution).append(this.roadDefectId,
				rhs.roadDefectId).append(this.defectDetail, rhs.defectDetail)
				.append(this.location, rhs.location).append(
						this.lastModifiedTime, rhs.lastModifiedTime).isEquals();
	}

	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		RoadInspection myClass = (RoadInspection) object;
		return new CompareToBuilder().append(this.creationTime,
				myClass.creationTime).append(this.taskId, myClass.taskId)
				.append(this.summary, myClass.summary).append(this.defectType,
						myClass.defectType).append(this.repairRequired,
						myClass.repairRequired).append(this.roadName,
						myClass.roadName).append(this.severity,
						myClass.severity).append(this.id, myClass.id).append(
						this.solution, myClass.solution).append(
						this.roadDefectId, myClass.roadDefectId).append(
						this.defectDetail, myClass.defectDetail).append(
						this.location, myClass.location).append(
						this.lastModifiedTime, myClass.lastModifiedTime)
				.toComparison();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("solution", this.solution)
				.append("repairRequired", this.repairRequired).append("id",
						this.id).append("location", this.location).append(
						"new", this.isNew()).append("lastModifiedTime",
						this.lastModifiedTime).append("creationTime",
						this.creationTime)
				.append("defectType", this.defectType).append("roadName",
						this.roadName)
				.append("defectDetail", this.defectDetail).append("summary",
						this.summary).append("severity", this.severity).append(
						"taskId", this.taskId).append("roadDefectId",
						this.roadDefectId).toString();
	}

	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?