/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.31
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */


#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC)
#   if (__SUNPRO_CC <= 0x560)
#     define SWIGTEMPLATEDISAMBIGUATOR template
#   else
#     define SWIGTEMPLATEDISAMBIGUATOR 
#   endif
# else
#   define SWIGTEMPLATEDISAMBIGUATOR 
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif


/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTELC__)
  typedef long long __int64;
#endif

/* Fix for jlong on 64-bit x86 Solaris */
#if defined(__x86_64)
# ifdef _LP64
#   undef _LP64
# endif
#endif

#include <jni.h>
#include <stdlib.h>
#include <string.h>


/* Support for throwing Java exceptions */
typedef enum {
  SWIG_JavaOutOfMemoryError = 1, 
  SWIG_JavaIOException, 
  SWIG_JavaRuntimeException, 
  SWIG_JavaIndexOutOfBoundsException,
  SWIG_JavaArithmeticException,
  SWIG_JavaIllegalArgumentException,
  SWIG_JavaNullPointerException,
  SWIG_JavaDirectorPureVirtual,
  SWIG_JavaUnknownError
} SWIG_JavaExceptionCodes;

typedef struct {
  SWIG_JavaExceptionCodes code;
  const char *java_exception;
} SWIG_JavaExceptions_t;


static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
  jclass excep;
  static const SWIG_JavaExceptions_t java_exceptions[] = {
    { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
    { SWIG_JavaIOException, "java/io/IOException" },
    { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
    { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
    { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
    { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
    { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
    { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
    { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
    { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" } };
  const SWIG_JavaExceptions_t *except_ptr = java_exceptions;

  while (except_ptr->code != code && except_ptr->code)
    except_ptr++;

  jenv->ExceptionClear();
  excep = jenv->FindClass(except_ptr->java_exception);
  if (excep)
    jenv->ThrowNew(excep, msg);
}


/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1 
#define  SWIG_IOError        	   -2 
#define  SWIG_RuntimeError   	   -3 
#define  SWIG_IndexError     	   -4 
#define  SWIG_TypeError      	   -5 
#define  SWIG_DivisionByZero 	   -6 
#define  SWIG_OverflowError  	   -7 
#define  SWIG_SyntaxError    	   -8 
#define  SWIG_ValueError     	   -9 
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12 
#define  SWIG_NullReferenceError   -13




#include <stdexcept>


#include <string>


#include <vector>
#include <stdexcept>


#include <map>
#include <algorithm>
#include <stdexcept>


SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
  SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError;
  switch(code) {
  case SWIG_MemoryError:
    exception_code = SWIG_JavaOutOfMemoryError;
    break;
  case SWIG_IOError:
    exception_code = SWIG_JavaIOException;
    break;
  case SWIG_SystemError:
  case SWIG_RuntimeError:
    exception_code = SWIG_JavaRuntimeException;
    break;
  case SWIG_OverflowError:
  case SWIG_IndexError:
    exception_code = SWIG_JavaIndexOutOfBoundsException;
    break;
  case SWIG_DivisionByZero:
    exception_code = SWIG_JavaArithmeticException;
    break;
  case SWIG_SyntaxError:
  case SWIG_ValueError:
  case SWIG_TypeError:
    exception_code = SWIG_JavaIllegalArgumentException;
    break;
  case SWIG_UnknownError:
  default:
    exception_code = SWIG_JavaUnknownError;
    break;
  }
  SWIG_JavaThrowException(jenv, exception_code, msg);
}


#include <stdexcept>


#include <utility>


#include <inttypes.h>


#include <stdint.h>		// Use the C99 official header


/* Includes the header in the wrapper code */
#define SWIG_FILE_WITH_INIT
#include "../SDBPClientWrapper.h"


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_imaxdiv_1t_1quot_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  long long arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(imaxdiv_t **)&jarg1; 
  arg2 = (long long)jarg2; 
  if (arg1) (arg1)->quot = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_imaxdiv_1t_1quot_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  long long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(imaxdiv_t **)&jarg1; 
  result = (long long) ((arg1)->quot);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_imaxdiv_1t_1rem_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  long long arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(imaxdiv_t **)&jarg1; 
  arg2 = (long long)jarg2; 
  if (arg1) (arg1)->rem = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_imaxdiv_1t_1rem_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  long long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(imaxdiv_t **)&jarg1; 
  result = (long long) ((arg1)->rem);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_new_1imaxdiv_1t(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  imaxdiv_t *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (imaxdiv_t *)new imaxdiv_t();
  *(imaxdiv_t **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_delete_1imaxdiv_1t(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  imaxdiv_t *arg1 = (imaxdiv_t *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(imaxdiv_t **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_imaxabs(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  intmax_t arg1 ;
  intmax_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (intmax_t)jarg1; 
  result = (intmax_t)imaxabs(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_imaxdiv(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jlong jresult = 0 ;
  intmax_t arg1 ;
  intmax_t arg2 ;
  imaxdiv_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (intmax_t)jarg1; 
  arg2 = (intmax_t)jarg2; 
  result = imaxdiv(arg1,arg2);
  *(imaxdiv_t **)&jresult = new imaxdiv_t((imaxdiv_t &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_strtoimax(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2, jint jarg3) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char **arg2 = (char **) 0 ;
  int arg3 ;
  intmax_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = *(char ***)&jarg2; 
  arg3 = (int)jarg3; 
  result = (intmax_t)strtoimax((char const *)arg1,arg2,arg3);
  jresult = (jlong)result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT jobject JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_strtoumax(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2, jint jarg3) {
  jobject jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char **arg2 = (char **) 0 ;
  int arg3 ;
  uintmax_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = *(char ***)&jarg2; 
  arg3 = (int)jarg3; 
  result = (uintmax_t)strtoumax((char const *)arg1,arg2,arg3);
  {
    jbyteArray ba = jenv->NewByteArray(9);
    jbyte* bae = jenv->GetByteArrayElements(ba, 0);
    jclass clazz = jenv->FindClass("java/math/BigInteger");
    jmethodID mid = jenv->GetMethodID(clazz, "<init>", "([B)V");
    jobject bigint;
    int i;
    
    bae[0] = 0;
    for(i=1; i<9; i++ ) {
      bae[i] = (jbyte)(result>>8*(8-i));
    }
    
    jenv->ReleaseByteArrayElements(ba, bae, 0);
    bigint = jenv->NewObject(clazz, mid, ba);
    jresult = bigint;
  }
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_new_1SDBP_1NodeParams(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jlong jresult = 0 ;
  int arg1 ;
  SDBP_NodeParams *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  result = (SDBP_NodeParams *)new SDBP_NodeParams(arg1);
  *(SDBP_NodeParams **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_delete_1SDBP_1NodeParams(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1Close(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  (arg1)->Close();
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1AddNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  std::string *arg2 = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  if(!jarg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return ;
  }
  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
  if (!arg2_pstr) return ;
  std::string arg2_str(arg2_pstr);
  arg2 = &arg2_str;
  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
  (arg1)->AddNode((std::string const &)*arg2);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1nodec_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  int arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  arg2 = (int)jarg2; 
  if (arg1) (arg1)->nodec = arg2;
  
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1nodec_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  result = (int) ((arg1)->nodec);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1nodes_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  char **arg2 = (char **) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  arg2 = *(char ***)&jarg2; 
  if (arg1) (arg1)->nodes = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1nodes_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  char **result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  result = (char **) ((arg1)->nodes);
  *(char ***)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1num_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  int arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  arg2 = (int)jarg2; 
  if (arg1) (arg1)->num = arg2;
  
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1NodeParams_1num_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  SDBP_NodeParams *arg1 = (SDBP_NodeParams *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_NodeParams **)&jarg1; 
  result = (int) ((arg1)->num);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_new_1SDBP_1Buffer(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  SDBP_Buffer *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (SDBP_Buffer *)new SDBP_Buffer();
  *(SDBP_Buffer **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Buffer_1SetBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jint jarg3) {
  SDBP_Buffer *arg1 = (SDBP_Buffer *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_Buffer **)&jarg1; 
  {
    arg2 = (char*) jenv->GetByteArrayElements(jarg2, 0);
  }
  arg3 = (int)jarg3; 
  (arg1)->SetBuffer(arg2,arg3);
  {
    jenv->ReleaseByteArrayElements(jarg2, (jbyte*) arg2, 0);
  }
  
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Buffer_1data_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  SDBP_Buffer *arg1 = (SDBP_Buffer *) 0 ;
  intptr_t arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_Buffer **)&jarg1; 
  arg2 = (intptr_t)jarg2; 
  if (arg1) (arg1)->data = arg2;
  
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Buffer_1data_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  SDBP_Buffer *arg1 = (SDBP_Buffer *) 0 ;
  intptr_t result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_Buffer **)&jarg1; 
  result = (intptr_t) ((arg1)->data);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Buffer_1len_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  SDBP_Buffer *arg1 = (SDBP_Buffer *) 0 ;
  int arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_Buffer **)&jarg1; 
  arg2 = (int)jarg2; 
  if (arg1) (arg1)->len = arg2;
  
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Buffer_1len_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  SDBP_Buffer *arg1 = (SDBP_Buffer *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(SDBP_Buffer **)&jarg1; 
  result = (int) ((arg1)->len);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_delete_1SDBP_1Buffer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  SDBP_Buffer *arg1 = (SDBP_Buffer *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(SDBP_Buffer **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultClose(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  ResultObj arg1 = (ResultObj) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  SDBP_ResultClose(arg1);
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultKey(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jstring jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = SDBP_ResultKey(arg1);
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultValue(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jstring jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = SDBP_ResultValue(arg1);
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT jbyteArray JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultKeyBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jbyteArray jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  SDBP_Buffer result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = SDBP_ResultKeyBuffer(arg1);
  {
    jresult = jenv->NewByteArray((&result)->len);
    jenv->SetByteArrayRegion(jresult, 0, (&result)->len, (jbyte*) (&result)->data);
  }
  return jresult;
}


SWIGEXPORT jbyteArray JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultValueBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jbyteArray jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  SDBP_Buffer result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = SDBP_ResultValueBuffer(arg1);
  {
    jresult = jenv->NewByteArray((&result)->len);
    jenv->SetByteArrayRegion(jresult, 0, (&result)->len, (jbyte*) (&result)->data);
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultSignedNumber(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  int64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (int64_t)SDBP_ResultSignedNumber(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultNumber(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (uint64_t)SDBP_ResultNumber(arg1);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultIsConditionalSuccess(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jboolean jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (bool)SDBP_ResultIsConditionalSuccess(arg1);
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultDatabaseID(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (uint64_t)SDBP_ResultDatabaseID(arg1);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultTableID(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (uint64_t)SDBP_ResultTableID(arg1);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultBegin(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  ResultObj arg1 = (ResultObj) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  SDBP_ResultBegin(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultNext(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  ResultObj arg1 = (ResultObj) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  SDBP_ResultNext(arg1);
}


SWIGEXPORT jboolean JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultIsEnd(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jboolean jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (bool)SDBP_ResultIsEnd(arg1);
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultIsFinished(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jboolean jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (bool)SDBP_ResultIsFinished(arg1);
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultTransportStatus(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (int)SDBP_ResultTransportStatus(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultCommandStatus(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (int)SDBP_ResultCommandStatus(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultNumNodes(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (unsigned int)SDBP_ResultNumNodes(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultNodeID(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  unsigned int arg2 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  result = (uint64_t)SDBP_ResultNodeID(arg1,arg2);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ResultElapsedTime(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ResultObj arg1 = (ResultObj) 0 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ResultObj *)&jarg1; 
  result = (unsigned int)SDBP_ResultElapsedTime(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Create(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  ClientObj result;
  
  (void)jenv;
  (void)jcls;
  result = (ClientObj)SDBP_Create();
  *(ClientObj *)&jresult = result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Init(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jobject jarg2_) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  SDBP_NodeParams *arg2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg2_;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = *(SDBP_NodeParams **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "SDBP_NodeParams const & reference is null");
    return 0;
  } 
  result = (int)SDBP_Init(arg1,(SDBP_NodeParams const &)*arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Destroy(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  ClientObj arg1 = (ClientObj) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  SDBP_Destroy(arg1);
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetResult(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  ResultObj result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (ResultObj)SDBP_GetResult(arg1);
  *(ResultObj *)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetGlobalTimeout(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  SDBP_SetGlobalTimeout(arg1,arg2);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetMasterTimeout(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  SDBP_SetMasterTimeout(arg1,arg2);
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetGlobalTimeout(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (uint64_t)SDBP_GetGlobalTimeout(arg1);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetMasterTimeout(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (uint64_t)SDBP_GetMasterTimeout(arg1);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetJSONConfigState(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jstring jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = SDBP_GetJSONConfigState(arg1);
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1WaitConfigState(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  ClientObj arg1 = (ClientObj) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  SDBP_WaitConfigState(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetConsistencyMode(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
  ClientObj arg1 = (ClientObj) 0 ;
  int arg2 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (int)jarg2; 
  SDBP_SetConsistencyMode(arg1,arg2);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetBatchMode(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
  ClientObj arg1 = (ClientObj) 0 ;
  int arg2 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (int)jarg2; 
  SDBP_SetBatchMode(arg1,arg2);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetBatchLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int arg2 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  SDBP_SetBatchLimit(arg1,arg2);
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1CreateDatabase(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  std::string *arg2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  if(!jarg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
  if (!arg2_pstr) return 0;
  std::string arg2_str(arg2_pstr);
  arg2 = &arg2_str;
  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
  result = (int)SDBP_CreateDatabase(arg1,(std::string const &)*arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1RenameDatabase(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (int)SDBP_RenameDatabase(arg1,arg2,(std::string const &)*arg3);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1DeleteDatabase(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  result = (int)SDBP_DeleteDatabase(arg1,arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1CreateTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3, jstring jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  uint64_t arg3 ;
  std::string *arg4 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (uint64_t) jarg3;
  }
  if(!jarg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
  if (!arg4_pstr) return 0;
  std::string arg4_str(arg4_pstr);
  arg4 = &arg4_str;
  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
  result = (int)SDBP_CreateTable(arg1,arg2,arg3,(std::string const &)*arg4);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1RenameTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (int)SDBP_RenameTable(arg1,arg2,(std::string const &)*arg3);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1DeleteTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  result = (int)SDBP_DeleteTable(arg1,arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1TruncateTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  result = (int)SDBP_TruncateTable(arg1,arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetNumQuorums(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (unsigned int)SDBP_GetNumQuorums(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetQuorumIDAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int arg2 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  result = (uint64_t)SDBP_GetQuorumIDAt(arg1,arg2);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetQuorumNameAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jstring jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int arg2 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  result = SDBP_GetQuorumNameAt(arg1,arg2);
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetQuorumIDByName(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  std::string *arg2 = 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  if(!jarg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
  if (!arg2_pstr) return 0;
  std::string arg2_str(arg2_pstr);
  arg2 = &arg2_str;
  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
  result = (uint64_t)SDBP_GetQuorumIDByName(arg1,(std::string const &)*arg2);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetNumDatabases(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (unsigned int)SDBP_GetNumDatabases(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetDatabaseIDAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int arg2 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  result = (uint64_t)SDBP_GetDatabaseIDAt(arg1,arg2);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetDatabaseNameAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jstring jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  unsigned int arg2 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  result = SDBP_GetDatabaseNameAt(arg1,arg2);
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetDatabaseIDByName(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  std::string *arg2 = 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  if(!jarg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0); 
  if (!arg2_pstr) return 0;
  std::string arg2_str(arg2_pstr);
  arg2 = &arg2_str;
  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); 
  result = (uint64_t)SDBP_GetDatabaseIDByName(arg1,(std::string const &)*arg2);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetNumTables(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  result = (unsigned int)SDBP_GetNumTables(arg1,arg2);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetTableIDAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  unsigned int arg3 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  arg3 = (unsigned int)jarg3; 
  result = (uint64_t)SDBP_GetTableIDAt(arg1,arg2,arg3);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetTableNameAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) {
  jstring jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  unsigned int arg3 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  arg3 = (unsigned int)jarg3; 
  result = SDBP_GetTableNameAt(arg1,arg2,arg3);
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetTableIDByName(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jlong jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  uint64_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (uint64_t)SDBP_GetTableIDByName(arg1,arg2,(std::string const &)*arg3);
  {
    jresult = result;
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Get(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (int)SDBP_Get(arg1,arg2,(std::string const &)*arg3);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  result = (int)SDBP_GetCStr(arg1,arg2,arg3,arg4);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Set(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3, jstring jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  if(!jarg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
  if (!arg4_pstr) return 0;
  std::string arg4_str(arg4_pstr);
  arg4 = &arg4_str;
  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
  result = (int)SDBP_Set(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4, jbyteArray jarg5, jint jarg6) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  int arg6 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  {
    arg5 = (char*) jenv->GetByteArrayElements(jarg5, 0);
  }
  arg6 = (int)jarg6; 
  result = (int)SDBP_SetCStr(arg1,arg2,arg3,arg4,arg5,arg6);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg5, (jbyte*) arg5, 0);
  }
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Add(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3, jlong jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int64_t arg4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  arg4 = (int64_t)jarg4; 
  result = (int)SDBP_Add(arg1,arg2,(std::string const &)*arg3,arg4);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1AddCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4, jlong jarg5) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  int64_t arg5 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  arg5 = (int64_t)jarg5; 
  result = (int)SDBP_AddCStr(arg1,arg2,arg3,arg4,arg5);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Delete(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (int)SDBP_Delete(arg1,arg2,(std::string const &)*arg3);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1DeleteCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  result = (int)SDBP_DeleteCStr(arg1,arg2,arg3,arg4);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SequenceSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3, jlong jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  uint64_t arg4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  {
    arg4 = (uint64_t) jarg4;
  }
  result = (int)SDBP_SequenceSet(arg1,arg2,(std::string const &)*arg3,arg4);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SequenceSetCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4, jlong jarg5) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  uint64_t arg5 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  {
    arg5 = (uint64_t) jarg5;
  }
  result = (int)SDBP_SequenceSetCStr(arg1,arg2,arg3,arg4,arg5);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SequenceNext(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (int)SDBP_SequenceNext(arg1,arg2,(std::string const &)*arg3);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SequenceNextCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  result = (int)SDBP_SequenceNextCStr(arg1,arg2,arg3,arg4);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ListKeys(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jlong jarg6, jboolean jarg7, jboolean jarg8) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = 0 ;
  std::string *arg5 = 0 ;
  unsigned int arg6 ;
  bool arg7 ;
  bool arg8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  if(!jarg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
  if (!arg4_pstr) return 0;
  std::string arg4_str(arg4_pstr);
  arg4 = &arg4_str;
  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
  if(!jarg5) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
  if (!arg5_pstr) return 0;
  std::string arg5_str(arg5_pstr);
  arg5 = &arg5_str;
  jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
  arg6 = (unsigned int)jarg6; 
  arg7 = jarg7 ? true : false; 
  arg8 = jarg8 ? true : false; 
  result = (int)SDBP_ListKeys(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ListKeysCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4, jbyteArray jarg5, jint jarg6, jbyteArray jarg7, jint jarg8, jlong jarg9, jboolean jarg10, jboolean jarg11) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  int arg6 ;
  char *arg7 = (char *) 0 ;
  int arg8 ;
  unsigned int arg9 ;
  bool arg10 ;
  bool arg11 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  {
    arg5 = (char*) jenv->GetByteArrayElements(jarg5, 0);
  }
  arg6 = (int)jarg6; 
  {
    arg7 = (char*) jenv->GetByteArrayElements(jarg7, 0);
  }
  arg8 = (int)jarg8; 
  arg9 = (unsigned int)jarg9; 
  arg10 = jarg10 ? true : false; 
  arg11 = jarg11 ? true : false; 
  result = (int)SDBP_ListKeysCStr(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg5, (jbyte*) arg5, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg7, (jbyte*) arg7, 0);
  }
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ListKeyValues(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jlong jarg6, jboolean jarg7, jboolean jarg8) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = 0 ;
  std::string *arg5 = 0 ;
  unsigned int arg6 ;
  bool arg7 ;
  bool arg8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  if(!jarg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
  if (!arg4_pstr) return 0;
  std::string arg4_str(arg4_pstr);
  arg4 = &arg4_str;
  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
  if(!jarg5) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
  if (!arg5_pstr) return 0;
  std::string arg5_str(arg5_pstr);
  arg5 = &arg5_str;
  jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
  arg6 = (unsigned int)jarg6; 
  arg7 = jarg7 ? true : false; 
  arg8 = jarg8 ? true : false; 
  result = (int)SDBP_ListKeyValues(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1ListKeyValuesCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4, jbyteArray jarg5, jint jarg6, jbyteArray jarg7, jint jarg8, jlong jarg9, jboolean jarg10, jboolean jarg11) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  int arg6 ;
  char *arg7 = (char *) 0 ;
  int arg8 ;
  unsigned int arg9 ;
  bool arg10 ;
  bool arg11 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  {
    arg5 = (char*) jenv->GetByteArrayElements(jarg5, 0);
  }
  arg6 = (int)jarg6; 
  {
    arg7 = (char*) jenv->GetByteArrayElements(jarg7, 0);
  }
  arg8 = (int)jarg8; 
  arg9 = (unsigned int)jarg9; 
  arg10 = jarg10 ? true : false; 
  arg11 = jarg11 ? true : false; 
  result = (int)SDBP_ListKeyValuesCStr(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg5, (jbyte*) arg5, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg7, (jbyte*) arg7, 0);
  }
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Count(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jboolean jarg6) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = 0 ;
  std::string *arg5 = 0 ;
  bool arg6 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  if(!jarg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0); 
  if (!arg4_pstr) return 0;
  std::string arg4_str(arg4_pstr);
  arg4 = &arg4_str;
  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr); 
  if(!jarg5) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0); 
  if (!arg5_pstr) return 0;
  std::string arg5_str(arg5_pstr);
  arg5 = &arg5_str;
  jenv->ReleaseStringUTFChars(jarg5, arg5_pstr); 
  arg6 = jarg6 ? true : false; 
  result = (int)SDBP_Count(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1CountCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4, jbyteArray jarg5, jint jarg6, jbyteArray jarg7, jint jarg8, jboolean jarg9) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  int arg6 ;
  char *arg7 = (char *) 0 ;
  int arg8 ;
  bool arg9 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  {
    arg5 = (char*) jenv->GetByteArrayElements(jarg5, 0);
  }
  arg6 = (int)jarg6; 
  {
    arg7 = (char*) jenv->GetByteArrayElements(jarg7, 0);
  }
  arg8 = (int)jarg8; 
  arg9 = jarg9 ? true : false; 
  result = (int)SDBP_CountCStr(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg5, (jbyte*) arg5, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg7, (jbyte*) arg7, 0);
  }
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Begin(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (int)SDBP_Begin(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Submit(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (int)SDBP_Submit(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1Cancel(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (int)SDBP_Cancel(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1StartTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  std::string *arg3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  if(!jarg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return 0;
  }
  const char *arg3_pstr = (const char *)jenv->GetStringUTFChars(jarg3, 0); 
  if (!arg3_pstr) return 0;
  std::string arg3_str(arg3_pstr);
  arg3 = &arg3_str;
  jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); 
  result = (int)SDBP_StartTransaction(arg1,arg2,(std::string const &)*arg3);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1StartTransactionCStr(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jbyteArray jarg3, jint jarg4) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  uint64_t arg2 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  {
    arg2 = (uint64_t) jarg2;
  }
  {
    arg3 = (char*) jenv->GetByteArrayElements(jarg3, 0);
  }
  arg4 = (int)jarg4; 
  result = (int)SDBP_StartTransactionCStr(arg1,arg2,arg3,arg4);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg3, (jbyte*) arg3, 0);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1CommitTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (int)SDBP_CommitTransaction(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1RollbackTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  ClientObj arg1 = (ClientObj) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(ClientObj *)&jarg1; 
  result = (int)SDBP_RollbackTransaction(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetTrace(JNIEnv *jenv, jclass jcls, jboolean jarg1) {
  bool arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = jarg1 ? true : false; 
  SDBP_SetTrace(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetDebug(JNIEnv *jenv, jclass jcls, jboolean jarg1) {
  bool arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = jarg1 ? true : false; 
  SDBP_SetDebug(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetLogFile(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  std::string *arg1 = 0 ;
  
  (void)jenv;
  (void)jcls;
  if(!jarg1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return ;
  }
  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
  if (!arg1_pstr) return ;
  std::string arg1_str(arg1_pstr);
  arg1 = &arg1_str;
  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
  SDBP_SetLogFile((std::string const &)*arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetTraceBufferSize(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  unsigned int arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (unsigned int)jarg1; 
  SDBP_SetTraceBufferSize(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1LogTrace(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  std::string *arg1 = 0 ;
  
  (void)jenv;
  (void)jcls;
  if(!jarg1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
    return ;
  }
  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0); 
  if (!arg1_pstr) return ;
  std::string arg1_str(arg1_pstr);
  arg1 = &arg1_str;
  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); 
  SDBP_LogTrace((std::string const &)*arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetCrashReporter(JNIEnv *jenv, jclass jcls, jboolean jarg1) {
  bool arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = jarg1 ? true : false; 
  SDBP_SetCrashReporter(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetShardPoolSize(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  unsigned int arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (unsigned int)jarg1; 
  SDBP_SetShardPoolSize(arg1);
}


SWIGEXPORT void JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1SetMaxConnections(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  unsigned int arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (unsigned int)jarg1; 
  SDBP_SetMaxConnections(arg1);
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetVersion(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  result = SDBP_GetVersion();
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_scalien_scaliendb_scaliendb_1clientJNI_SDBP_1GetDebugString(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  std::string result;
  
  (void)jenv;
  (void)jcls;
  result = SDBP_GetDebugString();
  jresult = jenv->NewStringUTF((&result)->c_str()); 
  return jresult;
}


#ifdef __cplusplus
}
#endif

