openlsd.database.session.LSDDbPreparedStatement Class Reference

Collaboration diagram for openlsd.database.session.LSDDbPreparedStatement:

Collaboration graph
[legend]

List of all members.


Detailed Description

Class to handle PrepareStatement
Author:
Frederic Bregier LGPL

Public Member Functions

 LSDDbPreparedStatement (LSDDbSession ls)
 LSDDbPreparedStatement (LSDDbSession ls, String request)
 LSDDbPreparedStatement (LSDDbSession ls, String request, int nbFetch)
boolean createPrepareStatement (String request)
boolean createPrepareStatement (String request, int nbFetch)
ResultSet executeQuery ()
int executeUpdate ()
void close ()
void realClose ()
void setLong (int rank, long value) throws SQLException
void setString (int rank, String value) throws SQLException
void setTimestamp (int rank, Timestamp value) throws SQLException
void setInt (int rank, int value) throws SQLException

Static Public Member Functions

static boolean getNext (ResultSet resultSet)

Public Attributes

boolean isReady = false

Private Attributes

PreparedStatement preparedStatement = null
String request = null
ResultSet rs = null
LSDDbSession ls = null

Constructor & Destructor Documentation

openlsd.database.session.LSDDbPreparedStatement.LSDDbPreparedStatement ( LSDDbSession  ls  ) 

Create a LSDDbPreparedStatement from LSDDbSession object

Parameters:
ls 

openlsd.database.session.LSDDbPreparedStatement.LSDDbPreparedStatement ( LSDDbSession  ls,
String  request 
)

Create a LSDDbPreparedStatement from LSDDbSession object and a request

Parameters:
ls 
request 

openlsd.database.session.LSDDbPreparedStatement.LSDDbPreparedStatement ( LSDDbSession  ls,
String  request,
int  nbFetch 
)

Create a LSDDbPreparedStatement from LSDDbSession object and a request

Parameters:
ls 
request 
nbFetch the number of pre fetch rows


Member Function Documentation

boolean openlsd.database.session.LSDDbPreparedStatement.createPrepareStatement ( String  request  ) 

Create a preparedStatement from request

Parameters:
request 
Returns:
Trur if OK, else False

boolean openlsd.database.session.LSDDbPreparedStatement.createPrepareStatement ( String  request,
int  nbFetch 
)

Create a preparedStatement from request

Parameters:
request 
nbFetch the number of pre fetch rows
Returns:
Trur if OK, else False

ResultSet openlsd.database.session.LSDDbPreparedStatement.executeQuery (  ) 

Execute a Select preparedStatement

Returns:
the ResultSet or Null if an error occurs

int openlsd.database.session.LSDDbPreparedStatement.executeUpdate (  ) 

Execute the Update/Insert/Delete preparedStatement

Returns:
the number of row or (-1) if an error occurs

void openlsd.database.session.LSDDbPreparedStatement.close (  ) 

Close the resultSet if any

void openlsd.database.session.LSDDbPreparedStatement.realClose (  ) 

Really close the preparedStatement and the resultSet if any

static boolean openlsd.database.session.LSDDbPreparedStatement.getNext ( ResultSet  resultSet  )  [static]

Move the cursor to the next result

Parameters:
resultSet 
Returns:
True if there is a next result, else False

void openlsd.database.session.LSDDbPreparedStatement.setLong ( int  rank,
long  value 
) throws SQLException

Set value in PreparedStatement

Parameters:
rank 
value 
Exceptions:
SQLException 

void openlsd.database.session.LSDDbPreparedStatement.setString ( int  rank,
String  value 
) throws SQLException

Set value in PreparedStatement

Parameters:
rank 
value 
Exceptions:
SQLException 

void openlsd.database.session.LSDDbPreparedStatement.setTimestamp ( int  rank,
Timestamp  value 
) throws SQLException

Set value in PreparedStatement

Parameters:
rank 
value 
Exceptions:
SQLException 

void openlsd.database.session.LSDDbPreparedStatement.setInt ( int  rank,
int  value 
) throws SQLException

Set value in PreparedStatement

Parameters:
rank 
value 
Exceptions:
SQLException 


Member Data Documentation

Internal PreparedStatement

The Associated request

Is this PreparedStatement ready

The associated resultSet

The associated DB session


The documentation for this class was generated from the following file: