1 24 25 package org.objectweb.cjdbc.common.sql; 26 27 import java.io.IOException ; 28 import java.util.ArrayList ; 29 30 import org.objectweb.cjdbc.common.stream.CJDBCInputStream; 31 32 39 public abstract class AbstractWriteRequest extends AbstractRequest 40 { 41 42 protected transient String tableName; 43 44 48 protected transient ArrayList columns; 49 50 51 protected transient boolean blocking = true; 52 53 54 protected transient String pkValue = null; 55 56 67 public AbstractWriteRequest(String sqlQuery, boolean escapeProcessing, 68 int timeout, String lineSeparator, int requestType) 69 { 70 super(sqlQuery, escapeProcessing, timeout, lineSeparator, requestType); 71 } 72 73 82 public AbstractWriteRequest(CJDBCInputStream in, int requestType) 83 throws IOException 84 { 85 super(in, requestType); 86 } 87 88 93 public String getTableName() 94 { 95 return tableName; 96 } 97 98 104 public ArrayList getColumns() 105 { 106 return columns; 107 } 108 109 114 protected void cloneTableNameAndColumns( 115 AbstractWriteRequest abstractWriteRequest) 116 { 117 tableName = abstractWriteRequest.getTableName(); 118 columns = abstractWriteRequest.getColumns(); 119 pkValue = abstractWriteRequest.getPk(); 120 cacheable = abstractWriteRequest.getCacheAbility(); 121 } 122 123 128 public boolean mightBlock() 129 { 130 return blocking; 131 } 132 133 138 public void setBlocking(boolean blocking) 139 { 140 this.blocking = blocking; 141 } 142 143 146 public String getPk() 147 { 148 return pkValue; 149 } 150 151 } | Popular Tags |