1 21 22 package org.apache.derby.impl.sql.execute; 23 24 import org.apache.derby.iapi.services.stream.HeaderPrintWriter; 25 26 import org.apache.derby.iapi.services.io.ArrayUtil; 27 import org.apache.derby.iapi.services.io.StoredFormatIds; 28 import org.apache.derby.iapi.services.io.FormatIdUtil; 29 30 import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator; 31 32 import org.apache.derby.iapi.sql.execute.ConstantAction; 33 import org.apache.derby.iapi.sql.execute.ExecRow; 34 35 import org.apache.derby.iapi.sql.Activation; 36 37 import org.apache.derby.iapi.error.StandardException; 38 39 import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo; 40 41 import org.apache.derby.catalog.UUID; 42 43 import org.apache.derby.iapi.services.io.FormatableBitSet; 44 45 import java.io.ObjectOutput ; 46 import java.io.ObjectInput ; 47 import java.io.IOException ; 48 49 import java.util.Properties ; 50 51 57 58 public class UpdateConstantAction extends WriteCursorConstantAction 59 { 60 69 70 73 int[] changedColumnIds; 74 75 private boolean positionedUpdate; 76 77 int numColumns; 78 79 81 85 public UpdateConstantAction() { super(); } 86 87 113 public UpdateConstantAction( 114 long conglomId, 115 StaticCompiledOpenConglomInfo heapSCOCI, 116 IndexRowGenerator[] irgs, 117 long[] indexCIDS, 118 StaticCompiledOpenConglomInfo[] indexSCOCIs, 119 String [] indexNames, 120 ExecRow emptyHeapRow, 121 boolean deferred, 122 UUID targetUUID, 123 int lockMode, 124 int[] changedColumnIds, 125 FKInfo[] fkInfo, 126 TriggerInfo triggerInfo, 127 FormatableBitSet baseRowReadList, 128 int[] baseRowReadMap, 129 int[] streamStorableHeapColIds, 130 int numColumns, 131 boolean positionedUpdate, 132 boolean singleRowSource) 133 { 134 super( 135 conglomId, 136 heapSCOCI, 137 irgs, 138 indexCIDS, 139 indexSCOCIs, 140 indexNames, 141 deferred, 142 (Properties ) null, 143 targetUUID, 144 lockMode, 145 fkInfo, 146 triggerInfo, 147 emptyHeapRow, 148 baseRowReadList, 149 baseRowReadMap, 150 streamStorableHeapColIds, 151 singleRowSource 152 ); 153 154 this.changedColumnIds = changedColumnIds; 155 this.positionedUpdate = positionedUpdate; 156 this.numColumns = numColumns; 157 } 158 159 161 162 164 169 public void readExternal( ObjectInput in ) 170 throws IOException , ClassNotFoundException 171 { 172 super.readExternal(in); 173 changedColumnIds = ArrayUtil.readIntArray(in); 174 positionedUpdate = in.readBoolean(); 175 numColumns = in.readInt(); 176 } 177 178 183 public void writeExternal( ObjectOutput out ) 184 throws IOException 185 { 186 super.writeExternal(out); 187 ArrayUtil.writeIntArray(out,changedColumnIds); 188 out.writeBoolean(positionedUpdate); 189 out.writeInt(numColumns); 190 } 191 192 197 public int getTypeFormatId() { return StoredFormatIds.UPDATE_CONSTANT_ACTION_V01_ID; } 198 199 } 201 | Popular Tags |