@Override public int hashCode() { int result = getId() != null ? getId().hashCode() : 0; result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getTopologyId() != null ? getTopologyId().hashCode() : 0); result = 31 * result + (getVersionId() != null ? getVersionId().hashCode() : 0); result = 31 * result + (getTimestamp() != null ? getTimestamp().hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TopologyTestRunCase)) return false; TopologyTestRunCase that = (TopologyTestRunCase) o; if (getId() != null ? !getId().equals(that.getId()) : that.getId() != null) return false; if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false; if (getTopologyId() != null ? !getTopologyId().equals(that.getTopologyId()) : that.getTopologyId() != null) return false; if (getVersionId() != null ? !getVersionId().equals(that.getVersionId()) : that.getVersionId() != null) return false; return getTimestamp() != null ? getTimestamp().equals(that.getTimestamp()) : that.getTimestamp() == null; }
public TopologyTestRunCase getTopologyTestRunCase(Long topologyId, Long testcaseId) { TopologyTestRunCase testCase = new TopologyTestRunCase(); testCase.setId(testcaseId); TopologyTestRunCase found = dao.get(new StorableKey(TopologyTestRunCase.NAMESPACE, testCase.getPrimaryKey())); if (found == null || !found.getTopologyId().equals(topologyId)) { return null; } return found; }
public TopologyTestRunCase(TopologyTestRunCase other) { if (other != null) { setId(other.getId()); setName(other.getName()); setTopologyId(other.getTopologyId()); setVersionId(other.getVersionId()); setTimestamp(other.getTimestamp()); } }