/** * Returns <code>true</code> if this query should produce a list of data rows as * opposed to DataObjects, <code>false</code> for DataObjects. This is a hint to * QueryEngine executing this query. */ public boolean isFetchingDataRows() { return this.isFetchingCustomAttributes() || selectInfo.isFetchingDataRows(); }
List buildResultColumns() { this.defaultAttributesByColumn = new HashMap(); // create alias for root table newAliasForTable(getRootDbEntity()); List columns = new ArrayList(); SelectQuery query = getSelectQuery(); // for query with custom attributes use a different strategy if (query.isFetchingCustomAttributes()) { appendCustomColumns(columns, query); } else { appendQueryColumns(columns, query); } return columns; }
/** * @since 1.2 */ public QueryMetadata getMetaData(EntityResolver resolver) { selectInfo.resolve(root, resolver, getName()); // must force DataRows if custom attributes are fetched if (isFetchingCustomAttributes()) { QueryMetadataWrapper wrapper = new QueryMetadataWrapper(selectInfo); wrapper.override(QueryMetadata.FETCHING_DATA_ROWS_PROPERTY, Boolean.TRUE); return wrapper; } else { return selectInfo; } }