@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); EntityDetail testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); EntityDetail 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.setProperties(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; } EntityDetail that = (EntityDetail) objectToCompare; return Objects.equals(entityProperties, that.entityProperties); }
EntityDetail 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; } EntityDetail that = (EntityDetail) objectToCompare; return Objects.equals(entityProperties, that.entityProperties); } }
EntityDetail 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; } EntityDetail that = (EntityDetail) objectToCompare; return Objects.equals(entityProperties, that.entityProperties); } EntityDetail();  EntityDetail(EntityDetail   templateElement); }
EntityDetail 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; } EntityDetail that = (EntityDetail) objectToCompare; return Objects.equals(entityProperties, that.entityProperties); } EntityDetail();  EntityDetail(EntityDetail   templateElement); InstanceProperties getProperties(); void setProperties(InstanceProperties  newProperties); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
EntityDetail 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; } EntityDetail that = (EntityDetail) objectToCompare; return Objects.equals(entityProperties, that.entityProperties); } EntityDetail();  EntityDetail(EntityDetail   templateElement); InstanceProperties getProperties(); void setProperties(InstanceProperties  newProperties); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }