Questions tagged [scrollableresults]

A result iterator that allows moving around within a Query results by arbitrary increments. sultSet.

A result iterator that allows moving around within a query results by arbitrary increments.

The Query / ScrollableResults pattern is very similar to the JDBC PreparedStatement/ ResultSet pattern and the semantics of methods of this interface are similar to the similarly named methods on ResultSet.

34 questions
0
votes
1 answer

Efficiently handling large data in Hibernate using ScrollableResults

I read about the ScrollableResults in Hibernate for efficiently handling large data. ScrollableResults results = session.createCriteria(Employee.class).scroll(); -- (1) while (results.next()) { Object row = results.get(0); } On running…
Anand
  • 20,708
  • 48
  • 131
  • 198
0
votes
5 answers

Will database be hit 2 times by this code?

I am trying to improve performance of an api. I need to know whether the second line that's marked will hit database too ? as I want to minimise that. StringBuffer queryBuf = new StringBuffer("some query in SQL"); --------->StringBuffer…
newProgramer
  • 79
  • 2
  • 5
  • 16
0
votes
3 answers

ScrollableResults size gives repeated value

I am working on application using hibernate and spring. I am trying to get count of result got by query by using ScrollableResults but as query contains lots of join(Inner joins), the result contains id repeated many times. this creates problem for…
newProgramer
  • 79
  • 2
  • 5
  • 16
-1
votes
1 answer

java.lang.String cannot be cast error

I have a DAO method: Criteria crit = statelessSession.createCriteria(APRecord.class, "apr"); crit.createAlias("mAId", "mId", Criteria.INNER_JOIN); rit.setProjection(Projections.projectionList() …
Jay
  • 471
  • 1
  • 4
  • 11
1 2
3