00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 package org.openmobileis.common.user.profil;
00027
00028 import org.openmobileis.common.util.OpenMISSerializable;
00029
00034 public final class ProfileRubric implements OpenMISSerializable {
00035 static final long serialVersionUID = 5521257935120563452L;
00039 public String moduleName;
00040
00044 public String rubricName;
00045
00049 public String description;
00050
00054 public String version;
00055
00059 public ProfileRubric() { }
00060
00068 public ProfileRubric(String channelName, String rubricName, String description, ProfileProperty[] propertiesList) {
00069 this.moduleName = channelName;
00070 this.rubricName = rubricName;
00071 this.description = description;
00072 }
00073
00074 public boolean equals(Object obj) {
00075 if (obj instanceof ProfileRubric) {
00076 ProfileRubric nobj = (ProfileRubric) obj;
00077 if (nobj.moduleName.equals(this.moduleName) && nobj.rubricName.equals(this.rubricName)) {
00078 if (nobj.version != null && this.version == null) {
00079 return false;
00080 } else if (nobj.version == null && this.version != null) {
00081 return false;
00082 } else if (nobj.version != null && this.version != null) {
00083 if (!nobj.version.equals(this.version)) {
00084 return false;
00085 }
00086 }
00087 return true;
00088 }
00089 }
00090 return false;
00091 }
00092
00093 public int hashCode() {
00094 StringBuffer buff = new StringBuffer(this.moduleName);
00095 buff.append("/");
00096 buff.append(this.rubricName);
00097 return buff.hashCode();
00098 }
00099
00100 }