1 package org.apache.ojb.broker.accesslayer; 2 3 17 18 import java.sql.PreparedStatement ; 19 import java.sql.ResultSet ; 20 import java.sql.SQLException ; 21 import java.sql.Statement ; 22 23 import org.apache.ojb.broker.Identity; 24 import org.apache.ojb.broker.PersistenceBrokerException; 25 import org.apache.ojb.broker.PersistenceBrokerSQLException; 26 import org.apache.ojb.broker.core.ValueContainer; 27 import org.apache.ojb.broker.metadata.ClassDescriptor; 28 import org.apache.ojb.broker.query.Query; 29 30 33 public interface StatementManagerIF 34 { 35 36 37 int FETCH_SIZE_NOT_APPLICABLE = -1; 38 39 int FETCH_SIZE_NOT_EXPLICITLY_SET = 0; 40 41 47 void bindDelete(PreparedStatement stmt, Identity oid, ClassDescriptor cld) throws java.sql.SQLException ; 48 51 void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) 52 throws java.sql.SQLException ; 53 54 57 int bindStatement(PreparedStatement stmt, Query query, ClassDescriptor cld, int param) 58 throws SQLException ; 59 60 63 void bindInsert(PreparedStatement stmt, ClassDescriptor cld, Object obj) 64 throws SQLException ; 65 73 void bindSelect(PreparedStatement stmt, Identity oid, ClassDescriptor cld, boolean callableStmt) throws SQLException ; 74 77 void bindUpdate(PreparedStatement stmt, ClassDescriptor cld, Object obj) 78 throws SQLException ; 79 80 85 int bindValues(PreparedStatement stmt, ValueContainer[] valueContainer, int index) throws SQLException ; 86 87 90 PreparedStatement getDeleteStatement(ClassDescriptor cds) 91 throws PersistenceBrokerSQLException; 92 95 Statement getGenericStatement(ClassDescriptor cds, boolean scrollable) throws PersistenceBrokerException; 96 99 PreparedStatement getInsertStatement(ClassDescriptor cds) 100 throws PersistenceBrokerSQLException; 101 104 PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql, 105 boolean scrollable, int explicitFetchSizeHint, boolean callableStmt) 106 throws PersistenceBrokerException; 107 110 PreparedStatement getSelectByPKStatement(ClassDescriptor cds) 111 throws PersistenceBrokerSQLException; 112 115 PreparedStatement getUpdateStatement(ClassDescriptor cds) 116 throws PersistenceBrokerSQLException; 117 118 public void closeResources(Statement stmt, ResultSet rs); 119 120 } 121 | Popular Tags |