Example usage for org.hibernate Query getFetchSize

List of usage examples for org.hibernate Query getFetchSize

Introduction

In this page you can find the example usage for org.hibernate Query getFetchSize.

Prototype

Integer getFetchSize();

Source Link

Document

Obtain the JDBC fetch size hint in effect for this query.

Usage

From source file:com.muslim.family.dao.impl.AnswerDAOImpl.java

public boolean isAnswerAvailableDao(long id) {

    Query qry = sessionFactory.getCurrentSession()
            .createQuery("Select ans.id from Answer_tbl ans where ans.question.id" + id);
    int size = qry.getFetchSize();
    if (size > 0)
        return true;
    else/*from  www  .  ja  v  a 2s.  co m*/
        return false;

}