KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > sql > execute > UpdatableVTIConstantAction


1 /*
2
3    Derby - Class org.apache.derby.impl.sql.execute.UpdatableVTIConstantAction
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.impl.sql.execute;
23
24 import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
25
26
27 import org.apache.derby.iapi.services.io.ArrayUtil;
28 import org.apache.derby.iapi.services.io.StoredFormatIds;
29 import org.apache.derby.iapi.services.io.FormatIdUtil;
30
31 import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;
32
33 import org.apache.derby.iapi.sql.execute.ConstantAction;
34 import org.apache.derby.iapi.sql.execute.ExecRow;
35
36 import org.apache.derby.iapi.sql.Activation;
37
38 import org.apache.derby.iapi.error.StandardException;
39
40 import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo;
41
42 import org.apache.derby.catalog.UUID;
43
44 import java.io.ObjectOutput JavaDoc;
45 import java.io.ObjectInput JavaDoc;
46 import java.io.IOException JavaDoc;
47 import java.io.Serializable JavaDoc;
48
49 import java.sql.PreparedStatement JavaDoc;
50 import java.sql.SQLException JavaDoc;
51
52 import java.util.Properties JavaDoc;
53
54 /**
55  * This class describes compiled constants that are passed into
56  * Updatable VTIResultSets.
57  *
58  * @author Jerry Brenner
59  */

60
61 public class UpdatableVTIConstantAction extends WriteCursorConstantAction
62 {
63
64     /********************************************************
65     **
66     ** This class implements Formatable. But it is NOT used
67     ** across either major or minor releases. It is only
68     ** written persistently in stored prepared statements,
69     ** not in the replication stage. SO, IT IS OK TO CHANGE
70     ** ITS read/writeExternal.
71     **
72     ********************************************************/

73
74     public int[] changedColumnIds;
75
76     public int statementType;
77     
78     // CONSTRUCTORS
79

80     /**
81      * Public niladic constructor. Needed for Formatable interface to work.
82      *
83      */

84     public UpdatableVTIConstantAction() { super(); }
85
86     /**
87      * Make the ConstantAction for an updatable VTI statement.
88      *
89      * @param deferred Whether or not to do operation in deferred mode
90      * @param changedColumnIds Array of ids of changed columns
91      *
92      */

93     public UpdatableVTIConstantAction( int statementType,
94                                         boolean deferred,
95                                         int[] changedColumnIds)
96     {
97         super(0,
98               null,
99               null,
100               null,
101               null,
102               null,
103               deferred ,
104               null,
105               null,
106               0,
107               null,
108               null,
109               (ExecRow)null, // never need to pass in a heap row
110
null,
111               null,
112               null,
113               // singleRowSource, irrelevant
114
false
115               );
116         this.statementType = statementType;
117         this.changedColumnIds = changedColumnIds;
118     }
119
120     // INTERFACE METHODS
121

122     /**
123      * Get the formatID which corresponds to this class.
124      *
125      * @return the formatID of this class
126      */

127     public int getTypeFormatId() { return StoredFormatIds.UPDATABLE_VTI_CONSTANT_ACTION_V01_ID; }
128
129     // CLASS METHODS
130

131 }
132
Popular Tags