1 56 package org.objectstyle.cayenne.dba.oracle; 57 58 import java.sql.Connection ; 59 import java.sql.SQLException ; 60 import java.util.List ; 61 62 import org.objectstyle.cayenne.access.DataNode; 63 import org.objectstyle.cayenne.access.OperationObserver; 64 import org.objectstyle.cayenne.access.trans.BatchQueryBuilder; 65 import org.objectstyle.cayenne.access.trans.LOBBatchQueryBuilder; 66 import org.objectstyle.cayenne.access.trans.LOBBatchQueryWrapper; 67 import org.objectstyle.cayenne.query.BatchQuery; 68 69 75 public class OracleDataNode extends DataNode { 76 77 public OracleDataNode() { 78 super(); 79 } 80 81 public OracleDataNode(String name) { 82 super(name); 83 } 84 85 86 90 public void runBatchUpdateWithLOBColumns( 91 Connection con, 92 BatchQuery query, 93 OperationObserver delegate) throws SQLException , Exception { 94 95 new OracleLOBBatchAction(query, getAdapter()).performAction(con, delegate); 96 } 97 98 101 protected void processLOBRow( 102 Connection con, 103 LOBBatchQueryBuilder queryBuilder, 104 LOBBatchQueryWrapper selectQuery, 105 List qualifierAttributes) throws SQLException , Exception { 106 107 new OracleLOBBatchAction(null, getAdapter()).processLOBRow(con, 108 queryBuilder, 109 selectQuery, 110 qualifierAttributes); 111 } 112 113 117 protected void runBatchUpdateAsBatch( 118 Connection con, 119 BatchQuery query, 120 BatchQueryBuilder queryBuilder, 121 OperationObserver delegate) throws SQLException , Exception { 122 123 queryBuilder.setTrimFunction(OracleAdapter.TRIM_FUNCTION); 124 super.runBatchUpdateAsBatch(con, query, queryBuilder, delegate); 125 } 126 127 131 protected void runBatchUpdateAsIndividualQueries( 132 Connection con, 133 BatchQuery query, 134 BatchQueryBuilder queryBuilder, 135 OperationObserver delegate) throws SQLException , Exception { 136 137 queryBuilder.setTrimFunction(OracleAdapter.TRIM_FUNCTION); 138 super.runBatchUpdateAsIndividualQueries(con, query, queryBuilder, delegate); 139 } 140 } | Popular Tags |