1 21 22 package org.apache.derby.impl.sql.execute; 23 24 import org.apache.derby.iapi.services.io.ArrayUtil; 25 import org.apache.derby.iapi.services.io.StoredFormatIds; 26 import org.apache.derby.iapi.services.io.FormatIdUtil; 27 28 import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator; 29 30 import org.apache.derby.iapi.sql.execute.ConstantAction; 31 import org.apache.derby.iapi.sql.execute.ExecRow; 32 33 import org.apache.derby.iapi.error.StandardException; 34 35 import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo; 36 37 import org.apache.derby.catalog.UUID; 38 39 import org.apache.derby.iapi.services.io.FormatableBitSet; 40 import org.apache.derby.iapi.sql.ResultDescription; 41 42 import java.io.ObjectOutput ; 43 import java.io.ObjectInput ; 44 import java.io.IOException ; 45 46 import java.util.Properties ; 47 48 49 55 56 public class DeleteConstantAction extends WriteCursorConstantAction 57 { 58 67 68 int numColumns; 69 ConstantAction[] dependentCActions; ResultDescription resultDescription; 72 74 78 public DeleteConstantAction() { super(); } 79 80 100 public DeleteConstantAction( 101 long conglomId, 102 StaticCompiledOpenConglomInfo heapSCOCI, 103 IndexRowGenerator[] irgs, 104 long[] indexCIDS, 105 StaticCompiledOpenConglomInfo[] indexSCOCIs, 106 ExecRow emptyHeapRow, 107 boolean deferred, 108 UUID targetUUID, 109 int lockMode, 110 FKInfo[] fkInfo, 111 TriggerInfo triggerInfo, 112 FormatableBitSet baseRowReadList, 113 int[] baseRowReadMap, 114 int[] streamStorableHeapColIds, 115 int numColumns, 116 boolean singleRowSource, 117 ResultDescription resultDescription, 118 ConstantAction[] dependentCActions) 119 { 120 super( conglomId, 121 heapSCOCI, 122 irgs, indexCIDS, indexSCOCIs, 123 null, deferred, 125 (Properties ) null, 126 targetUUID, 127 lockMode, 128 fkInfo, 129 triggerInfo, 130 emptyHeapRow, 131 baseRowReadList, 132 baseRowReadMap, 133 streamStorableHeapColIds, 134 singleRowSource 135 ); 136 137 this.numColumns = numColumns; 138 this.resultDescription = resultDescription; 139 this.dependentCActions = dependentCActions; 140 } 141 142 144 146 151 public void readExternal( ObjectInput in ) 152 throws IOException , ClassNotFoundException 153 { 154 super.readExternal(in); 155 numColumns = in.readInt(); 156 157 dependentCActions = new ConstantAction[ArrayUtil.readArrayLength(in)]; 159 ArrayUtil.readArrayItems(in, dependentCActions); 160 resultDescription = (ResultDescription) in.readObject(); 161 162 } 163 164 168 public void writeExternal( ObjectOutput out ) 169 throws IOException 170 { 171 super.writeExternal(out); 172 out.writeInt(numColumns); 173 174 ArrayUtil.writeArray(out, dependentCActions); 176 out.writeObject(resultDescription); 177 178 } 179 180 185 public int getTypeFormatId() { return StoredFormatIds.DELETE_CONSTANT_ACTION_V01_ID; } 186 187 } 189 | Popular Tags |