@Override public boolean equals(final Object o) { if (o instanceof GroupTaskAccessDO) { final GroupTaskAccessDO other = (GroupTaskAccessDO) o; if (ObjectUtils.equals(this.getGroupId(), other.getGroupId()) == false) return false; if (ObjectUtils.equals(this.getTaskId(), other.getTaskId()) == false) return false; return true; } return false; }
/** * Copies all values from the given src object excluding the values created and modified. Null * values will be excluded. * * @param src */ @Override public ModificationStatus copyValuesFrom( final BaseDO<? extends Serializable> source, final String... ignoreFields) { ModificationStatus modificationStatus = super.copyValuesFrom(source, ignoreFields); final GroupTaskAccessDO src = (GroupTaskAccessDO) source; if (src.getAccessEntries() != null) { for (final AccessEntryDO srcEntry : src.getAccessEntries()) { final AccessEntryDO destEntry = ensureAndGetAccessEntry(srcEntry.getAccessType()); final ModificationStatus st = destEntry.copyValuesFrom(srcEntry); modificationStatus = getModificationStatus(modificationStatus, st); } final Iterator<AccessEntryDO> iterator = getAccessEntries().iterator(); while (iterator.hasNext()) { final AccessEntryDO destEntry = iterator.next(); if (src.getAccessEntry(destEntry.getAccessType()) == null) { iterator.remove(); } } } return modificationStatus; }