Package org.hibernate

Examples of org.hibernate.Query.scroll()


      s.save( new Foo() );
      s.save( new Foo() );
      s.save( new Bar() );
      Query query = s.createQuery("select f, f.integer from Foo f");
      assertTrue( query.getReturnTypes().length==2 );
      ScrollableResults iter = query.scroll();
      assertTrue( iter.next() );
      assertTrue( iter.scroll(1) );
      FooProxy f2 = (FooProxy) iter.get()[0];
      assertTrue( f2!=null );
      assertTrue( iter.scroll(-1) );
View Full Code Here


      s = openSession();
      txn = s.beginTransaction();
      query = s.createQuery("select f, f.integer from Foo f");
      assertTrue( query.getReturnTypes().length==2 );
      iter = query.scroll();
      assertTrue( iter.next() );
      assertTrue( iter.scroll(1) );
      f2 = (FooProxy) iter.get()[0];
      assertTrue( f2!=null );
      assertTrue( f2.getString()!=null  && f2.getComponent().getImportantDates().length > 0 );
View Full Code Here

    public SyntaxChecker checkScroll() {
      Session s = openSession();
      s.beginTransaction();
      Query query = s.createQuery( hql );
      preparer.prepare( query );
      query.scroll();
      s.getTransaction().commit();
      s.close();
      return this;
    }
View Full Code Here

      s.save( new Foo() );
      s.save( new Foo() );
      s.save( new Bar() );
      Query query = s.createQuery("select f, f.integer from Foo f");
      assertTrue( query.getReturnTypes().length==2 );
      ScrollableResults iter = query.scroll();
      assertTrue( iter.next() );
      assertTrue( iter.scroll(1) );
      FooProxy f2 = (FooProxy) iter.get()[0];
      assertTrue( f2!=null );
      assertTrue( iter.scroll(-1) );
View Full Code Here

      s = openSession();
      txn = s.beginTransaction();
      query = s.createQuery("select f, f.integer from Foo f");
      assertTrue( query.getReturnTypes().length==2 );
      iter = query.scroll();
      assertTrue( iter.next() );
      assertTrue( iter.scroll(1) );
      f2 = (FooProxy) iter.get()[0];
      assertTrue( f2!=null );
      assertTrue( f2.getString()!=null  && f2.getComponent().getImportantDates().length > 0 );
View Full Code Here

    s.save( new Foo() );
    s.save( new Foo() );
    s.save( new Bar() );
    Query query = s.createQuery("select f, f.integer from Foo f");
    assertTrue( query.getReturnTypes().length==2 );
    ScrollableResults iter = query.scroll();
    assertTrue( iter.next() );
    assertTrue( iter.scroll(1) );
    FooProxy f2 = (FooProxy) iter.get()[0];
    assertTrue( f2!=null );
    assertTrue( iter.scroll(-1) );
View Full Code Here

    s = openSession();
    txn = s.beginTransaction();
    query = s.createQuery("select f, f.integer from Foo f");
    assertTrue( query.getReturnTypes().length==2 );
    iter = query.scroll();
    assertTrue( iter.next() );
    assertTrue( iter.scroll(1) );
    f2 = (FooProxy) iter.get()[0];
    assertTrue( f2!=null );
    assertTrue( f2.getString()!=null  && f2.getComponent().getImportantDates().length > 0 );
View Full Code Here

    public SyntaxChecker checkScroll() {
      Session s = openSession();
      s.beginTransaction();
      Query query = s.createQuery( hql );
      preparer.prepare( query );
      query.scroll();
      s.getTransaction().commit();
      s.close();
      return this;
    }
View Full Code Here

    }

    private ScrollableResults streamQuery(String queryString) {
        Query q = session.createQuery(queryString);
        q.setFetchSize(Integer.MIN_VALUE);
        ScrollableResults scroll = q.scroll(ScrollMode.FORWARD_ONLY);
        return scroll;
    }

    private ScrollableResults scrollQuery(String queryString) {
        Query q = session.createQuery(queryString);
View Full Code Here

        return scroll;
    }

    private ScrollableResults scrollQuery(String queryString) {
        Query q = session.createQuery(queryString);
        ScrollableResults scroll = q.scroll();
        return scroll;
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.