use of org.teiid.olingo.EdmComplexResponse in project teiid by teiid.
the class TeiidServiceHandler method crossJoin.
@Override
public void crossJoin(DataRequest request, List<String> entitySetNames, ODataResponse response) throws ODataLibraryException, ODataApplicationException {
final ODataSQLBuilder visitor = new ODataSQLBuilder(this.odata, getClient().getMetadataStore(), this.prepared, true, request.getODataRequest().getRawBaseUri(), this.serviceMetadata);
visitor.visit(request.getUriInfo());
try {
Query query = visitor.selectQuery();
BaseResponse queryResponse = executeQuery(request, request.isCountRequest(), visitor, query);
ContextURL.Builder builder = new ContextURL.Builder().asCollection().entitySetOrSingletonOrType("Edm.ComplexType");
EdmComplexResponse complexResponse = EdmComplexResponse.getInstance(request, builder.build(), false, response);
sendResults(request, visitor, queryResponse, complexResponse);
} catch (Exception e) {
throw new ODataApplicationException(e.getMessage(), HttpStatusCode.INTERNAL_SERVER_ERROR.getStatusCode(), Locale.getDefault(), e);
}
}
Aggregations