Hibernate ORM ScrollableResults - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ScrollableResults class.

This code example shows how to use the following methods: get, next
		helper.setUseStatelessSession(useStatelessSession);
	} 
 
	@Override 
	protected T doRead() throws Exception {
		if (cursor.next()) {
			Object[] data = cursor.get();
 
			if (data.length > 1) { 
				// If there are multiple items this must be a projection 
				// and T is an array type. 
				@SuppressWarnings("unchecked") 
				T item = (T) data;
				return item;
			} 
			else { 
				// Assume if there is only one item that it is the data the user 
				// wants. 
				// If there is only one item this is going to be a nasty shock 
				// if T is an array type but there's not much else we can do... 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: close, get, next
    } 
 
    @Override 
    public void close() { 
        if (!closed) {
            scrollableResults.close();
            closed = true;
        } 
    } 
 
    @Override 
    protected void finalize() throws Throwable {
        close(); 
    } 
 
    @Override 
    public boolean hasNext() { 
        try { 
            if (nextRow != null) { 
                return true; 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getRowNumber, last
		this(selectQuery,countQuery,p.getPageNumber(),p.getPageSize());
	} 
	 
	private static int queryTatalCountByScrollableResults(Query query) {
		ScrollableResults scrollableResults = query.scroll();
		scrollableResults.last();
		return scrollableResults.getRowNumber() + 1;
	} 
 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: get, next
     */ 
    @SuppressWarnings("unchecked") 
    @Override 
    public T read() { 
     
        if (cursor.next()) {
            Object[] data = cursor.get();
     
            // Assume if there is only one item that it is the data the user 
            // wants. 
            // If there is only one item this is going to be a nasty shock 
            // if T is an array type but there's not much else we can do... 
            T item = (T) data[0];
            return item;
        } 
        return null; 
    } 
     
    /** 
     * {@inheritDoc} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: first, get
			{ 
				return arg0;
			} 
		}); 
		ScrollableResults sr = q.scroll();
		sr.first();
		Object[] row = sr.get();
		assertEquals(1, row.length); 
		Object obj = row[0]; 
		assertTrue(obj instanceof PartnerA); 
		PartnerA obj2 = (PartnerA) obj;
		assertEquals("Partner A", obj2.getName());
		s.close();
	} 
} 
 
 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Hibernate ORM ScrollableResults Methods: