//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqsqlrecord.h>
#include <tqstring.h>
#include <tqsqlindex.h>
#include <tqstringlist.h>
#include <tqsqlerror.h>
#include <tqsqldriver.h>
#include <tqsqlquery.h>

#include <qtjava/QtSupport.h>
#include <qtjava/TQSqlDriver.h>

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_beginTransaction(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->beginTransaction();
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_className(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((TQSqlDriver*) QtSupport::getQt(env, obj))->className();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_close(JNIEnv* env, jobject obj)
{
	((TQSqlDriver*) QtSupport::getQt(env, obj))->close();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_commitTransaction(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->commitTransaction();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_createQuery(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlQuery(((TQSqlDriver*) QtSupport::getQt(env, obj))->createQuery()), "org.trinitydesktop.qt.TQSqlQueryInterface", TRUE);
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_formatValue__Lorg_trinitydesktop_qt_QSqlField_2(JNIEnv* env, jobject obj, jobject field)
{
	TQString  _qstring;
	_qstring = ((TQSqlDriver*) QtSupport::getQt(env, obj))->formatValue((const TQSqlField*) QtSupport::getQt(env, field));
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_formatValue__Lorg_trinitydesktop_qt_QSqlField_2Z(JNIEnv* env, jobject obj, jobject field, jboolean trimStrings)
{
	TQString  _qstring;
	_qstring = ((TQSqlDriver*) QtSupport::getQt(env, obj))->formatValue((const TQSqlField*) QtSupport::getQt(env, field), (bool) trimStrings);
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_hasFeature(JNIEnv* env, jobject obj, jint f)
{
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->hasFeature((TQSqlDriver::DriverFeature) f);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_isOpenError(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->isOpenError();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_isOpen(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->isOpen();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_lastError(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlError(((TQSqlDriver*) QtSupport::getQt(env, obj))->lastError()), "org.trinitydesktop.qt.TQSqlError", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_metaObject(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((TQSqlDriver*) QtSupport::getQt(env, obj))->metaObject(), "org.trinitydesktop.qt.TQMetaObject");
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_nullText(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((TQSqlDriver*) QtSupport::getQt(env, obj))->nullText();
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_open__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring db)
{
static TQString* _qstring_db = 0;
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->open((const TQString&)*(TQString*) QtSupport::toTQString(env, db, &_qstring_db));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_open__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring db, jstring user)
{
static TQString* _qstring_db = 0;
static TQString* _qstring_user = 0;
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->open((const TQString&)*(TQString*) QtSupport::toTQString(env, db, &_qstring_db), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_open__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring db, jstring user, jstring password)
{
static TQString* _qstring_db = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_password = 0;
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->open((const TQString&)*(TQString*) QtSupport::toTQString(env, db, &_qstring_db), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, password, &_qstring_password));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_open__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring db, jstring user, jstring password, jstring host)
{
static TQString* _qstring_db = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_password = 0;
static TQString* _qstring_host = 0;
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->open((const TQString&)*(TQString*) QtSupport::toTQString(env, db, &_qstring_db), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, password, &_qstring_password), (const TQString&)*(TQString*) QtSupport::toTQString(env, host, &_qstring_host));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_open__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring db, jstring user, jstring password, jstring host, jint port)
{
static TQString* _qstring_db = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_password = 0;
static TQString* _qstring_host = 0;
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->open((const TQString&)*(TQString*) QtSupport::toTQString(env, db, &_qstring_db), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, password, &_qstring_password), (const TQString&)*(TQString*) QtSupport::toTQString(env, host, &_qstring_host), (int) port);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_open__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2ILjava_lang_String_2(JNIEnv* env, jobject obj, jstring db, jstring user, jstring password, jstring host, jint port, jstring connOpts)
{
static TQString* _qstring_db = 0;
static TQString* _qstring_user = 0;
static TQString* _qstring_password = 0;
static TQString* _qstring_host = 0;
static TQString* _qstring_connOpts = 0;
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->open((const TQString&)*(TQString*) QtSupport::toTQString(env, db, &_qstring_db), (const TQString&)*(TQString*) QtSupport::toTQString(env, user, &_qstring_user), (const TQString&)*(TQString*) QtSupport::toTQString(env, password, &_qstring_password), (const TQString&)*(TQString*) QtSupport::toTQString(env, host, &_qstring_host), (int) port, (const TQString&)*(TQString*) QtSupport::toTQString(env, connOpts, &_qstring_connOpts));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_primaryIndex(JNIEnv* env, jobject obj, jstring tableName)
{
static TQString* _qstring_tableName = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlIndex(((TQSqlDriver*) QtSupport::getQt(env, obj))->primaryIndex((const TQString&)*(TQString*) QtSupport::toTQString(env, tableName, &_qstring_tableName))), "org.trinitydesktop.qt.TQSqlIndex", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_recordInfo__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring tablename)
{
static TQString* _qstring_tablename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlRecordInfo(((TQSqlDriver*) QtSupport::getQt(env, obj))->recordInfo((const TQString&)*(TQString*) QtSupport::toTQString(env, tablename, &_qstring_tablename))), "org.trinitydesktop.qt.TQSqlRecordInfo", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_recordInfo__Lorg_trinitydesktop_qt_QSqlQueryInterface_2(JNIEnv* env, jobject obj, jobject query)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlRecordInfo(((TQSqlDriver*) QtSupport::getQt(env, obj))->recordInfo((const TQSqlQuery&)*(const TQSqlQuery*) QtSupport::getQt(env, query))), "org.trinitydesktop.qt.TQSqlRecordInfo", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_record__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring tableName)
{
static TQString* _qstring_tableName = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlRecord(((TQSqlDriver*) QtSupport::getQt(env, obj))->record((const TQString&)*(TQString*) QtSupport::toTQString(env, tableName, &_qstring_tableName))), "org.trinitydesktop.qt.TQSqlRecord", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_record__Lorg_trinitydesktop_qt_QSqlQueryInterface_2(JNIEnv* env, jobject obj, jobject query)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQSqlRecord(((TQSqlDriver*) QtSupport::getQt(env, obj))->record((const TQSqlQuery&)*(const TQSqlQuery*) QtSupport::getQt(env, query))), "org.trinitydesktop.qt.TQSqlRecord", TRUE);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_rollbackTransaction(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlDriver*) QtSupport::getQt(env, obj))->rollbackTransaction();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_tables(JNIEnv* env, jobject obj, jstring tableType)
{
	TQStringList  _qlist;
static TQString* _qstring_tableType = 0;
	_qlist = ((TQSqlDriver*) QtSupport::getQt(env, obj))->tables((const TQString&)*(TQString*) QtSupport::toTQString(env, tableType, &_qstring_tableType));
	return (jobject) QtSupport::arrayWithTQStringList(env, (TQStringList*) &_qlist);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_tr__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring arg1)
{
	TQString  _qstring;
	(void) cls;
static TQCString* _qstring_arg1 = 0;
	_qstring = TQSqlDriver::tr((const char*) QtSupport::toCharString(env, arg1, &_qstring_arg1));
	return QtSupport::fromTQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QSqlDriver_tr__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring arg1, jstring arg2)
{
	TQString  _qstring;
	(void) cls;
static TQCString* _qstring_arg1 = 0;
static TQCString* _qstring_arg2 = 0;
	_qstring = TQSqlDriver::tr((const char*) QtSupport::toCharString(env, arg1, &_qstring_arg1), (const char*) QtSupport::toCharString(env, arg2, &_qstring_arg2));
	return QtSupport::fromTQString(env, &_qstring);
}

