//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqstring.h>
#include <tqsqlerror.h>
#include <tqsql.h>
#include <tqvariant.h>
#include <tqsqlquery.h>

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

class TQSqlQueryJBridge : public TQSqlQuery
{
public:
	TQSqlQueryJBridge(TQSqlResult* arg1) : TQSqlQuery(arg1) {};
	TQSqlQueryJBridge(const TQString& arg1,TQSqlDatabase* arg2) : TQSqlQuery(arg1,arg2) {};
	TQSqlQueryJBridge(const TQString& arg1) : TQSqlQuery(arg1) {};
	TQSqlQueryJBridge() : TQSqlQuery() {};
	TQSqlQueryJBridge(TQSqlDatabase* arg1) : TQSqlQuery(arg1) {};
	TQSqlQueryJBridge(const TQSqlQuery& arg1) : TQSqlQuery(arg1) {};
	void protected_beforeSeek() {
		TQSqlQuery::beforeSeek();
		return;
	}
	void protected_afterSeek() {
		TQSqlQuery::afterSeek();
		return;
	}
	~TQSqlQueryJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_addBindValue__Lorg_trinitydesktop_qt_QVariant_2(JNIEnv* env, jobject obj, jobject val)
{
	((TQSqlQuery*) QtSupport::getQt(env, obj))->addBindValue((const TQVariant&)*(const TQVariant*) QtSupport::getQt(env, val));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_addBindValue__Lorg_trinitydesktop_qt_QVariant_2I(JNIEnv* env, jobject obj, jobject val, jint type)
{
	((TQSqlQuery*) QtSupport::getQt(env, obj))->addBindValue((const TQVariant&)*(const TQVariant*) QtSupport::getQt(env, val), (TQSql::ParameterType) type);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_afterSeek(JNIEnv* env, jobject obj)
{
	((TQSqlQueryJBridge*) QtSupport::getQt(env, obj))->protected_afterSeek();
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_at(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQSqlQuery*) QtSupport::getQt(env, obj))->at();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_beforeSeek(JNIEnv* env, jobject obj)
{
	((TQSqlQueryJBridge*) QtSupport::getQt(env, obj))->protected_beforeSeek();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_bindValue__ILorg_trinitydesktop_qt_QVariant_2(JNIEnv* env, jobject obj, jint pos, jobject val)
{
	((TQSqlQuery*) QtSupport::getQt(env, obj))->bindValue((int) pos, (const TQVariant&)*(const TQVariant*) QtSupport::getQt(env, val));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_bindValue__ILorg_trinitydesktop_qt_QVariant_2I(JNIEnv* env, jobject obj, jint pos, jobject val, jint type)
{
	((TQSqlQuery*) QtSupport::getQt(env, obj))->bindValue((int) pos, (const TQVariant&)*(const TQVariant*) QtSupport::getQt(env, val), (TQSql::ParameterType) type);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_bindValue__Ljava_lang_String_2Lorg_trinitydesktop_qt_QVariant_2(JNIEnv* env, jobject obj, jstring placeholder, jobject val)
{
static TQString* _qstring_placeholder = 0;
	((TQSqlQuery*) QtSupport::getQt(env, obj))->bindValue((const TQString&)*(TQString*) QtSupport::toTQString(env, placeholder, &_qstring_placeholder), (const TQVariant&)*(const TQVariant*) QtSupport::getQt(env, val));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_bindValue__Ljava_lang_String_2Lorg_trinitydesktop_qt_QVariant_2I(JNIEnv* env, jobject obj, jstring placeholder, jobject val, jint type)
{
static TQString* _qstring_placeholder = 0;
	((TQSqlQuery*) QtSupport::getQt(env, obj))->bindValue((const TQString&)*(TQString*) QtSupport::toTQString(env, placeholder, &_qstring_placeholder), (const TQVariant&)*(const TQVariant*) QtSupport::getQt(env, val), (TQSql::ParameterType) type);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_boundValue__I(JNIEnv* env, jobject obj, jint pos)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQVariant(((TQSqlQuery*) QtSupport::getQt(env, obj))->boundValue((int) pos)), "org.trinitydesktop.qt.TQVariant", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_boundValue__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring placeholder)
{
static TQString* _qstring_placeholder = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQVariant(((TQSqlQuery*) QtSupport::getQt(env, obj))->boundValue((const TQString&)*(TQString*) QtSupport::toTQString(env, placeholder, &_qstring_placeholder))), "org.trinitydesktop.qt.TQVariant", true);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_qt_QSqlQuery_finalize(env, obj);
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_exec__(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->exec();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_exec__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring query)
{
static TQString* _qstring_query = 0;
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->exec((const TQString&)*(TQString*) QtSupport::toTQString(env, query, &_qstring_query));
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (TQSqlQuery*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_first(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->first();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_isActive(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->isActive();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_isForwardOnly(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->isForwardOnly();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_isNull(JNIEnv* env, jobject obj, jint field)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->isNull((int) field);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_isSelect(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->isSelect();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_isValid(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->isValid();
	return xret;
}

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

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_last(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->last();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_newTQSqlQuery__(JNIEnv* env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQSqlQueryJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_newTQSqlQuery__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring query)
{
static TQString* _qstring_query = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQSqlQueryJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, query, &_qstring_query)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_newTQSqlQuery__Ljava_lang_String_2Lorg_trinitydesktop_qt_QSqlDatabase_2(JNIEnv* env, jobject obj, jstring query, jobject db)
{
static TQString* _qstring_query = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQSqlQueryJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, query, &_qstring_query), (TQSqlDatabase*) QtSupport::getQt(env, db)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_newTQSqlQuery__Lorg_trinitydesktop_qt_QSqlDatabase_2(JNIEnv* env, jobject obj, jobject db)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQSqlQueryJBridge((TQSqlDatabase*) QtSupport::getQt(env, db)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_newTQSqlQuery__Lorg_trinitydesktop_qt_QSqlQueryInterface_2(JNIEnv* env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQSqlQueryJBridge((const TQSqlQuery&)*(const TQSqlQuery*) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_newTQSqlQuery__Lorg_trinitydesktop_qt_QSqlResult_2(JNIEnv* env, jobject obj, jobject r)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQSqlQueryJBridge((TQSqlResult*) QtSupport::getQt(env, r)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_next(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->next();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_numRowsAffected(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQSqlQuery*) QtSupport::getQt(env, obj))->numRowsAffected();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_prepare(JNIEnv* env, jobject obj, jstring query)
{
static TQString* _qstring_query = 0;
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->prepare((const TQString&)*(TQString*) QtSupport::toTQString(env, query, &_qstring_query));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_prev(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->prev();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_result(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((TQSqlQuery*) QtSupport::getQt(env, obj))->result(), "org.trinitydesktop.qt.TQSqlResult");
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_seek__I(JNIEnv* env, jobject obj, jint i)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->seek((int) i);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_seek__IZ(JNIEnv* env, jobject obj, jint i, jboolean relative)
{
	jboolean xret = (jboolean) ((TQSqlQuery*) QtSupport::getQt(env, obj))->seek((int) i, (bool) relative);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_setForwardOnly(JNIEnv* env, jobject obj, jboolean forward)
{
	((TQSqlQuery*) QtSupport::getQt(env, obj))->setForwardOnly((bool) forward);
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_size(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQSqlQuery*) QtSupport::getQt(env, obj))->size();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSqlQuery_value(JNIEnv* env, jobject obj, jint i)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQVariant(((TQSqlQuery*) QtSupport::getQt(env, obj))->value((int) i)), "org.trinitydesktop.qt.TQVariant", true);
	return xret;
}

