MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbOperation.java
1 /*
2  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 /*
18  * NdbOperation.java
19  */
20 
21 package com.mysql.ndbjtie.ndbapi;
22 
23 import java.nio.ByteBuffer;
24 
25 import com.mysql.jtie.Wrapper;
26 import com.mysql.jtie.ArrayWrapper;
27 
28 public class NdbOperation extends Wrapper implements NdbOperationConst
29 {
30  public /*_virtual_*/ native NdbBlob/*_NdbBlob *_*/ getBlobHandle(String/*_const char *_*/ anAttrName) /*_const_*/; // MMM nameclash with non-const version
31  public /*_virtual_*/ native NdbBlob/*_NdbBlob *_*/ getBlobHandle(int/*_Uint32_*/ anAttrId) /*_const_*/; // MMM nameclash with non-const version
32  public final native NdbErrorConst/*_const NdbError &_*/ getNdbError() /*_const_*/;
33  public final native int getNdbErrorLine() /*_const_*/;
34  public final native String/*_const char *_*/ getTableName() /*_const_*/;
35  public final native NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ getTable() /*_const_*/;
36  public final native int/*_Type_*/ getType() /*_const_*/;
37  public final native int/*_LockMode_*/ getLockMode() /*_const_*/;
38  public final native int/*_AbortOption_*/ getAbortOption() /*_const_*/;
39  public /*_virtual_*/ native NdbTransaction/*_NdbTransaction *_*/ getNdbTransaction() /*_const_*/;
40  public final native NdbLockHandle/*_const NdbLockHandle *_*/ getLockHandle() /*_const_*/;
41  public final native NdbLockHandle/*_const NdbLockHandle *_*/ getLockHandleM();
42  public /*_virtual_*/ native int insertTuple();
43  public /*_virtual_*/ native int updateTuple();
44  public /*_virtual_*/ native int writeTuple();
45  public /*_virtual_*/ native int deleteTuple();
46  public /*_virtual_*/ native int readTuple(int/*_LockMode_*/ p0);
47  public final native int equal(String/*_const char *_*/ anAttrName, ByteBuffer/*_const char *_*/ aValue);
48  public final native int equal(String/*_const char *_*/ anAttrName, int/*_Int32_*/ aValue); // MMM covers signed and unsigned integral types
49  public final native int equal(String/*_const char *_*/ anAttrName, long/*_Int64_*/ aValue); // MMM covers signed and unsigned integral types
50  public final native int equal(int/*_Uint32_*/ anAttrId, ByteBuffer/*_const char *_*/ aValue);
51  public final native int equal(int/*_Uint32_*/ anAttrId, int/*_Int32_*/ aValue); // MMM covers signed and unsigned integral types
52  public final native int equal(int/*_Uint32_*/ anAttrId, long/*_Int64_*/ aValue); // MMM covers signed and unsigned integral types
53  public final native NdbRecAttr/*_NdbRecAttr *_*/ getValue(String/*_const char *_*/ anAttrName, ByteBuffer/*_char *_*/ aValue /*_= 0_*/);
54  public final native NdbRecAttr/*_NdbRecAttr *_*/ getValue(int/*_Uint32_*/ anAttrId, ByteBuffer/*_char *_*/ aValue /*_= 0_*/);
55  public final native NdbRecAttr/*_NdbRecAttr *_*/ getValue(NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ p0, ByteBuffer/*_char *_*/ val /*_= 0_*/);
56  public final native int setValue(String/*_const char *_*/ anAttrName, ByteBuffer/*_const char *_*/ aValue);
57  public final native int setValue(String/*_const char *_*/ anAttrName, int/*_Int32_*/ aValue); // MMM covers signed and unsigned integral types
58  public final native int setValue(String/*_const char *_*/ anAttrName, long/*_Int64_*/ aValue); // MMM covers signed and unsigned integral types
59  public final native int setValue(String/*_const char *_*/ anAttrName, float aValue);
60  public final native int setValue(String/*_const char *_*/ anAttrName, double aValue);
61  public final native int setValue(int/*_Uint32_*/ anAttrId, ByteBuffer/*_const char *_*/ aValue);
62  public final native int setValue(int/*_Uint32_*/ anAttrId, int/*_Int32_*/ aValue); // MMM covers signed and unsigned integral types
63  public final native int setValue(int/*_Uint32_*/ anAttrId, long/*_Int64_*/ aValue); // MMM covers signed and unsigned integral types
64  public final native int setValue(int/*_Uint32_*/ anAttrId, float aValue);
65  public final native int setValue(int/*_Uint32_*/ anAttrId, double aValue);
66  public /*_virtual_*/ native NdbBlob/*_NdbBlob *_*/ getBlobHandleM(String/*_const char *_*/ anAttrName); // MMM renamed due to nameclash with const version
67  public /*_virtual_*/ native NdbBlob/*_NdbBlob *_*/ getBlobHandleM(int/*_Uint32_*/ anAttrId); // MMM renamed due to nameclash with const version
68  public final native int setAbortOption(int/*_AbortOption_*/ p0);
69  public interface /*_struct_*/ GetValueSpecConst
70  {
71  NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ column();
72  // MMM! support <out:BB> or check if needed: ByteBuffer/*_void *_*/ appStorage();
73  NdbRecAttr/*_NdbRecAttr *_*/ recAttr();
74  }
75  static public interface GetValueSpecConstArray extends ArrayWrapper< GetValueSpecConst >
76  {
77  }
78  static public class GetValueSpecArray extends Wrapper implements GetValueSpecConstArray
79  {
80  static public native GetValueSpecArray create(int length);
81  static public native void delete(GetValueSpecArray e);
82  public native GetValueSpec at(int i);
83  }
84  static public class /*_struct_*/ GetValueSpec extends Wrapper implements GetValueSpecConst
85  {
86  public final native NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ column();
87  // MMM! support <out:BB> or check if needed: public final native ByteBuffer/*_void *_*/ appStorage();
88  public final native NdbRecAttr/*_NdbRecAttr *_*/ recAttr();
89  public final native void column(NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ p0);
90  // MMM! support <out:BB> or check if needed: public final native void appStorage(ByteBuffer/*_void *_*/ p0);
91  public final native void recAttr(NdbRecAttr/*_NdbRecAttr *_*/ p0);
92  static public final native GetValueSpec create();
93  static public final native void delete(GetValueSpec p0);
94  }
95  static public interface SetValueSpecConstArray extends ArrayWrapper< SetValueSpecConst >
96  {
97  }
98  static public class SetValueSpecArray extends Wrapper implements SetValueSpecConstArray
99  {
100  static public native SetValueSpecArray create(int length);
101  static public native void delete(SetValueSpecArray e);
102  public native SetValueSpec at(int i);
103  }
104  public interface /*_struct_*/ SetValueSpecConst
105  {
106  NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ column();
107  // MMM! support <out:BB> or check if needed: ByteBuffer/*_const void *_*/ value();
108  }
109  static public class /*_struct_*/ SetValueSpec extends Wrapper implements SetValueSpecConst
110  {
111  public final native NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ column();
112  // MMM! support <out:BB> or check if needed: public final native ByteBuffer/*_const void *_*/ value();
113  public final native void column(NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ p0);
114  // MMM! support <out:BB> or check if needed: public final native void value(ByteBuffer/*_const void *_*/ p0);
115  static public final native SetValueSpec create();
116  static public final native void delete(SetValueSpec p0);
117  }
118  public interface /*_struct_*/ OperationOptionsConst
119  {
120  long/*_Uint64_*/ optionsPresent();
121  public interface /*_enum_*/ Flags
122  {
123  int OO_ABORTOPTION = 0x01,
124  OO_GETVALUE = 0x02,
125  OO_SETVALUE = 0x04,
126  OO_PARTITION_ID = 0x08,
127  OO_INTERPRETED = 0x10,
128  OO_ANYVALUE = 0x20,
129  OO_CUSTOMDATA = 0x40;
130  }
131  int/*_AbortOption_*/ abortOption();
132  GetValueSpecArray/*_GetValueSpec *_*/ extraGetValues();
133  int/*_Uint32_*/ numExtraGetValues();
134  SetValueSpecConstArray/*_const SetValueSpec *_*/ extraSetValues();
135  int/*_Uint32_*/ numExtraSetValues();
136  int/*_Uint32_*/ partitionId();
137  NdbInterpretedCodeConst/*_const NdbInterpretedCode *_*/ interpretedCode();
138  int/*_Uint32_*/ anyValue();
139  // MMM ByteBuffer/*_void *_*/ customData();
140  }
141  static public class /*_struct_*/ OperationOptions extends Wrapper implements OperationOptionsConst
142  {
143  public final native long/*_Uint64_*/ optionsPresent();
144  public final native int/*_AbortOption_*/ abortOption();
145  public final native GetValueSpecArray/*_GetValueSpec *_*/ extraGetValues();
146  public final native int/*_Uint32_*/ numExtraGetValues();
147  public final native SetValueSpecConstArray/*_const SetValueSpec *_*/ extraSetValues();
148  public final native int/*_Uint32_*/ numExtraSetValues();
149  public final native int/*_Uint32_*/ partitionId();
150  public final native NdbInterpretedCodeConst/*_const NdbInterpretedCode *_*/ interpretedCode();
151  public final native int/*_Uint32_*/ anyValue();
152  // MMM! support <out:BB> or check if needed: public final native ByteBuffer/*_void *_*/ customData();
153  public final native void optionsPresent(long/*_Uint64_*/ p0);
154  public final native void abortOption(int/*_AbortOption_*/ p0);
155  public final native void extraGetValues(GetValueSpecArray/*_GetValueSpec *_*/ p0);
156  public final native void numExtraGetValues(int/*_Uint32_*/ p0);
157  public final native void extraSetValues(SetValueSpecConstArray/*_const SetValueSpec *_*/ p0);
158  public final native void numExtraSetValues(int/*_Uint32_*/ p0);
159  public final native void partitionId(int/*_Uint32_*/ p0);
160  public final native void interpretedCode(NdbInterpretedCodeConst/*_const NdbInterpretedCode *_*/ p0);
161  public final native void anyValue(int/*_Uint32_*/ p0);
162  // MMM! support <out:BB> or check if needed: public final native public final native void customData(ByteBuffer/*_void *_*/ p0);
163  static public final native OperationOptions create();
164  static public final native void delete(OperationOptions p0);
165  }
166 }