1 17 package org.alfresco.repo.security.permissions.impl.hibernate; 18 19 import java.util.HashSet ; 20 import java.util.Set ; 21 22 27 public class RecipientImpl implements Recipient 28 { 29 32 private static final long serialVersionUID = -5582068692208928127L; 33 34 private String recipient; 35 36 private Set <String > externalKeys = new HashSet <String >(); 37 38 public RecipientImpl() 39 { 40 super(); 41 } 42 43 public String getRecipient() 44 { 45 return recipient; 46 } 47 48 public void setRecipient(String recipient) 49 { 50 this.recipient = recipient; 51 } 52 53 public Set <String > getExternalKeys() 54 { 55 return externalKeys; 56 } 57 58 void setExternalKeys(Set <String > externalKeys) 60 { 61 this.externalKeys = externalKeys; 62 } 63 64 66 @Override 67 public boolean equals(Object o) 68 { 69 if(this == o) 70 { 71 return true; 72 } 73 if(!(o instanceof Recipient)) 74 { 75 return false; 76 } 77 Recipient other = (Recipient)o; 78 return this.getRecipient().equals(other.getRecipient()); 79 } 80 81 @Override 82 public int hashCode() 83 { 84 return getRecipient().hashCode(); 85 } 86 87 88 } 89 | Popular Tags |