use of org.apache.olingo.commons.api.edm.EdmReturnType in project teiid by teiid.
the class OperationResponseImpl method setReturnValue.
@Override
public void setReturnValue(Object returnValue) throws SQLException {
try {
EdmReturnType returnType = this.procedureReturn.getReturnType();
this.returnValue = // $NON-NLS-1$
EntityCollectionResponse.buildPropery(// $NON-NLS-1$
"return", (SingletonPrimitiveType) returnType.getType(), returnType.getPrecision(), returnType.getScale(), returnType.isCollection(), returnValue);
} catch (TeiidProcessingException e) {
throw new SQLException(e);
} catch (IOException e) {
throw new SQLException(e);
}
}
use of org.apache.olingo.commons.api.edm.EdmReturnType in project teiid by teiid.
the class ComplexDocumentNode method addAllColumns.
@Override
protected void addAllColumns(boolean onlyPK) {
for (final Column column : procedure.getResultSet().getColumns()) {
if (column.isSelectable()) {
EdmReturnType returnType = procedureReturn.getReturnType();
EdmComplexType complexType = (EdmComplexType) returnType.getType();
EdmPropertyImpl edmProperty = (EdmPropertyImpl) complexType.getProperty(column.getName());
addProjectedColumn(new ElementSymbol(column.getName(), getGroupSymbol()), edmProperty.getType(), edmProperty, edmProperty.isCollection());
}
}
}
use of org.apache.olingo.commons.api.edm.EdmReturnType in project teiid by teiid.
the class ComplexDocumentNode method addProjectedColumn.
@Override
protected void addProjectedColumn(final String columnName, final Expression expr) {
EdmReturnType returnType = procedureReturn.getReturnType();
EdmComplexType complexType = (EdmComplexType) returnType.getType();
EdmPropertyImpl edmProperty = (EdmPropertyImpl) complexType.getProperty(columnName);
addProjectedColumn(expr, edmProperty.getType(), edmProperty, edmProperty.isCollection());
}
Aggregations