Search in sources :

Example 1 with Structured

use of com.evolveum.midpoint.prism.Structured in project midpoint by Evolveum.

the class ItemDeltaItem method resolveStructuredDeltaSet.

private <X> Collection<PrismPropertyValue<X>> resolveStructuredDeltaSet(Collection<PrismPropertyValue<Structured>> set, ItemPath resolvePath) {
    if (set == null) {
        return null;
    }
    Collection<PrismPropertyValue<X>> outputSet = new ArrayList<PrismPropertyValue<X>>(set.size());
    for (PrismPropertyValue<Structured> structuredPVal : set) {
        Structured structured = structuredPVal.getValue();
        X outputRval = (X) structured.resolve(resolvePath);
        outputSet.add(new PrismPropertyValue<X>(outputRval));
    }
    return outputSet;
}
Also used : ArrayList(java.util.ArrayList) Structured(com.evolveum.midpoint.prism.Structured) PrismPropertyValue(com.evolveum.midpoint.prism.PrismPropertyValue)

Example 2 with Structured

use of com.evolveum.midpoint.prism.Structured in project midpoint by Evolveum.

the class ItemDeltaItem method resolveStructuredPropertyItem.

private <X> PrismProperty<X> resolveStructuredPropertyItem(PrismProperty<Structured> sourceProperty, ItemPath resolvePath, PrismPropertyDefinition outputDefinition) {
    if (sourceProperty == null) {
        return null;
    }
    PrismProperty<X> outputProperty = outputDefinition.instantiate();
    for (Structured sourceRealValue : sourceProperty.getRealValues()) {
        X outputRealValue = (X) sourceRealValue.resolve(resolvePath);
        outputProperty.addRealValue(outputRealValue);
    }
    return outputProperty;
}
Also used : Structured(com.evolveum.midpoint.prism.Structured)

Aggregations

Structured (com.evolveum.midpoint.prism.Structured)2 PrismPropertyValue (com.evolveum.midpoint.prism.PrismPropertyValue)1 ArrayList (java.util.ArrayList)1