MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbBlob.java
1 /*
2  Copyright 2010 Sun Microsystems, Inc.
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 /*
19  * NdbBlob.java
20  */
21 
22 package com.mysql.ndbjtie.ndbapi;
23 
24 import java.nio.ByteBuffer;
25 
26 import com.mysql.jtie.Wrapper;
27 
28 public class NdbBlob extends Wrapper implements NdbBlobConst
29 {
30  public final native NdbErrorConst/*_const NdbError &_*/ getNdbError() /*_const_*/;
31  public final native NdbOperationConst/*_const NdbOperation *_*/ getNdbOperation() /*_const_*/;
32  public interface /*_enum_*/ State
33  {
34  int Idle = 0,
35  Prepared = 1,
36  Active = 2,
37  Closed = 3,
38  Invalid = 9;
39  }
40  public final native int/*_State_*/ getState();
41  // MMM! support variable-width type non-const references or check if needed: public final native void getVersion(int[]/*_int &_*/ version);
42  public final native int getValue(ByteBuffer/*_void *_*/ data, int/*_Uint32_*/ bytes);
43  public final native int setValue(ByteBuffer/*_const void *_*/ data, int/*_Uint32_*/ bytes);
44  // MMM no need to map: public final native typedef int ActiveHook(NdbBlob/*_NdbBlob *_*/ me, ByteBuffer/*_void *_*/ arg);
45  // MMM no need to map: public final native int setActiveHook(ActiveHook/*_ActiveHook *_*/ activeHook, ByteBuffer/*_void *_*/ arg);
46  // MMM! support variable-width type non-const references or check if needed: public final native int getNull(int[]/*_int &_*/ isNull);
47  public final native int setNull();
48  public final native int getLength(long[]/*_Uint64 &_*/ length);
49  public final native int truncate(long/*_Uint64_*/ length /*_= 0_*/);
50  public final native int getPos(long[]/*_Uint64 &_*/ pos);
51  public final native int setPos(long/*_Uint64_*/ pos);
52  public final native int readData(ByteBuffer/*_void *_*/ data, int[]/*_Uint32 &_*/ bytes);
53  public final native int writeData(ByteBuffer/*_const void *_*/ data, int/*_Uint32_*/ bytes);
54  public final native NdbDictionary.ColumnConst/*_const NdbDictionary.Column *_*/ getColumn();
55  static public final native int getBlobTableName(ByteBuffer/*_char *_*/ btname, Ndb/*_Ndb *_*/ anNdb, String/*_const char *_*/ tableName, String/*_const char *_*/ columnName);
56  static public final native int getBlobEventName(ByteBuffer/*_char *_*/ bename, Ndb/*_Ndb *_*/ anNdb, String/*_const char *_*/ eventName, String/*_const char *_*/ columnName);
57  public final native NdbBlob/*_NdbBlob *_*/ blobsFirstBlob();
58  public final native NdbBlob/*_NdbBlob *_*/ blobsNextBlob();
59  public final native int close(boolean execPendingBlobOps /*= true*/);
60 }