if (request.getOperationTypesOverride() != null) {
persistencePerspective.setOperationTypes(request.getOperationTypesOverride());
}
PersistencePackage pp = new PersistencePackage();
pp.setCeilingEntityFullyQualifiedClassname(request.getCeilingEntityClassname());
if (!StringUtils.isEmpty(request.getSecurityCeilingEntityClassname())) {
pp.setSecurityCeilingEntityFullyQualifiedClassname(request.getSecurityCeilingEntityClassname());
}
if (!ArrayUtils.isEmpty(request.getSectionCrumbs())) {
SectionCrumb[] converted = new SectionCrumb[request.getSectionCrumbs().length];
int index = 0;
for (SectionCrumb crumb : request.getSectionCrumbs()) {
SectionCrumb temp = new SectionCrumb();
try {
temp.setSectionIdentifier(getClassNameForSection(crumb.getSectionIdentifier()));
} catch (Exception e) {
temp.setSectionIdentifier(request.getCeilingEntityClassname());
}
temp.setSectionId(crumb.getSectionId());
converted[index] = temp;
index++;
}
pp.setSectionCrumbs(converted);
}
pp.setSectionEntityField(request.getSectionEntityField());
pp.setFetchTypeFullyQualifiedClassname(null);
pp.setPersistencePerspective(persistencePerspective);
pp.setCustomCriteria(request.getCustomCriteria());
pp.setCsrfToken(null);
pp.setRequestingEntityName(request.getRequestingEntityName());
pp.setValidateUnsubmittedProperties(request.isValidateUnsubmittedProperties());
if (request.getEntity() != null) {
pp.setEntity(request.getEntity());
}
for (Map.Entry<String, PersistencePackageRequest> subRequest : request.getSubRequests().entrySet()) {
pp.getSubPackages().put(subRequest.getKey(), create(subRequest.getValue()));
}
return pp;
}