se.unlogic.standardutils.dao.querys
Class PreparedStatementQuery

java.lang.Object
  extended by se.unlogic.standardutils.dao.querys.PreparedStatementQuery
Direct Known Subclasses:
BooleanQuery, PopulatedQuery, UpdateQuery

public abstract class PreparedStatementQuery
extends Object


Field Summary
protected  boolean closeConnectionOnExit
           
protected  boolean closed
           
protected  Connection connection
           
protected  PreparedStatement pstmt
           
 
Constructor Summary
PreparedStatementQuery(Connection connection, boolean closeConnectionOnExit, String query)
           
PreparedStatementQuery(DataSource dataSource, boolean closeConnectionOnExit, String query)
           
 
Method Summary
 void abort()
           
static void autoCloseQuery(PreparedStatementQuery query)
           
protected  PreparedStatement getPreparedStatement(String query)
           
 boolean isCloseConnectionOnExit()
           
 boolean isClosed()
           
 void setArray(int arg0, Array arg1)
           
 void setAsciiStream(int arg0, InputStream arg1, int arg2)
           
 void setBigDecimal(int arg0, BigDecimal arg1)
           
 void setBinaryStream(int arg0, InputStream arg1, int arg2)
           
 void setBlob(int arg0, Blob arg1)
           
 void setBoolean(int arg0, boolean arg1)
           
 void setByte(int arg0, byte arg1)
           
 void setBytes(int arg0, byte[] arg1)
           
 void setCharacterStream(int arg0, Reader arg1, int arg2)
           
 void setClob(int arg0, Clob arg1)
           
 void setCursorName(String arg0)
           
 void setDate(int arg0, Date arg1)
           
 void setDate(int arg0, Date arg1, Calendar arg2)
           
 void setDouble(int arg0, double arg1)
           
 void setEscapeProcessing(boolean arg0)
           
 void setFetchDirection(int arg0)
           
 void setFetchSize(int arg0)
           
 void setFloat(int arg0, float arg1)
           
 void setInt(int arg0, int arg1)
           
 void setLong(int arg0, long arg1)
           
 void setMaxFieldSize(int arg0)
           
 void setMaxRows(int arg0)
           
 void setNull(int arg0, int arg1)
           
 void setNull(int arg0, int arg1, String arg2)
           
 void setObject(int arg0, Object arg1)
           
 void setObject(int arg0, Object arg1, int arg2)
           
 void setObject(int arg0, Object arg1, int arg2, int arg3)
           
 void setQueryTimeout(int arg0)
           
 void setRef(int arg0, Ref arg1)
           
 void setShort(int arg0, short arg1)
           
 void setString(int arg0, String arg1)
           
 void setTime(int arg0, Time arg1)
           
 void setTime(int arg0, Time arg1, Calendar arg2)
           
 void setTimestamp(int arg0, Timestamp arg1)
           
 void setTimestamp(int arg0, Timestamp arg1, Calendar arg2)
           
 void setURL(int arg0, URL arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected Connection connection

closeConnectionOnExit

protected boolean closeConnectionOnExit

pstmt

protected PreparedStatement pstmt

closed

protected boolean closed
Constructor Detail

PreparedStatementQuery

public PreparedStatementQuery(Connection connection,
                              boolean closeConnectionOnExit,
                              String query)
                       throws SQLException
Throws:
SQLException

PreparedStatementQuery

public PreparedStatementQuery(DataSource dataSource,
                              boolean closeConnectionOnExit,
                              String query)
                       throws SQLException
Throws:
SQLException
Method Detail

getPreparedStatement

protected PreparedStatement getPreparedStatement(String query)
                                          throws SQLException
Throws:
SQLException

setArray

public void setArray(int arg0,
                     Array arg1)
              throws SQLException
Throws:
SQLException

setAsciiStream

public void setAsciiStream(int arg0,
                           InputStream arg1,
                           int arg2)
                    throws SQLException
Throws:
SQLException

setBigDecimal

public void setBigDecimal(int arg0,
                          BigDecimal arg1)
                   throws SQLException
Throws:
SQLException

setBinaryStream

public void setBinaryStream(int arg0,
                            InputStream arg1,
                            int arg2)
                     throws SQLException
Throws:
SQLException

setBlob

public void setBlob(int arg0,
                    Blob arg1)
             throws SQLException
Throws:
SQLException

setBoolean

public void setBoolean(int arg0,
                       boolean arg1)
                throws SQLException
Throws:
SQLException

setByte

public void setByte(int arg0,
                    byte arg1)
             throws SQLException
Throws:
SQLException

setBytes

public void setBytes(int arg0,
                     byte[] arg1)
              throws SQLException
Throws:
SQLException

setCharacterStream

public void setCharacterStream(int arg0,
                               Reader arg1,
                               int arg2)
                        throws SQLException
Throws:
SQLException

setClob

public void setClob(int arg0,
                    Clob arg1)
             throws SQLException
Throws:
SQLException

setCursorName

public void setCursorName(String arg0)
                   throws SQLException
Throws:
SQLException

setDate

public void setDate(int arg0,
                    Date arg1,
                    Calendar arg2)
             throws SQLException
Throws:
SQLException

setDate

public void setDate(int arg0,
                    Date arg1)
             throws SQLException
Throws:
SQLException

setDouble

public void setDouble(int arg0,
                      double arg1)
               throws SQLException
Throws:
SQLException

setEscapeProcessing

public void setEscapeProcessing(boolean arg0)
                         throws SQLException
Throws:
SQLException

setFetchDirection

public void setFetchDirection(int arg0)
                       throws SQLException
Throws:
SQLException

setFetchSize

public void setFetchSize(int arg0)
                  throws SQLException
Throws:
SQLException

setFloat

public void setFloat(int arg0,
                     float arg1)
              throws SQLException
Throws:
SQLException

setInt

public void setInt(int arg0,
                   int arg1)
            throws SQLException
Throws:
SQLException

setLong

public void setLong(int arg0,
                    long arg1)
             throws SQLException
Throws:
SQLException

setMaxFieldSize

public void setMaxFieldSize(int arg0)
                     throws SQLException
Throws:
SQLException

setMaxRows

public void setMaxRows(int arg0)
                throws SQLException
Throws:
SQLException

setNull

public void setNull(int arg0,
                    int arg1,
                    String arg2)
             throws SQLException
Throws:
SQLException

setNull

public void setNull(int arg0,
                    int arg1)
             throws SQLException
Throws:
SQLException

setObject

public void setObject(int arg0,
                      Object arg1,
                      int arg2,
                      int arg3)
               throws SQLException
Throws:
SQLException

setObject

public void setObject(int arg0,
                      Object arg1,
                      int arg2)
               throws SQLException
Throws:
SQLException

setObject

public void setObject(int arg0,
                      Object arg1)
               throws SQLException
Throws:
SQLException

setQueryTimeout

public void setQueryTimeout(int arg0)
                     throws SQLException
Throws:
SQLException

setRef

public void setRef(int arg0,
                   Ref arg1)
            throws SQLException
Throws:
SQLException

setShort

public void setShort(int arg0,
                     short arg1)
              throws SQLException
Throws:
SQLException

setString

public void setString(int arg0,
                      String arg1)
               throws SQLException
Throws:
SQLException

setTime

public void setTime(int arg0,
                    Time arg1,
                    Calendar arg2)
             throws SQLException
Throws:
SQLException

setTime

public void setTime(int arg0,
                    Time arg1)
             throws SQLException
Throws:
SQLException

setTimestamp

public void setTimestamp(int arg0,
                         Timestamp arg1,
                         Calendar arg2)
                  throws SQLException
Throws:
SQLException

setTimestamp

public void setTimestamp(int arg0,
                         Timestamp arg1)
                  throws SQLException
Throws:
SQLException

setURL

public void setURL(int arg0,
                   URL arg1)
            throws SQLException
Throws:
SQLException

isCloseConnectionOnExit

public boolean isCloseConnectionOnExit()

abort

public void abort()

autoCloseQuery

public static void autoCloseQuery(PreparedStatementQuery query)

isClosed

public boolean isClosed()


Copyright © 2011. All Rights Reserved.