/** * Creates a new {@code WorkItemDelegationEventType} instance by deeply copying a given {@code WorkItemDelegationEventType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public WorkItemDelegationEventType(final WorkItemDelegationEventType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(o); if (o == null) { throw new NullPointerException("Cannot create a copy of 'WorkItemDelegationEventType' from 'null'."); } // 'AssigneeBefore' collection. if (o.assigneeBefore!= null) { copyAssigneeBefore(o.getAssigneeBefore(), this.getAssigneeBefore()); } // 'DelegatedTo' collection. if (o.delegatedTo!= null) { copyDelegatedTo(o.getDelegatedTo(), this.getDelegatedTo()); } // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemDelegationMethodType this.delegationMethod = ((o.delegationMethod == null)?null:o.getDelegationMethod()); }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { List<ObjectReferenceType> theAssigneeBefore; theAssigneeBefore = (((this.assigneeBefore!= null)&&(!this.assigneeBefore.isEmpty()))?this.getAssigneeBefore():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "assigneeBefore", theAssigneeBefore), currentHashCode, theAssigneeBefore); } { List<ObjectReferenceType> theDelegatedTo; theDelegatedTo = (((this.delegatedTo!= null)&&(!this.delegatedTo.isEmpty()))?this.getDelegatedTo():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "delegatedTo", theDelegatedTo), currentHashCode, theDelegatedTo); } { WorkItemDelegationMethodType theDelegationMethod; theDelegationMethod = this.getDelegationMethod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "delegationMethod", theDelegationMethod), currentHashCode, theDelegationMethod); } return currentHashCode; }
lhsDelegationMethod = this.getDelegationMethod(); WorkItemDelegationMethodType rhsDelegationMethod; rhsDelegationMethod = that.getDelegationMethod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "delegationMethod", lhsDelegationMethod), LocatorUtils.property(thatLocator, "delegationMethod", rhsDelegationMethod), lhsDelegationMethod, rhsDelegationMethod)) { return false;
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public WorkItemDelegationEventType clone() { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final WorkItemDelegationEventType clone = ((WorkItemDelegationEventType) super.clone()); // 'AssigneeBefore' collection. if (this.assigneeBefore!= null) { clone.assigneeBefore = null; copyAssigneeBefore(this.getAssigneeBefore(), clone.getAssigneeBefore()); } // 'DelegatedTo' collection. if (this.delegatedTo!= null) { clone.delegatedTo = null; copyDelegatedTo(this.getDelegatedTo(), clone.getDelegatedTo()); } // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemDelegationMethodType clone.delegationMethod = ((this.delegationMethod == null)?null:this.getDelegationMethod()); return clone; } }
assertObjectRefs("assigneeBefore", false, event.getAssigneeBefore(), USER_ELAINE_OID); assertObjectRefs("delegatedTo", false, event.getDelegatedTo(), USER_ADMINISTRATOR_OID, USER_JACK_OID); assertEquals("Wrong delegationMethod", WorkItemDelegationMethodType.REPLACE_ASSIGNEES, event.getDelegationMethod()); assertEquals("Wrong old escalation level", OLD_ESCALATION_LEVEL, event.getEscalationLevel());