Example usage for org.hibernate.dialect.pagination LimitHelper hasFirstRow

List of usage examples for org.hibernate.dialect.pagination LimitHelper hasFirstRow

Introduction

In this page you can find the example usage for org.hibernate.dialect.pagination LimitHelper hasFirstRow.

Prototype

public static boolean hasFirstRow(RowSelection selection) 

Source Link

Document

Is a first row limit indicated?

Usage

From source file:org.babyfish.hibernate.dialect.Oracle10gDialect.java

License:Open Source License

@Override
public LimitHandler buildDistinctLimitHandler(final String sql, final RowSelection selection) {
    return new AbstractLitmitHandlerWrapper(this.buildLimitHandler(sql, selection)) {
        @Override// ww w  .j av  a2s. co m
        public String getProcessedSql() {
            boolean hasOffset = supportsLimit() && supportsLimitOffset() && LimitHelper.hasFirstRow(selection)
                    && LimitHelper.hasMaxRows(selection);
            return OracleDistinctLimits.getOracleDistinctLimitString(sql, hasOffset);
        }
    };
}