Search in sources :

Example 1 with SqmSearchClauseSpecification

use of org.hibernate.query.sqm.tree.cte.SqmSearchClauseSpecification in project hibernate-orm by hibernate.

the class BaseSqmToSqlAstConverter method visitSearchBySpecifications.

protected List<SearchClauseSpecification> visitSearchBySpecifications(CteTable cteTable, List<SqmSearchClauseSpecification> searchBySpecifications) {
    if (searchBySpecifications == null || searchBySpecifications.isEmpty()) {
        return null;
    }
    final int size = searchBySpecifications.size();
    final List<SearchClauseSpecification> searchClauseSpecifications = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        final SqmSearchClauseSpecification specification = searchBySpecifications.get(i);
        forEachCteColumn(cteTable, specification.getCteColumn(), cteColumn -> searchClauseSpecifications.add(new SearchClauseSpecification(cteColumn, specification.getSortOrder(), specification.getNullPrecedence())));
    }
    return searchClauseSpecifications;
}
Also used : SqmSearchClauseSpecification(org.hibernate.query.sqm.tree.cte.SqmSearchClauseSpecification) SqmSearchClauseSpecification(org.hibernate.query.sqm.tree.cte.SqmSearchClauseSpecification) SearchClauseSpecification(org.hibernate.sql.ast.tree.cte.SearchClauseSpecification) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 SqmSearchClauseSpecification (org.hibernate.query.sqm.tree.cte.SqmSearchClauseSpecification)1 SearchClauseSpecification (org.hibernate.sql.ast.tree.cte.SearchClauseSpecification)1