001: /*
002:
003: Derby - Class org.apache.derby.impl.sql.execute.UpdatableVTIConstantAction
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to you under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derby.impl.sql.execute;
023:
024: import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
025:
026: import org.apache.derby.iapi.services.io.ArrayUtil;
027: import org.apache.derby.iapi.services.io.StoredFormatIds;
028: import org.apache.derby.iapi.services.io.FormatIdUtil;
029:
030: import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;
031:
032: import org.apache.derby.iapi.sql.execute.ConstantAction;
033: import org.apache.derby.iapi.sql.execute.ExecRow;
034:
035: import org.apache.derby.iapi.sql.Activation;
036:
037: import org.apache.derby.iapi.error.StandardException;
038:
039: import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo;
040:
041: import org.apache.derby.catalog.UUID;
042:
043: import java.io.ObjectOutput;
044: import java.io.ObjectInput;
045: import java.io.IOException;
046: import java.io.Serializable;
047:
048: import java.sql.PreparedStatement;
049: import java.sql.SQLException;
050:
051: import java.util.Properties;
052:
053: /**
054: * This class describes compiled constants that are passed into
055: * Updatable VTIResultSets.
056: *
057: * @author Jerry Brenner
058: */
059:
060: public class UpdatableVTIConstantAction extends
061: WriteCursorConstantAction {
062:
063: /********************************************************
064: **
065: ** This class implements Formatable. But it is NOT used
066: ** across either major or minor releases. It is only
067: ** written persistently in stored prepared statements,
068: ** not in the replication stage. SO, IT IS OK TO CHANGE
069: ** ITS read/writeExternal.
070: **
071: ********************************************************/
072:
073: public int[] changedColumnIds;
074:
075: public int statementType;
076:
077: // CONSTRUCTORS
078:
079: /**
080: * Public niladic constructor. Needed for Formatable interface to work.
081: *
082: */
083: public UpdatableVTIConstantAction() {
084: super ();
085: }
086:
087: /**
088: * Make the ConstantAction for an updatable VTI statement.
089: *
090: * @param deferred Whether or not to do operation in deferred mode
091: * @param changedColumnIds Array of ids of changed columns
092: *
093: */
094: public UpdatableVTIConstantAction(int statementType,
095: boolean deferred, int[] changedColumnIds) {
096: super (0, null, null, null, null, null, deferred, null, null, 0,
097: null, null, (ExecRow) null, // never need to pass in a heap row
098: null, null, null,
099: // singleRowSource, irrelevant
100: false);
101: this .statementType = statementType;
102: this .changedColumnIds = changedColumnIds;
103: }
104:
105: // INTERFACE METHODS
106:
107: /**
108: * Get the formatID which corresponds to this class.
109: *
110: * @return the formatID of this class
111: */
112: public int getTypeFormatId() {
113: return StoredFormatIds.UPDATABLE_VTI_CONSTANT_ACTION_V01_ID;
114: }
115:
116: // CLASS METHODS
117:
118: }
|