org.postgresql.pljava.internal
Class Portal

java.lang.Object
  extended byorg.postgresql.pljava.internal.NativeStruct
      extended byorg.postgresql.pljava.internal.Portal

public class Portal
extends NativeStruct

The Portal correspons to the internal PostgreSQL Portal type.


Constructor Summary
Portal()
           
 
Method Summary
 void close()
          Performs an SPI_cursor_close.
 int fetch(boolean forward, int count)
          Performs an SPI_cursor_fetch.
 java.lang.String getName()
          Returns the name of this Portal.
 int getPortalPos()
          Returns the value of the portalPos attribute.
 TupleDesc getTupleDesc()
          Returns the TupleDesc that describes the row Tuples for this Portal.
 void invalidate()
          Invalidates this structure and frees up memory using the internal function SPI_cursor_close
 boolean isAtEnd()
          Returns the value of the atEnd attribute.
 boolean isAtStart()
          Returns the value of the atStart attribute.
 boolean isPosOverflow()
          Returns the value of the posOverflow attribute.
 int move(boolean forward, int count)
          Performs an SPI_cursor_move.
 
Methods inherited from class org.postgresql.pljava.internal.NativeStruct
getNative, isValid, releasePointer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Portal

public Portal()
Method Detail

close

public void close()
Performs an SPI_cursor_close.


getName

public java.lang.String getName()
                         throws java.sql.SQLException
Returns the name of this Portal.

Throws:
java.sql.SQLException - if the handle to the native structur is stale.

getPortalPos

public int getPortalPos()
                 throws java.sql.SQLException
Returns the value of the portalPos attribute.

Throws:
java.sql.SQLException - if the handle to the native structur is stale.

getTupleDesc

public TupleDesc getTupleDesc()
                       throws java.sql.SQLException
Returns the TupleDesc that describes the row Tuples for this Portal.

Throws:
java.sql.SQLException - if the handle to the native structur is stale.

fetch

public int fetch(boolean forward,
                 int count)
          throws java.sql.SQLException
Performs an SPI_cursor_fetch.

Parameters:
forward - Set to true for forward, false for backward.
count - Maximum number of rows to fetch.
Returns:
The actual number of fetched rows.
Throws:
java.sql.SQLException - if the handle to the native structur is stale.

invalidate

public void invalidate()
Invalidates this structure and frees up memory using the internal function SPI_cursor_close

Overrides:
invalidate in class NativeStruct

isAtEnd

public boolean isAtEnd()
                throws java.sql.SQLException
Returns the value of the atEnd attribute.

Throws:
java.sql.SQLException - if the handle to the native structur is stale.

isAtStart

public boolean isAtStart()
                  throws java.sql.SQLException
Returns the value of the atStart attribute.

Throws:
java.sql.SQLException - if the handle to the native structur is stale.

isPosOverflow

public boolean isPosOverflow()
                      throws java.sql.SQLException
Returns the value of the posOverflow attribute.

Throws:
java.sql.SQLException - if the handle to the native structur is stale.

move

public int move(boolean forward,
                int count)
         throws java.sql.SQLException
Performs an SPI_cursor_move.

Parameters:
forward - Set to true for forward, false for backward.
count - Maximum number of rows to fetch.
Returns:
The value of the global variable SPI_result.
Throws:
java.sql.SQLException - if the handle to the native structur is stale.


Copyright (c) 2003, 2004 TADA AB - Taby Sweden. Distributed under the terms shown in COPYRIGHT