DDMStructureContentDashboardItemType implements ContentDashboardItemType<DDMStructure> { @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof ContentDashboardItemType)) { return false; } ContentDashboardItemType contentDashboardItemType = (ContentDashboardItemType)object; InfoItemReference infoItemReference = contentDashboardItemType.getInfoItemReference(); if (Objects.equals( _infoItemReference.getClassName(), infoItemReference.getClassName()) && Objects.equals( _infoItemReference.getClassPK(), infoItemReference.getClassPK())) { return true; } return false; } DDMStructureContentDashboardItemType(
		DDMStructure ddmStructure, Group group); @Override boolean equals(Object object); @Override String getFullLabel(Locale locale); @Override InfoItemReference getInfoItemReference(); @Override String getLabel(Locale locale); @Override Date getModifiedDate(); @Override long getUserId(); @Override int hashCode(); @Override String toJSONString(Locale locale);  }
@Test public void testEquals() throws PortalException { DDMStructure ddmStructure = _getDDMStructure("structureName"); DDMStructureContentDashboardItemType ddmStructureContentDashboardItemType1 = new DDMStructureContentDashboardItemType( ddmStructure, _getGroup("groupName")); DDMStructureContentDashboardItemType ddmStructureContentDashboardItemType2 = new DDMStructureContentDashboardItemType( ddmStructure, _getGroup("groupName")); Assert.assertTrue( ddmStructureContentDashboardItemType1.equals( ddmStructureContentDashboardItemType2)); }
@Test public void testNoEquals() throws PortalException { DDMStructure ddmStructure1 = _getDDMStructure("structureName"); DDMStructureContentDashboardItemType ddmStructureContentDashboardItemType1 = new DDMStructureContentDashboardItemType( ddmStructure1, _getGroup("groupName")); DDMStructure ddmStructure2 = _getDDMStructure("structureName"); DDMStructureContentDashboardItemType ddmStructureContentDashboardItemType2 = new DDMStructureContentDashboardItemType( ddmStructure2, _getGroup("groupName")); Assert.assertFalse( ddmStructureContentDashboardItemType1.equals( ddmStructureContentDashboardItemType2)); }