1 17 package org.alfresco.repo.security.permissions.impl.hibernate; 18 19 20 25 public class PermissionReferenceImpl implements PermissionReference 26 { 27 30 private static final long serialVersionUID = -6352566900815035461L; 31 32 private String typeUri; 33 34 private String typeName; 35 36 private String name; 37 38 public PermissionReferenceImpl() 39 { 40 super(); 41 } 42 43 public String getTypeUri() 44 { 45 return typeUri; 46 } 47 48 public void setTypeUri(String typeUri) 49 { 50 this.typeUri = typeUri; 51 } 52 53 public String getTypeName() 54 { 55 return typeName; 56 } 57 58 public void setTypeName(String typeName) 59 { 60 this.typeName = typeName; 61 } 62 63 public String getName() 64 { 65 return name; 66 } 67 68 public void setName(String name) 69 { 70 this.name = name; 71 } 72 73 75 @Override 76 public boolean equals(Object o) 77 { 78 if(this == o) 79 { 80 return true; 81 } 82 if(!(o instanceof PermissionReference)) 83 { 84 return false; 85 } 86 PermissionReference other = (PermissionReference)o; 87 return this.getTypeUri().equals(other.getTypeUri()) && this.getTypeName().equals(other.getTypeName()) && this.getName().equals(other.getName()); 88 } 89 90 @Override 91 public int hashCode() 92 { 93 return ((typeUri.hashCode() * 37) + typeName.hashCode() ) * 37 + name.hashCode(); 94 } 95 96 97 98 } 99 | Popular Tags |