@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); EntityProxy testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); EntityProxy differentObject = getTestObject(); differentObject.setCreatedBy("DifferentAuthor"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setMetadataCollectionId("DifferentHomeId"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setClassifications(null); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setUniqueProperties(null); assertFalse(testObject.equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } EntityProxy that = (EntityProxy) objectToCompare; return Objects.equals(getUniqueProperties(), that.getUniqueProperties()); }
EntityProxy extends EntitySummary { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } EntityProxy that = (EntityProxy) objectToCompare; return Objects.equals(getUniqueProperties(), that.getUniqueProperties()); } }
EntityProxy extends EntitySummary { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } EntityProxy that = (EntityProxy) objectToCompare; return Objects.equals(getUniqueProperties(), that.getUniqueProperties()); } EntityProxy();  EntityProxy(EntityProxy   template);  EntityProxy(EntitySummary   template); }
EntityProxy extends EntitySummary { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } EntityProxy that = (EntityProxy) objectToCompare; return Objects.equals(getUniqueProperties(), that.getUniqueProperties()); } EntityProxy();  EntityProxy(EntityProxy   template);  EntityProxy(EntitySummary   template); InstanceProperties getUniqueProperties(); void setUniqueProperties(InstanceProperties uniqueAttributes); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
EntityProxy extends EntitySummary { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } EntityProxy that = (EntityProxy) objectToCompare; return Objects.equals(getUniqueProperties(), that.getUniqueProperties()); } EntityProxy();  EntityProxy(EntityProxy   template);  EntityProxy(EntitySummary   template); InstanceProperties getUniqueProperties(); void setUniqueProperties(InstanceProperties uniqueAttributes); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }