1 16 17 package org.apache.cocoon.components.language.markup.xsp; 18 19 import java.sql.PreparedStatement ; 20 import java.sql.SQLException ; 21 import java.sql.ResultSet ; 22 import java.sql.CallableStatement ; 23 import java.sql.Connection ; 24 25 30 final public class PervasiveEsqlQuery extends AbstractEsqlQuery { 31 32 public PervasiveEsqlQuery(Connection connection, String query) { 33 super(connection, query); 34 } 35 36 40 private PervasiveEsqlQuery(final ResultSet resultSet) { 41 super(resultSet); 42 } 43 44 48 public AbstractEsqlQuery newInstance(final ResultSet resultSet) { 49 return(new PervasiveEsqlQuery(resultSet)); 50 } 51 52 public PreparedStatement prepareStatement() throws SQLException { 53 return ( 54 setPreparedStatement( 55 getConnection().prepareStatement( 56 getQueryString() 57 ) 58 )); 59 } 60 61 public CallableStatement prepareCall() throws SQLException { 62 return ( 63 (CallableStatement ) setPreparedStatement( 64 getConnection().prepareCall( 65 getQueryString() 66 ) 67 ) 68 ); 69 } 70 71 } 72 | Popular Tags |