1 /* 2 Copyright (c) 2010, 2014, 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, version 2.0, 6 as published by the Free Software Foundation. 7 8 This program is also distributed with certain software (including 9 but not limited to OpenSSL) that is licensed under separate terms, 10 as designated in a particular file or component or in included license 11 documentation. The authors of MySQL hereby grant you an additional 12 permission to link the program and your derivative works with the 13 separately licensed software that they have included with MySQL. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License, version 2.0, for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 /* 25 * NdbDictionary.java 26 */ 27 28 package com.mysql.ndbjtie.ndbapi; 29 30 import java.nio.ByteBuffer; 31 32 import com.mysql.jtie.Wrapper; 33 import com.mysql.jtie.ArrayWrapper; 34 35 public class NdbDictionary extends Wrapper 36 { create()37 static public native NdbDictionary create(); // MMM non-final, support for derivation delete(NdbDictionary p0)38 static public /*_virtual_*/ native void delete(NdbDictionary p0); // MMM non-final, support for derivation 39 public interface ObjectConst 40 { 41 public interface /*_enum_*/ Status 42 { 43 int New = 0 /*__*/, 44 Changed = 1 /*__*/, 45 Retrieved = 2 /*__*/, 46 Invalid = 3 /*__*/, 47 Altered = 4 /*__*/; 48 } getObjectStatus()49 /*_virtual_*/ int/*_Status_*/ getObjectStatus() /*_const_*/ /*_= 0_*/; getObjectVersion()50 /*_virtual_*/ int getObjectVersion() /*_const_*/ /*_= 0_*/; getObjectId()51 /*_virtual_*/ int getObjectId() /*_const_*/ /*_= 0_*/; 52 } 53 static public abstract class Object extends Wrapper implements ObjectConst 54 { getObjectStatus()55 public /*_virtual_*/ abstract int/*_Status_*/ getObjectStatus() /*_const_*/ /*_= 0_*/; getObjectVersion()56 public /*_virtual_*/ abstract int getObjectVersion() /*_const_*/ /*_= 0_*/; getObjectId()57 public /*_virtual_*/ abstract int getObjectId() /*_const_*/ /*_= 0_*/; 58 // MMM abstract class: static public native Object create(); // MMM non-final, support for derivation delete(Object p0)59 static public /*_virtual_*/ native void delete(Object p0); // MMM non-final, support for derivation 60 public interface /*_enum_*/ Type 61 { 62 int TypeUndefined = 0, 63 SystemTable = 1, 64 UserTable = 2, 65 UniqueHashIndex = 3, 66 OrderedIndex = 6, 67 HashIndexTrigger = 7, 68 IndexTrigger = 8, 69 SubscriptionTrigger = 9, 70 ReadOnlyConstraint = 10, 71 TableEvent = 11, 72 Tablespace = 20, 73 LogfileGroup = 21, 74 Datafile = 22, 75 Undofile = 23; 76 } 77 public interface /*_enum_*/ State 78 { 79 int StateUndefined = 0, 80 StateOffline = 1, 81 StateBuilding = 2, 82 StateDropping = 3, 83 StateOnline = 4, 84 StateBackup = 5, 85 StateBroken = 9; 86 } 87 public interface /*_enum_*/ Store 88 { 89 int StoreUndefined = 0, 90 StoreNotLogged = 1, 91 StorePermanent = 2; 92 } 93 public interface /*_enum_*/ FragmentType 94 { 95 int FragUndefined = 0, 96 FragSingle = 1, 97 FragAllSmall = 2, 98 FragAllMedium = 3, 99 FragAllLarge = 4, 100 DistrKeyHash = 5, 101 DistrKeyLin = 6, 102 UserDefined = 7; 103 } 104 } 105 public interface ObjectIdConst extends ObjectConst 106 { getObjectStatus()107 /*_virtual_*/ int/*_Status_*/ getObjectStatus() /*_const_*/; getObjectVersion()108 /*_virtual_*/ int getObjectVersion() /*_const_*/; getObjectId()109 /*_virtual_*/ int getObjectId() /*_const_*/; 110 } 111 static public class ObjectId extends Wrapper implements ObjectIdConst 112 { getObjectStatus()113 public /*_virtual_*/ native int/*_Status_*/ getObjectStatus() /*_const_*/; getObjectVersion()114 public /*_virtual_*/ native int getObjectVersion() /*_const_*/; getObjectId()115 public /*_virtual_*/ native int getObjectId() /*_const_*/; create()116 static public native ObjectId create(); // MMM non-final, support for derivation delete(ObjectId p0)117 static public /*_virtual_*/ native void delete(ObjectId p0); // MMM non-final, support for derivation 118 } 119 public interface ColumnConst // MMM does not extend ObjectConst 120 { 121 public interface /*_enum_*/ Type 122 { 123 int Undefined = 0 /*_NDB_TYPE_UNDEFINED_*/, 124 Tinyint = 1 /*_NDB_TYPE_TINYINT_*/, 125 Tinyunsigned = 2 /*_NDB_TYPE_TINYUNSIGNED_*/, 126 Smallint = 3 /*_NDB_TYPE_SMALLINT_*/, 127 Smallunsigned = 4 /*_NDB_TYPE_SMALLUNSIGNED_*/, 128 Mediumint = 5 /*_NDB_TYPE_MEDIUMINT_*/, 129 Mediumunsigned = 6 /*_NDB_TYPE_MEDIUMUNSIGNED_*/, 130 Int = 7 /*_NDB_TYPE_INT_*/, 131 Unsigned = 8 /*_NDB_TYPE_UNSIGNED_*/, 132 Bigint = 9 /*_NDB_TYPE_BIGINT_*/, 133 Bigunsigned = 10 /*_NDB_TYPE_BIGUNSIGNED_*/, 134 Float = 11 /*_NDB_TYPE_FLOAT_*/, 135 Double = 12 /*_NDB_TYPE_DOUBLE_*/, 136 Olddecimal = 13 /*_NDB_TYPE_OLDDECIMAL_*/, 137 Olddecimalunsigned = 28 /*_NDB_TYPE_OLDDECIMALUNSIGNED_*/, 138 Decimal = 29 /*_NDB_TYPE_DECIMAL_*/, 139 Decimalunsigned = 30 /*_NDB_TYPE_DECIMALUNSIGNED_*/, 140 Char = 14 /*_NDB_TYPE_CHAR_*/, 141 Varchar = 15 /*_NDB_TYPE_VARCHAR_*/, 142 Binary = 16 /*_NDB_TYPE_BINARY_*/, 143 Varbinary = 17 /*_NDB_TYPE_VARBINARY_*/, 144 Datetime = 18 /*_NDB_TYPE_DATETIME_*/, 145 Date = 19 /*_NDB_TYPE_DATE_*/, 146 Blob = 20 /*_NDB_TYPE_BLOB_*/, 147 Text = 21 /*_NDB_TYPE_TEXT_*/, 148 Bit = 22 /*_NDB_TYPE_BIT_*/, 149 Longvarchar = 23 /*_NDB_TYPE_LONGVARCHAR_*/, 150 Longvarbinary = 24 /*_NDB_TYPE_LONGVARBINARY_*/, 151 Time = 25 /*_NDB_TYPE_TIME_*/, 152 Year = 26 /*_NDB_TYPE_YEAR_*/, 153 Timestamp = 27 /*_NDB_TYPE_TIMESTAMP_*/; 154 } 155 public interface /*_enum_*/ ArrayType 156 { 157 int ArrayTypeFixed = 0 /*_NDB_ARRAYTYPE_FIXED_*/, 158 ArrayTypeShortVar = 1 /*_NDB_ARRAYTYPE_SHORT_VAR_*/, 159 ArrayTypeMediumVar = 2 /*_NDB_ARRAYTYPE_MEDIUM_VAR_*/; 160 } 161 public interface /*_enum_*/ StorageType 162 { 163 int StorageTypeMemory = 0 /*_NDB_STORAGETYPE_MEMORY_*/, 164 StorageTypeDisk = 1 /*_NDB_STORAGETYPE_DISK_*/; 165 } getAutoIncrement()166 boolean getAutoIncrement() /*_const_*/; getName()167 String/*_const char *_*/ getName() /*_const_*/; getNullable()168 boolean getNullable() /*_const_*/; getPrimaryKey()169 boolean getPrimaryKey() /*_const_*/; getColumnNo()170 int getColumnNo() /*_const_*/; equal(ColumnConst column)171 boolean equal(ColumnConst/*_const Column &_*/ column) /*_const_*/; getType()172 int/*_Type_*/ getType() /*_const_*/; getPrecision()173 int getPrecision() /*_const_*/; getScale()174 int getScale() /*_const_*/; getLength()175 int getLength() /*_const_*/; 176 // MMM unsupported, opaque MySQL server type, mapped by mysql utilities: CHARSET_INFO * getCharset() /*_const_*/; getCharsetNumber()177 int getCharsetNumber() /*_const_*/; getInlineSize()178 int getInlineSize() /*_const_*/; getPartSize()179 int getPartSize() /*_const_*/; getStripeSize()180 int getStripeSize() /*_const_*/; getSize()181 int getSize() /*_const_*/; getPartitionKey()182 boolean getPartitionKey() /*_const_*/; getArrayType()183 int/*_ArrayType_*/ getArrayType() /*_const_*/; getStorageType()184 int/*_StorageType_*/ getStorageType() /*_const_*/; getDynamic()185 boolean getDynamic() /*_const_*/; getIndexSourced()186 boolean getIndexSourced() /*_const_*/; 187 } 188 static public class Column extends Wrapper implements ColumnConst 189 { getAutoIncrement()190 public final native boolean getAutoIncrement() /*_const_*/; getName()191 public final native String/*_const char *_*/ getName() /*_const_*/; getNullable()192 public final native boolean getNullable() /*_const_*/; getPrimaryKey()193 public final native boolean getPrimaryKey() /*_const_*/; getColumnNo()194 public final native int getColumnNo() /*_const_*/; equal(ColumnConst column)195 public final native boolean equal(ColumnConst/*_const Column &_*/ column) /*_const_*/; getType()196 public final native int/*_Type_*/ getType() /*_const_*/; getPrecision()197 public final native int getPrecision() /*_const_*/; getScale()198 public final native int getScale() /*_const_*/; getLength()199 public final native int getLength() /*_const_*/; 200 // MMM unsupported, opaque MySQL server type, mapped by mysql utilities: public final native CHARSET_INFO * getCharset() /*_const_*/; getCharsetNumber()201 public final native int getCharsetNumber() /*_const_*/; getInlineSize()202 public final native int getInlineSize() /*_const_*/; getPartSize()203 public final native int getPartSize() /*_const_*/; getStripeSize()204 public final native int getStripeSize() /*_const_*/; getSize()205 public final native int getSize() /*_const_*/; getPartitionKey()206 public final native boolean getPartitionKey() /*_const_*/; getArrayType()207 public final native int/*_ArrayType_*/ getArrayType() /*_const_*/; getStorageType()208 public final native int/*_StorageType_*/ getStorageType() /*_const_*/; getDynamic()209 public final native boolean getDynamic() /*_const_*/; getIndexSourced()210 public final native boolean getIndexSourced() /*_const_*/; create(String name )211 static public final native Column create(String/*_const char *_*/ name /*_= ""_*/); create(ColumnConst column)212 static public final native Column create(ColumnConst/*_const Column &_*/ column); delete(Column p0)213 static public final native void delete(Column p0); setName(String name)214 public final native int setName(String/*_const char *_*/ name); setNullable(boolean p0)215 public final native void setNullable(boolean p0); setPrimaryKey(boolean p0)216 public final native void setPrimaryKey(boolean p0); setType(int type)217 public final native void setType(int/*_Type_*/ type); setPrecision(int p0)218 public final native void setPrecision(int p0); setScale(int p0)219 public final native void setScale(int p0); setLength(int length)220 public final native void setLength(int length); 221 // MMM unsupported, opaque MySQL server type, mapped by mysql utilities: public final native void setCharset(CHARSET_INFO * cs); setInlineSize(int size)222 public final native void setInlineSize(int size); setPartSize(int size)223 public final native void setPartSize(int size); setStripeSize(int size)224 public final native void setStripeSize(int size); setPartitionKey(boolean enable)225 public final native void setPartitionKey(boolean enable); setArrayType(int type)226 public final native void setArrayType(int/*_ArrayType_*/ type); setStorageType(int type)227 public final native void setStorageType(int/*_StorageType_*/ type); setDynamic(boolean p0)228 public final native void setDynamic(boolean p0); 229 } 230 public interface TableConst extends ObjectConst 231 { 232 public interface /*_enum_*/ SingleUserMode 233 { 234 int SingleUserModeLocked = 0 /*_NDB_SUM_LOCKED_*/, 235 SingleUserModeReadOnly = 1 /*_NDB_SUM_READONLY_*/, 236 SingleUserModeReadWrite = 2 /*_NDB_SUM_READ_WRITE_*/; 237 } getName()238 String/*_const char *_*/ getName() /*_const_*/; getTableId()239 int getTableId() /*_const_*/; getColumn(String name)240 ColumnConst/*_const Column *_*/ getColumn(String/*_const char *_*/ name) /*_const_*/; // MMM nameclash with non-const version getColumn(int attributeId)241 ColumnConst/*_const Column *_*/ getColumn(int attributeId) /*_const_*/; // MMM nameclash with non-const version getLogging()242 boolean getLogging() /*_const_*/; getFragmentType()243 int/*_FragmentType_*/ getFragmentType() /*_const_*/; getKValue()244 int getKValue() /*_const_*/; getMinLoadFactor()245 int getMinLoadFactor() /*_const_*/; getMaxLoadFactor()246 int getMaxLoadFactor() /*_const_*/; getNoOfColumns()247 int getNoOfColumns() /*_const_*/; getNoOfPrimaryKeys()248 int getNoOfPrimaryKeys() /*_const_*/; getPrimaryKey(int no)249 String/*_const char *_*/ getPrimaryKey(int no) /*_const_*/; equal(TableConst p0)250 boolean equal(TableConst/*_const Table &_*/ p0) /*_const_*/; getFrmData()251 ByteBuffer/*_const void *_*/ getFrmData() /*_const_*/; getFrmLength()252 int/*_Uint32_*/ getFrmLength() /*_const_*/; getFragmentData()253 ByteBuffer/*_const void *_*/ getFragmentData() /*_const_*/; getFragmentDataLen()254 int/*_Uint32_*/ getFragmentDataLen() /*_const_*/; getRangeListData()255 ByteBuffer/*_const void *_*/ getRangeListData() /*_const_*/; getRangeListDataLen()256 int/*_Uint32_*/ getRangeListDataLen() /*_const_*/; getDefaultRecord()257 NdbRecordConst/*_const NdbRecord *_*/ getDefaultRecord() /*_const_*/; getLinearFlag()258 boolean getLinearFlag() /*_const_*/; getFragmentCount()259 int/*_Uint32_*/ getFragmentCount() /*_const_*/; getTablespaceName()260 String/*_const char *_*/ getTablespaceName() /*_const_*/; getTablespace(int[] id , int[] version )261 boolean getTablespace(int[]/*_Uint32 *_*/ id /*_= 0_*/, int[]/*_Uint32 *_*/ version /*_= 0_*/) /*_const_*/; 262 // MMM declared but not implemented in NDBAPI: int/*_Object.Type_*/ getObjectType() /*_const_*/; getObjectStatus()263 /*_virtual_*/ int/*_Object.Status_*/ getObjectStatus() /*_const_*/; setStatusInvalid()264 void setStatusInvalid() /*_const_*/; getObjectVersion()265 /*_virtual_*/ int getObjectVersion() /*_const_*/; getDefaultNoPartitionsFlag()266 int/*_Uint32_*/ getDefaultNoPartitionsFlag() /*_const_*/; getObjectId()267 /*_virtual_*/ int getObjectId() /*_const_*/; getMaxRows()268 long/*_Uint64_*/ getMaxRows() /*_const_*/; getMinRows()269 long/*_Uint64_*/ getMinRows() /*_const_*/; getSingleUserMode()270 int/*_SingleUserMode_*/ getSingleUserMode() /*_const_*/; getRowGCIIndicator()271 boolean getRowGCIIndicator() /*_const_*/; getRowChecksumIndicator()272 boolean getRowChecksumIndicator() /*_const_*/; getPartitionId(int hashvalue)273 int/*_Uint32_*/ getPartitionId(int/*_Uint32_*/ hashvalue) /*_const_*/; 274 } 275 static public class Table extends Object implements TableConst 276 { getName()277 public final native String/*_const char *_*/ getName() /*_const_*/; getTableId()278 public final native int getTableId() /*_const_*/; getColumn(String name)279 public final native ColumnConst/*_const Column *_*/ getColumn(String/*_const char *_*/ name) /*_const_*/; // MMM nameclash with non-const version getColumn(int attributeId)280 public final native ColumnConst/*_const Column *_*/ getColumn(int attributeId) /*_const_*/; // MMM nameclash with non-const version getLogging()281 public final native boolean getLogging() /*_const_*/; getFragmentType()282 public final native int/*_FragmentType_*/ getFragmentType() /*_const_*/; getKValue()283 public final native int getKValue() /*_const_*/; getMinLoadFactor()284 public final native int getMinLoadFactor() /*_const_*/; getMaxLoadFactor()285 public final native int getMaxLoadFactor() /*_const_*/; getNoOfColumns()286 public final native int getNoOfColumns() /*_const_*/; getNoOfPrimaryKeys()287 public final native int getNoOfPrimaryKeys() /*_const_*/; getPrimaryKey(int no)288 public final native String/*_const char *_*/ getPrimaryKey(int no) /*_const_*/; equal(TableConst p0)289 public final native boolean equal(TableConst/*_const Table &_*/ p0) /*_const_*/; getFrmData()290 public final native ByteBuffer/*_const void *_*/ getFrmData() /*_const_*/; getFrmLength()291 public final native int/*_Uint32_*/ getFrmLength() /*_const_*/; getFragmentData()292 public final native ByteBuffer/*_const void *_*/ getFragmentData() /*_const_*/; getFragmentDataLen()293 public final native int/*_Uint32_*/ getFragmentDataLen() /*_const_*/; getRangeListData()294 public final native ByteBuffer/*_const void *_*/ getRangeListData() /*_const_*/; getRangeListDataLen()295 public final native int/*_Uint32_*/ getRangeListDataLen() /*_const_*/; getDefaultRecord()296 public final native NdbRecordConst/*_const NdbRecord *_*/ getDefaultRecord() /*_const_*/; getLinearFlag()297 public final native boolean getLinearFlag() /*_const_*/; getFragmentCount()298 public final native int/*_Uint32_*/ getFragmentCount() /*_const_*/; getTablespaceName()299 public final native String/*_const char *_*/ getTablespaceName() /*_const_*/; getTablespace(int[] id , int[] version )300 public final native boolean getTablespace(int[]/*_Uint32 *_*/ id /*_= 0_*/, int[]/*_Uint32 *_*/ version /*_= 0_*/) /*_const_*/; 301 // MMM declared but not implemented in NDBAPI: public final native int/*_Object.Type_*/ getObjectType() /*_const_*/; getObjectStatus()302 public /*_virtual_*/ native int/*_Object.Status_*/ getObjectStatus() /*_const_*/; setStatusInvalid()303 public final native void setStatusInvalid() /*_const_*/; getObjectVersion()304 public /*_virtual_*/ native int getObjectVersion() /*_const_*/; getDefaultNoPartitionsFlag()305 public final native int/*_Uint32_*/ getDefaultNoPartitionsFlag() /*_const_*/; getObjectId()306 public /*_virtual_*/ native int getObjectId() /*_const_*/; getMaxRows()307 public final native long/*_Uint64_*/ getMaxRows() /*_const_*/; getMinRows()308 public final native long/*_Uint64_*/ getMinRows() /*_const_*/; getSingleUserMode()309 public final native int/*_SingleUserMode_*/ getSingleUserMode() /*_const_*/; getRowGCIIndicator()310 public final native boolean getRowGCIIndicator() /*_const_*/; getRowChecksumIndicator()311 public final native boolean getRowChecksumIndicator() /*_const_*/; getPartitionId(int hashvalue)312 public final native int/*_Uint32_*/ getPartitionId(int/*_Uint32_*/ hashvalue) /*_const_*/; create(String name )313 static public native Table create(String/*_const char *_*/ name /*_= ""_*/); // MMM non-final, support for derivation create(TableConst table)314 static public native Table create(TableConst/*_const Table &_*/ table); // MMM non-final, support for derivation delete(Table p0)315 static public /*_virtual_*/ native void delete(Table p0); // MMM non-final, support for derivation 316 // public final native Table & operator= (const Table & table); // MMM no need to map assignment operator to Java getColumnM(int attributeId)317 public final native Column/*_Column *_*/ getColumnM(int attributeId); // MMM renamed due to nameclash with const version getColumnM(String name)318 public final native Column/*_Column *_*/ getColumnM(String/*_const char *_*/ name); // MMM renamed due to nameclash with const version setName(String name)319 public final native int setName(String/*_const char *_*/ name); addColumn(ColumnConst p0)320 public final native int addColumn(ColumnConst/*_const Column &_*/ p0); setLogging(boolean p0)321 public final native void setLogging(boolean p0); setLinearFlag(int flag)322 public final native void setLinearFlag(int/*_Uint32_*/ flag); setFragmentCount(int p0)323 public final native void setFragmentCount(int/*_Uint32_*/ p0); setFragmentType(int p0)324 public final native void setFragmentType(int/*_FragmentType_*/ p0); setKValue(int kValue)325 public final native void setKValue(int kValue); setMinLoadFactor(int p0)326 public final native void setMinLoadFactor(int p0); setMaxLoadFactor(int p0)327 public final native void setMaxLoadFactor(int p0); setTablespaceName(String name)328 public final native int setTablespaceName(String/*_const char *_*/ name); setTablespace(TablespaceConst p0)329 public final native int setTablespace(TablespaceConst/*_const Tablespace &_*/ p0); setDefaultNoPartitionsFlag(int indicator)330 public final native void setDefaultNoPartitionsFlag(int/*_Uint32_*/ indicator); setFrm(ByteBuffer data, int len)331 public final native int setFrm(ByteBuffer/*_const void *_*/ data, int/*_Uint32_*/ len); setFragmentData(ByteBuffer data, int len)332 public final native int setFragmentData(ByteBuffer/*_const void *_*/ data, int/*_Uint32_*/ len); setRangeListData(ByteBuffer data, int len)333 public final native int setRangeListData(ByteBuffer/*_const void *_*/ data, int/*_Uint32_*/ len); 334 // MMM declared but not implemented in NDBAPI: public final native void setObjectType(int/*_Object.Type_*/ type); setMaxRows(long maxRows)335 public final native void setMaxRows(long/*_Uint64_*/ maxRows); setMinRows(long minRows)336 public final native void setMinRows(long/*_Uint64_*/ minRows); setSingleUserMode(int p0)337 public final native void setSingleUserMode(int/*_SingleUserMode_*/ p0); setRowGCIIndicator(boolean value)338 public final native void setRowGCIIndicator(boolean value); setRowChecksumIndicator(boolean value)339 public final native void setRowChecksumIndicator(boolean value); aggregate(NdbError error)340 public final native int aggregate(NdbError/*_NdbError &_*/ error); validate(NdbError error)341 public final native int validate(NdbError/*_NdbError &_*/ error); 342 } 343 public interface IndexConst extends ObjectConst 344 { 345 public interface /*_enum_*/ Type 346 { 347 int Undefined = 0, 348 UniqueHashIndex = 3, 349 OrderedIndex = 6; 350 } getName()351 String/*_const char *_*/ getName() /*_const_*/; getTable()352 String/*_const char *_*/ getTable() /*_const_*/; getNoOfColumns()353 int/*_unsigned_*/ getNoOfColumns() /*_const_*/; getColumn(int no)354 ColumnConst/*_const Column *_*/ getColumn(int/*_unsigned_*/ no) /*_const_*/; getType()355 int/*_Type_*/ getType() /*_const_*/; // MMM type nameclash, meant Index.Type getLogging()356 boolean getLogging() /*_const_*/; getObjectStatus()357 /*_virtual_*/ int/*_Object.Status_*/ getObjectStatus() /*_const_*/; getObjectVersion()358 /*_virtual_*/ int getObjectVersion() /*_const_*/; getObjectId()359 /*_virtual_*/ int getObjectId() /*_const_*/; getDefaultRecord()360 NdbRecordConst/*_const NdbRecord *_*/ getDefaultRecord() /*_const_*/; 361 } 362 static public class Index extends Object implements IndexConst 363 { getName()364 public final native String/*_const char *_*/ getName() /*_const_*/; getTable()365 public final native String/*_const char *_*/ getTable() /*_const_*/; getNoOfColumns()366 public final native int/*_unsigned_*/ getNoOfColumns() /*_const_*/; getColumn(int no)367 public final native ColumnConst/*_const Column *_*/ getColumn(int/*_unsigned_*/ no) /*_const_*/; getType()368 public final native int/*_Type_*/ getType() /*_const_*/; // MMM type nameclash, meant Index.Type getLogging()369 public final native boolean getLogging() /*_const_*/; getObjectStatus()370 public /*_virtual_*/ native int/*_Object.Status_*/ getObjectStatus() /*_const_*/; getObjectVersion()371 public /*_virtual_*/ native int getObjectVersion() /*_const_*/; getObjectId()372 public /*_virtual_*/ native int getObjectId() /*_const_*/; getDefaultRecord()373 public final native NdbRecordConst/*_const NdbRecord *_*/ getDefaultRecord() /*_const_*/; create(String name )374 static public native Index create(String/*_const char *_*/ name /*_= ""_*/); // MMM non-final, support for derivation delete(Index p0)375 static public /*_virtual_*/ native void delete(Index p0); // MMM non-final, support for derivation setName(String name)376 public final native int setName(String/*_const char *_*/ name); setTable(String name)377 public final native int setTable(String/*_const char *_*/ name); addColumn(ColumnConst c)378 public final native int addColumn(ColumnConst/*_const Column &_*/ c); addColumnName(String name)379 public final native int addColumnName(String/*_const char *_*/ name); 380 // MMM! support <in:String[]>: public final native int addColumnNames(int/*_unsigned_*/ noOfNames, String[]/*_const char * *_*/ names); setType(int type)381 public final native void setType(int/*_Type_*/ type); // MMM type nameclash, meant Index.Type setLogging(boolean enable)382 public final native void setLogging(boolean enable); 383 } 384 static public class OptimizeTableHandle extends Wrapper 385 { create()386 static public final native OptimizeTableHandle create(); delete(OptimizeTableHandle p0)387 static public final native void delete(OptimizeTableHandle p0); next()388 public final native int next(); close()389 public final native int close(); 390 } 391 static public class OptimizeIndexHandle extends Wrapper 392 { create()393 static public final native OptimizeIndexHandle create(); delete(OptimizeIndexHandle p0)394 static public final native void delete(OptimizeIndexHandle p0); next()395 public final native int next(); close()396 public final native int close(); 397 } 398 public interface EventConst extends ObjectConst 399 { 400 public interface /*_enum_*/ TableEvent 401 { 402 int TE_INSERT = 1<<0, 403 TE_DELETE = 1<<1, 404 TE_UPDATE = 1<<2, 405 TE_DROP = 1<<4, 406 TE_ALTER = 1<<5, 407 TE_CREATE = 1<<6, 408 TE_GCP_COMPLETE = 1<<7, 409 TE_CLUSTER_FAILURE = 1<<8, 410 TE_STOP = 1<<9, 411 TE_NODE_FAILURE = 1<<10, 412 TE_SUBSCRIBE = 1<<11, 413 TE_UNSUBSCRIBE = 1<<12, 414 TE_ALL = 0xFFFF; 415 } 416 public interface /*_enum_*/ EventDurability 417 { 418 int ED_UNDEFINED = 0, 419 ED_PERMANENT = 3; 420 } 421 public interface /*_enum_*/ EventReport 422 { 423 int ER_UPDATED = 0, 424 ER_ALL = 1, 425 ER_SUBSCRIBE = 2; 426 } getName()427 String/*_const char *_*/ getName() /*_const_*/; getTable()428 NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ getTable() /*_const_*/; getTableName()429 String/*_const char *_*/ getTableName() /*_const_*/; getTableEvent(int te)430 boolean getTableEvent(int/*_const TableEvent_*/ te) /*_const_*/; getDurability()431 int/*_EventDurability_*/ getDurability() /*_const_*/; getReport()432 int/*_EventReport_*/ getReport() /*_const_*/; getNoOfEventColumns()433 int getNoOfEventColumns() /*_const_*/; getEventColumn(int no)434 ColumnConst/*_const Column *_*/ getEventColumn(int/*_unsigned_*/ no) /*_const_*/; getObjectStatus()435 /*_virtual_*/ int/*_Object.Status_*/ getObjectStatus() /*_const_*/; getObjectVersion()436 /*_virtual_*/ int getObjectVersion() /*_const_*/; getObjectId()437 /*_virtual_*/ int getObjectId() /*_const_*/; 438 } 439 static public class Event extends Object implements EventConst 440 { getName()441 public final native String/*_const char *_*/ getName() /*_const_*/; getTable()442 public final native NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ getTable() /*_const_*/; getTableName()443 public final native String/*_const char *_*/ getTableName() /*_const_*/; getTableEvent(int te)444 public final native boolean getTableEvent(int/*_const TableEvent_*/ te) /*_const_*/; getDurability()445 public final native int/*_EventDurability_*/ getDurability() /*_const_*/; getReport()446 public final native int/*_EventReport_*/ getReport() /*_const_*/; getNoOfEventColumns()447 public final native int getNoOfEventColumns() /*_const_*/; getEventColumn(int no)448 public final native ColumnConst/*_const Column *_*/ getEventColumn(int/*_unsigned_*/ no) /*_const_*/; getObjectStatus()449 public /*_virtual_*/ native int/*_Object.Status_*/ getObjectStatus() /*_const_*/; getObjectVersion()450 public /*_virtual_*/ native int getObjectVersion() /*_const_*/; getObjectId()451 public /*_virtual_*/ native int getObjectId() /*_const_*/; create(String name)452 static public native Event create(String/*_const char *_*/ name); // MMM non-final, support for derivation create(String name, NdbDictionary.TableConst table)453 static public native Event create(String/*_const char *_*/ name, NdbDictionary.TableConst/*_const NdbDictionary.Table &_*/ table); // MMM non-final, support for derivation delete(Event p0)454 static public /*_virtual_*/ native void delete(Event p0); // MMM non-final, support for derivation setName(String name)455 public final native int setName(String/*_const char *_*/ name); setTable(NdbDictionary.TableConst table)456 public final native void setTable(NdbDictionary.TableConst/*_const NdbDictionary.Table &_*/ table); setTable(String tableName)457 public final native int setTable(String/*_const char *_*/ tableName); addTableEvent(int te)458 public final native void addTableEvent(int/*_const TableEvent_*/ te); setDurability(int p0)459 public final native void setDurability(int/*_EventDurability_*/ p0); setReport(int p0)460 public final native void setReport(int/*_EventReport_*/ p0); addEventColumn(int attrId)461 public final native void addEventColumn(int/*_unsigned_*/ attrId); addEventColumn(String columnName)462 public final native void addEventColumn(String/*_const char *_*/ columnName); 463 // MMM! support <in:String[]>: public final native void addEventColumns(int n, String[]/*_const char * *_*/ columnNames); mergeEvents(boolean flag)464 public final native void mergeEvents(boolean flag); 465 } 466 public interface /*_enum_*/ NdbRecordFlags 467 { 468 int RecMysqldShrinkVarchar = 0x1, 469 RecMysqldBitfield = 0x2; 470 } 471 static public interface RecordSpecificationConstArray extends ArrayWrapper< RecordSpecificationConst > 472 { 473 } 474 static public class RecordSpecificationArray extends Wrapper implements RecordSpecificationConstArray 475 { create(int length)476 static public native RecordSpecificationArray create(int length); delete(RecordSpecificationArray e)477 static public native void delete(RecordSpecificationArray e); at(int i)478 public native RecordSpecification at(int i); 479 } 480 public interface /*_struct_*/ RecordSpecificationConst 481 { column()482 ColumnConst/*_const Column *_*/ column(); offset()483 int/*_Uint32_*/ offset(); nullbit_byte_offset()484 int/*_Uint32_*/ nullbit_byte_offset(); nullbit_bit_in_byte()485 int/*_Uint32_*/ nullbit_bit_in_byte(); 486 } 487 static public class /*_struct_*/ RecordSpecification extends Wrapper implements RecordSpecificationConst 488 { size()489 static public final native int/*_Uint32_*/ size(); column()490 public final native ColumnConst/*_const Column *_*/ column(); offset()491 public final native int/*_Uint32_*/ offset(); nullbit_byte_offset()492 public final native int/*_Uint32_*/ nullbit_byte_offset(); nullbit_bit_in_byte()493 public final native int/*_Uint32_*/ nullbit_bit_in_byte(); column(ColumnConst p0)494 public final native void column(ColumnConst/*_const Column *_*/ p0); offset(int p0)495 public final native void offset(int/*_Uint32_*/ p0); nullbit_byte_offset(int p0)496 public final native void nullbit_byte_offset(int/*_Uint32_*/ p0); nullbit_bit_in_byte(int p0)497 public final native void nullbit_bit_in_byte(int/*_Uint32_*/ p0); create()498 static public final native RecordSpecification create(); delete(RecordSpecification p0)499 static public final native void delete(RecordSpecification p0); 500 } 501 public interface /*_enum_*/ RecordType 502 { 503 int TableAccess = 0 /*__*/, 504 IndexAccess = 1 /*__*/; 505 } getRecordType(NdbRecordConst record)506 static public final native int/*_RecordType_*/ getRecordType(NdbRecordConst/*_const NdbRecord *_*/ record); getRecordTableName(NdbRecordConst record)507 static public final native String/*_const char *_*/ getRecordTableName(NdbRecordConst/*_const NdbRecord *_*/ record); getRecordIndexName(NdbRecordConst record)508 static public final native String/*_const char *_*/ getRecordIndexName(NdbRecordConst/*_const NdbRecord *_*/ record); getFirstAttrId(NdbRecordConst record, int[] firstAttrId)509 static public final native boolean getFirstAttrId(NdbRecordConst/*_const NdbRecord *_*/ record, int[]/*_Uint32 &_*/ firstAttrId); getNextAttrId(NdbRecordConst record, int[] attrId)510 static public final native boolean getNextAttrId(NdbRecordConst/*_const NdbRecord *_*/ record, int[]/*_Uint32 &_*/ attrId); getOffset(NdbRecordConst record, int attrId, int[] offset)511 static public final native boolean getOffset(NdbRecordConst/*_const NdbRecord *_*/ record, int/*_Uint32_*/ attrId, int[]/*_Uint32 &_*/ offset); getNullBitOffset(NdbRecordConst record, int attrId, int[] nullbit_byte_offset, int[] nullbit_bit_in_byte)512 static public final native boolean getNullBitOffset(NdbRecordConst/*_const NdbRecord *_*/ record, int/*_Uint32_*/ attrId, int[]/*_Uint32 &_*/ nullbit_byte_offset, int[]/*_Uint32 &_*/ nullbit_bit_in_byte); getValuePtr(NdbRecordConst record, String row, int attrId)513 static public final native String/*_const char *_*/ getValuePtr(NdbRecordConst/*_const NdbRecord *_*/ record, String/*_const char *_*/ row, int/*_Uint32_*/ attrId); 514 // MMM! support <out:BB> or check if needed: static public final native char * getValuePtr(NdbRecordConst/*_const NdbRecord *_*/ record, char * row, int/*_Uint32_*/ attrId); isNull(NdbRecordConst record, String row, int attrId)515 static public final native boolean isNull(NdbRecordConst/*_const NdbRecord *_*/ record, String/*_const char *_*/ row, int/*_Uint32_*/ attrId); setNull(NdbRecordConst record, ByteBuffer row, int attrId, boolean value)516 static public final native int setNull(NdbRecordConst/*_const NdbRecord *_*/ record, ByteBuffer/*_char *_*/ row, int/*_Uint32_*/ attrId, boolean value); getRecordRowLength(NdbRecordConst record)517 static public final native int/*_Uint32_*/ getRecordRowLength(NdbRecordConst/*_const NdbRecord *_*/ record); 518 // MMM convenience function, marked with NDBAPI_SKIP: static public final native const unsigned char * getEmptyBitmask(); 519 public interface /*_struct_*/ AutoGrowSpecificationConst 520 { min_free()521 int/*_Uint32_*/ min_free(); max_size()522 long/*_Uint64_*/ max_size(); file_size()523 long/*_Uint64_*/ file_size(); filename_pattern()524 String/*_const char *_*/ filename_pattern(); 525 } 526 static public class /*_struct_*/ AutoGrowSpecification extends Wrapper implements AutoGrowSpecificationConst 527 { min_free()528 public final native int/*_Uint32_*/ min_free(); max_size()529 public final native long/*_Uint64_*/ max_size(); file_size()530 public final native long/*_Uint64_*/ file_size(); filename_pattern()531 public final native String/*_const char *_*/ filename_pattern(); min_free(int p0)532 public final native void min_free(int/*_Uint32_*/ p0); max_size(long p0)533 public final native void max_size(long/*_Uint64_*/ p0); file_size(long p0)534