/** * Creates a new {@code GenerateExpressionEvaluatorType} instance by deeply copying a given {@code GenerateExpressionEvaluatorType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public GenerateExpressionEvaluatorType(final GenerateExpressionEvaluatorType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(); if (o == null) { throw new NullPointerException("Cannot create a copy of 'GenerateExpressionEvaluatorType' from 'null'."); } // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.GenerateExpressionEvaluatorModeType this.mode = ((o.mode == null)?null:o.getMode()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType this.valuePolicyRef = ((o.valuePolicyRef == null)?null:((o.getValuePolicyRef() == null)?null:o.getValuePolicyRef().clone())); }
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public GenerateExpressionEvaluatorType clone() { try { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final GenerateExpressionEvaluatorType clone = ((GenerateExpressionEvaluatorType) super.clone()); // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.GenerateExpressionEvaluatorModeType clone.mode = ((this.mode == null)?null:this.getMode()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType clone.valuePolicyRef = ((this.valuePolicyRef == null)?null:((this.getValuePolicyRef() == null)?null:this.getValuePolicyRef().clone())); return clone; } } catch (CloneNotSupportedException e) { // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError(e); } }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { GenerateExpressionEvaluatorModeType theMode; theMode = this.getMode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mode", theMode), currentHashCode, theMode); } { ObjectReferenceType theValuePolicyRef; theValuePolicyRef = this.getValuePolicyRef(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "valuePolicyRef", theValuePolicyRef), currentHashCode, theValuePolicyRef); } return currentHashCode; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof GenerateExpressionEvaluatorType)) { return false; } if (this == object) { return true; } final GenerateExpressionEvaluatorType that = ((GenerateExpressionEvaluatorType) object); { GenerateExpressionEvaluatorModeType lhsMode; lhsMode = this.getMode(); GenerateExpressionEvaluatorModeType rhsMode; rhsMode = that.getMode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "mode", lhsMode), LocatorUtils.property(thatLocator, "mode", rhsMode), lhsMode, rhsMode)) { return false; } } { ObjectReferenceType lhsValuePolicyRef; lhsValuePolicyRef = this.getValuePolicyRef(); ObjectReferenceType rhsValuePolicyRef; rhsValuePolicyRef = that.getValuePolicyRef(); if (!strategy.equals(LocatorUtils.property(thisLocator, "valuePolicyRef", lhsValuePolicyRef), LocatorUtils.property(thatLocator, "valuePolicyRef", rhsValuePolicyRef), lhsValuePolicyRef, rhsValuePolicyRef)) { return false; } } return true; }
@Override public ValuePolicyType resolve() { if (mappingBuilder.getMappingType().getExpression() != null) { List<JAXBElement<?>> evaluators = mappingBuilder.getMappingType().getExpression().getExpressionEvaluator(); for (JAXBElement jaxbEvaluator : evaluators) { Object object = jaxbEvaluator.getValue(); if (object instanceof GenerateExpressionEvaluatorType && ((GenerateExpressionEvaluatorType) object).getValuePolicyRef() != null) { ObjectReferenceType ref = ((GenerateExpressionEvaluatorType) object).getValuePolicyRef(); try { ValuePolicyType valuePolicyType = mappingBuilder.getObjectResolver().resolve(ref, ValuePolicyType.class, null, "resolving value policy for generate attribute "+ outputDefinition.getName()+"value", task, new OperationResult("Resolving value policy")); if (valuePolicyType != null) { return valuePolicyType; } } catch (CommonException ex) { throw new SystemException(ex.getMessage(), ex); } } } } return null; } };
for (JAXBElement jaxbEvaluator : evaluators) { Object object = jaxbEvaluator.getValue(); if (object instanceof GenerateExpressionEvaluatorType && ((GenerateExpressionEvaluatorType) object).getValuePolicyRef() != null) { ObjectReferenceType ref = ((GenerateExpressionEvaluatorType) object).getValuePolicyRef(); try { ValuePolicyType valuePolicyType = mappingFactory.getObjectResolver().resolve(ref, ValuePolicyType.class,
ObjectReferenceType generateEvaluatorValuePolicyRef = generateEvaluatorType.getValuePolicyRef(); if (generateEvaluatorValuePolicyRef != null) { if (generateEvaluatorType.getValuePolicyRef() != null) { ValuePolicyType resolvedValuePolicyType = objectResolver.resolve(generateEvaluatorValuePolicyRef, ValuePolicyType.class, null, "resolving value policy reference in generateExpressionEvaluator", context.getTask(), context.getResult());