X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Frequest%2FPropertyInfo.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Frequest%2FPropertyInfo.java;h=150c760aa0cd2d26069b03c84d75b7d8f03a9218;hb=63bb6d595c37b3a2fb55e07fb810779cae3b4d03;hp=4d208b4571d14faaac8772dc30e3e0df241d1ef9;hpb=26b755c7e98b7bb3d9038abba139bef0e71f6607;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java index 4d208b457..150c760aa 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java @@ -103,4 +103,96 @@ public class PropertyInfo { .append("]"); return sb.toString(); } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((builder == null) ? 0 : builder.hashCode()); + result = prime * result + ((classifications == null) ? 0 : classifications.hashCode()); + result = prime * result + ((defaultBinding == null) ? 0 : defaultBinding.hashCode()); + result = prime * result + ((definedUnit == null) ? 0 : definedUnit.hashCode()); + result = prime * result + (hasEnumerationRange ? 1231 : 1237); + result = prime * result + (isFunctional ? 1231 : 1237); + result = prime * result + (isHasProperty ? 1231 : 1237); + result = prime * result + ((literalRange == null) ? 0 : literalRange.hashCode()); + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((predicate == null) ? 0 : predicate.hashCode()); + result = prime * result + ((requiredDatatype == null) ? 0 : requiredDatatype.hashCode()); + result = prime * result + ((requiredValueType == null) ? 0 : requiredValueType.hashCode()); + result = prime * result + ((subliteralPredicates == null) ? 0 : subliteralPredicates.hashCode()); + result = prime * result + ((valueAccessor == null) ? 0 : valueAccessor.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PropertyInfo other = (PropertyInfo) obj; + if (builder == null) { + if (other.builder != null) + return false; + } else if (!builder.equals(other.builder)) + return false; + if (classifications == null) { + if (other.classifications != null) + return false; + } else if (!classifications.equals(other.classifications)) + return false; + if (defaultBinding == null) { + if (other.defaultBinding != null) + return false; + } else if (!defaultBinding.equals(other.defaultBinding)) + return false; + if (definedUnit == null) { + if (other.definedUnit != null) + return false; + } else if (!definedUnit.equals(other.definedUnit)) + return false; + if (hasEnumerationRange != other.hasEnumerationRange) + return false; + if (isFunctional != other.isFunctional) + return false; + if (isHasProperty != other.isHasProperty) + return false; + if (literalRange == null) { + if (other.literalRange != null) + return false; + } else if (!literalRange.equals(other.literalRange)) + return false; + if (name == null) { + if (other.name != null) + return false; + } else if (!name.equals(other.name)) + return false; + if (predicate == null) { + if (other.predicate != null) + return false; + } else if (!predicate.equals(other.predicate)) + return false; + if (requiredDatatype == null) { + if (other.requiredDatatype != null) + return false; + } else if (!requiredDatatype.equals(other.requiredDatatype)) + return false; + if (requiredValueType == null) { + if (other.requiredValueType != null) + return false; + } else if (!requiredValueType.equals(other.requiredValueType)) + return false; + if (subliteralPredicates == null) { + if (other.subliteralPredicates != null) + return false; + } else if (!subliteralPredicates.equals(other.subliteralPredicates)) + return false; + if (valueAccessor == null) { + if (other.valueAccessor != null) + return false; + } else if (!valueAccessor.equals(other.valueAccessor)) + return false; + return true; + } }