use of com.evolveum.midpoint.repo.sql.data.common.other.RCaseWorkItemReferenceOwner in project midpoint by Evolveum.
the class CaseWorkItemReferenceMapper method map.
@Override
public RCaseWorkItemReference map(Referencable input, MapperContext context) {
RCaseWorkItem owner = (RCaseWorkItem) context.getOwner();
ObjectReferenceType objectRef = buildReference(input);
RCaseWorkItemReferenceOwner type;
ItemName name = context.getDelta().getPath().lastName();
if (QNameUtil.match(name, CaseWorkItemType.F_ASSIGNEE_REF)) {
type = RCaseWorkItemReferenceOwner.ASSIGNEE;
} else if (QNameUtil.match(name, CaseWorkItemType.F_CANDIDATE_REF)) {
type = RCaseWorkItemReferenceOwner.CANDIDATE;
} else {
throw new IllegalStateException("Unknown case work item reference owner: " + name + "(delta = " + context.getDelta() + ")");
}
return RCaseWorkItemReference.jaxbRefToRepo(objectRef, owner, context.getRelationRegistry(), type);
}
Aggregations