Examples of beforeFirst()


Examples of java.sql.ResultSet.beforeFirst()

    PreparedStatement statement = connection.prepareStatement(query);
    for(int i=0;i<param.size();i++)  {
      statement.setObject(i+1, param.get(i));
    }
    ResultSet rs = statement.executeQuery();
    rs.beforeFirst();
    if(returnClass == null) returnClass = primaryObj.getClass();
    while(rs.next())  {
      Object newObj = returnClass.newInstance();
      extendObject(rs, newObj);
      list.add(newObj);
View Full Code Here

Examples of javax.sql.rowset.CachedRowSet.beforeFirst()

        assertEquals(3, crset.getInt(1));
        assertFalse(crset.next());

        // deep copy
        CachedRowSet copyCrset = crset.createCopy();
        copyCrset.beforeFirst();
        assertTrue(copyCrset.next());
        assertEquals(3, copyCrset.getInt(1));
        assertFalse(copyCrset.next());
        copyCrset.execute();
        assertTrue(copyCrset.next());
View Full Code Here

Examples of javax.sql.rowset.FilteredRowSet.beforeFirst()

        /*
         * Remove filter
         */
        filteredRowSet.setFilter(null);
        filteredRowSet.beforeFirst();
        index = 0;
        while (filteredRowSet.next()) {
            index++;
            if (index == 5) {
                /*
 
View Full Code Here

Examples of javax.sql.rowset.JdbcRowSet.beforeFirst()

        jrs.updateString(2, "insert7");
        jrs.insertRow();
        jrs.moveToCurrentRow();

        int index = 0;
        jrs.beforeFirst();
        while (jrs.next()) {
            index++;
            assertEquals(index, jrs.getInt(1));
        }
        assertEquals(7, index);
View Full Code Here

Examples of javax.sql.rowset.WebRowSet.beforeFirst()

        Listener listener = new Listener();
        webRs.addRowSetListener(listener);
        assertNull(listener.getTag());
        // write to StringWriter
        webRs.writeXml(strWriter);
        webRs.beforeFirst();
        // read from StringWriter
        webRs.readXml(new StringReader(strWriter.toString()));
        isMetaDataEquals(meta, webRs.getMetaData());
        webRs.beforeFirst();
        int index = 0;
View Full Code Here

Examples of javax.sql.rowset.spi.SyncResolver.beforeFirst()

            fail("should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
        try {
            resolver.beforeFirst();
            fail("should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
        try {
View Full Code Here

Examples of net.sf.hibernate.ScrollableResults.beforeFirst()

            if (LOGGER.isDebugEnabled())
            {
               LOGGER.debug("Start to focusing adapterName '" + name + "', ValueListInfo info = " + info + "'");
            }
            ScrollableResults results = getScrollableResults(getQueryForFocus(info, session), info);
            results.beforeFirst();
            doFocusFor(info, results);

            if (LOGGER.isDebugEnabled())
            {
               LOGGER.debug("Focusing finished for adapterName '" + name + "', ValueListInfo info '" + info + "'");
View Full Code Here

Examples of org.apache.directory.server.core.api.filtering.EntryFilteringCursor.beforeFirst()

            SearchOperationContext searchContext = new SearchOperationContext( deleteContext.getSession(),
                searchRequest );

            EntryFilteringCursor cursor = wrapped.search( searchContext );

            cursor.beforeFirst();
            int nbEntry = 0;

            while ( cursor.next() && ( nbEntry < 2 ) )
            {
                nbEntry++;
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor.beforeFirst()

        try
        {
            cursor = session.getCoreSession().search( req );
           
            // Position the cursor at the beginning
            cursor.beforeFirst();
            boolean hasRootDSE = false;
           
            while ( cursor.next() )
            {
                if ( hasRootDSE )
View Full Code Here

Examples of org.apache.directory.server.xdbm.search.cursor.NotCursor.beforeFirst()

        Evaluator<? extends ExprNode> eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store,
            schemaManager );
        notNode.addNode( exprNode );

        NotCursor<String> cursor = new NotCursor( store, eval ); //cursorBuilder.build( andNode );
        cursor.beforeFirst();

        Set<String> set = new HashSet<String>();

        while ( cursor.next() )
        {
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.