1 17 package org.alfresco.repo.domain.hibernate; 18 19 import org.alfresco.repo.domain.NodeKey; 20 import org.alfresco.repo.domain.NodeStatus; 21 import org.alfresco.util.EqualsHelper; 22 23 28 public class NodeStatusImpl implements NodeStatus 29 { 30 private NodeKey key; 31 private String changeTxnId; 32 private boolean deleted; 33 34 public int hashCode() 35 { 36 return (key == null) ? 0 : key.hashCode(); 37 } 38 39 public boolean equals(Object obj) 40 { 41 if (obj == this) 42 return true; 43 else if (obj == null) 44 return false; 45 else if (!(obj instanceof NodeStatusImpl)) 46 return false; 47 NodeStatus that = (NodeStatus) obj; 48 return (EqualsHelper.nullSafeEquals(this.key, that.getKey())) && 49 (EqualsHelper.nullSafeEquals(this.changeTxnId, that.getChangeTxnId())) && 50 (this.deleted == that.isDeleted()); 51 52 } 53 54 public String toString() 55 { 56 StringBuilder sb = new StringBuilder (50); 57 sb.append("NodeStatus") 58 .append("[key=").append(key) 59 .append(", txn=").append(changeTxnId) 60 .append(", deleted=").append(deleted) 61 .append("]"); 62 return sb.toString(); 63 } 64 65 public NodeKey getKey() 66 { 67 return key; 68 } 69 70 public void setKey(NodeKey key) 71 { 72 this.key = key; 73 } 74 75 public String getChangeTxnId() 76 { 77 return changeTxnId; 78 } 79 80 public void setChangeTxnId(String txnId) 81 { 82 this.changeTxnId = txnId; 83 } 84 85 public boolean isDeleted() 86 { 87 return deleted; 88 } 89 90 public void setDeleted(boolean deleted) 91 { 92 this.deleted = deleted; 93 } 94 } 95 | Popular Tags |