001/** 002 * //////////////////////////////////////////////////////////////////////////////// 003 * // 004 * // D SOFTWARE INCORPORATED 005 * // Copyright 2007-2014 D Software Incorporated 006 * // All Rights Reserved. 007 * // 008 * // NOTICE: D Software permits you to use, modify, and distribute this file 009 * // in accordance with the terms of the license agreement accompanying it. 010 * // 011 * // Unless required by applicable law or agreed to in writing, software 012 * // distributed under the License is distributed on an "AS IS" BASIS, 013 * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * // 015 * //////////////////////////////////////////////////////////////////////////////// 016 */ 017package com.thed.model; 018 019/** 020 * Value Object that contains execution information about the individual testcase 021 * 022 * @author zephyrDev 023 */ 024public class TestcaseExecution { 025 026 /*---------------------------------------------------------- 027 * ATTRIBUTES 028 *----------------------------------------------------------*/ 029 030 /* primary key */ 031 private Long id ; 032 033 /* releaseTestScheduleId */ 034 private Long releaseTestScheduleId ; 035 036 /* status */ 037 private String status ; 038 039 /*---------------------------------------------------------- 040 * END OF ATTRIBUTES 041 *----------------------------------------------------------*/ 042 043 /*---------------------------------------------------------- 044 * GETTER AND SETTER 045 *----------------------------------------------------------*/ 046 047 048 public Long getId() { 049 return id; 050 } 051 052 public void setId(Long id) { 053 this.id = id; 054 } 055 056 public Long getReleaseTestScheduleId() { 057 return releaseTestScheduleId; 058 } 059 060 public void setReleaseTestScheduleId(Long releaseTestScheduleId) { 061 this.releaseTestScheduleId = releaseTestScheduleId; 062 } 063 064 public String getStatus() { 065 return status; 066 } 067 068 public void setStatus(String status) { 069 this.status = status; 070 } 071 072 073 /*---------------------------------------------------------- 074 * END OF GETTER AND SETTER 075 *----------------------------------------------------------*/ 076 077 /*---------------------------------------------------------- 078 * OVERRIDDEN METHODS 079 *----------------------------------------------------------*/ 080 081 082 @Override 083 public String toString() { 084 // TODO Auto-generated method stub 085 return "TestcaseExecution: id: %s, releaseTestScheduleId: %s, status: %s".formatted(id, releaseTestScheduleId, status); 086 } 087 088 @Override 089 public int hashCode() { 090 final int prime = 31; 091 int result = 1; 092 result = prime 093 * result 094 + ((releaseTestScheduleId == null) ? 0 : releaseTestScheduleId 095 .hashCode()); 096 result = prime * result + ((status == null) ? 0 : status.hashCode()); 097 return result; 098 } 099 100 @Override 101 public boolean equals(Object obj) { 102 if (this == obj) 103 return true; 104 if (obj == null) 105 return false; 106 if (getClass() != obj.getClass()) 107 return false; 108 TestcaseExecution other = (TestcaseExecution) obj; 109 if (releaseTestScheduleId == null) { 110 if (other.releaseTestScheduleId != null) 111 return false; 112 } else if (!releaseTestScheduleId.equals(other.releaseTestScheduleId)) 113 return false; 114 if (status == null) { 115 if (other.status != null) 116 return false; 117 } else if (!status.equals(other.status)) 118 return false; 119 return true; 120 } 121 122 /*---------------------------------------------------------- 123 * END OF OVERRIDDEN METHODS 124 *----------------------------------------------------------*/ 125 126}