//Auto-generated by kalyptus. DO NOT EDIT.
#include <qstring.h>
#include <qsqlerror.h>
#include <qsql.h>
#include <qvariant.h>
#include <qsqlquery.h>

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

class QSqlQueryJBridge : public QSqlQuery
{
public:
	QSqlQueryJBridge(QSqlResult* arg1) : QSqlQuery(arg1) {};
	QSqlQueryJBridge(const QString& arg1,QSqlDatabase* arg2) : QSqlQuery(arg1,arg2) {};
	QSqlQueryJBridge(const QString& arg1) : QSqlQuery(arg1) {};
	QSqlQueryJBridge() : QSqlQuery() {};
	QSqlQueryJBridge(QSqlDatabase* arg1) : QSqlQuery(arg1) {};
	QSqlQueryJBridge(const QSqlQuery& arg1) : QSqlQuery(arg1) {};
	void protected_beforeSeek() {
		QSqlQuery::beforeSeek();
		return;
	}
	void protected_afterSeek() {
		QSqlQuery::afterSeek();
		return;
	}
	~QSqlQueryJBridge() {QtSupport::qtKeyDeleted(this);}
};

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_addBindValue__Lorg_kde_qt_QVariant_2I(JNIEnv* env, jobject obj, jobject val, jint type)
{
	((QSqlQuery*) QtSupport::getQt(env, obj))->addBindValue((const QVariant&)*(const QVariant*) QtSupport::getQt(env, val), (QSql::ParameterType) type);
	return;
}

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

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_bindValue__ILorg_kde_qt_QVariant_2I(JNIEnv* env, jobject obj, jint pos, jobject val, jint type)
{
	((QSqlQuery*) QtSupport::getQt(env, obj))->bindValue((int) pos, (const QVariant&)*(const QVariant*) QtSupport::getQt(env, val), (QSql::ParameterType) type);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_bindValue__Ljava_lang_String_2Lorg_kde_qt_QVariant_2(JNIEnv* env, jobject obj, jstring placeholder, jobject val)
{
static QString* _qstring_placeholder = 0;
	((QSqlQuery*) QtSupport::getQt(env, obj))->bindValue((const QString&)*(QString*) QtSupport::toQString(env, placeholder, &_qstring_placeholder), (const QVariant&)*(const QVariant*) QtSupport::getQt(env, val));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_bindValue__Ljava_lang_String_2Lorg_kde_qt_QVariant_2I(JNIEnv* env, jobject obj, jstring placeholder, jobject val, jint type)
{
static QString* _qstring_placeholder = 0;
	((QSqlQuery*) QtSupport::getQt(env, obj))->bindValue((const QString&)*(QString*) QtSupport::toQString(env, placeholder, &_qstring_placeholder), (const QVariant&)*(const QVariant*) QtSupport::getQt(env, val), (QSql::ParameterType) type);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QSqlQuery_boundValue__I(JNIEnv* env, jobject obj, jint pos)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QVariant(((QSqlQuery*) QtSupport::getQt(env, obj))->boundValue((int) pos)), "org.kde.qt.QVariant", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QSqlQuery_boundValue__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring placeholder)
{
static QString* _qstring_placeholder = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QVariant(((QSqlQuery*) QtSupport::getQt(env, obj))->boundValue((const QString&)*(QString*) QtSupport::toQString(env, placeholder, &_qstring_placeholder))), "org.kde.qt.QVariant", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QSqlQuery_finalize(env, obj);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QSqlQuery_driver(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((QSqlQuery*) QtSupport::getQt(env, obj))->driver(), "org.kde.qt.QSqlDriver");
	return xret;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QSqlQuery_exec__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring query)
{
static QString* _qstring_query = 0;
	jboolean xret = (jboolean) ((QSqlQuery*) QtSupport::getQt(env, obj))->exec((const QString&)*(QString*) QtSupport::toQString(env, query, &_qstring_query));
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QSqlQuery_executedQuery(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QSqlQuery*) QtSupport::getQt(env, obj))->executedQuery();
	return QtSupport::fromQString(env, &_qstring);
}

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

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

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

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

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

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

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

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QSqlQuery_lastError(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QSqlError(((QSqlQuery*) QtSupport::getQt(env, obj))->lastError()), "org.kde.qt.QSqlError", TRUE);
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QSqlQuery_lastQuery(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QSqlQuery*) QtSupport::getQt(env, obj))->lastQuery();
	return QtSupport::fromQString(env, &_qstring);
}

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

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_newQSqlQuery__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring query)
{
static QString* _qstring_query = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QSqlQueryJBridge((const QString&)*(QString*) QtSupport::toQString(env, query, &_qstring_query)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QSqlQuery_newQSqlQuery__Ljava_lang_String_2Lorg_kde_qt_QSqlDatabase_2(JNIEnv* env, jobject obj, jstring query, jobject db)
{
static QString* _qstring_query = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QSqlQueryJBridge((const QString&)*(QString*) QtSupport::toQString(env, query, &_qstring_query), (QSqlDatabase*) QtSupport::getQt(env, db)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

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

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QSqlQuery_prepare(JNIEnv* env, jobject obj, jstring query)
{
static QString* _qstring_query = 0;
	jboolean xret = (jboolean) ((QSqlQuery*) QtSupport::getQt(env, obj))->prepare((const QString&)*(QString*) QtSupport::toQString(env, query, &_qstring_query));
	return xret;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QSqlQuery_result(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((QSqlQuery*) QtSupport::getQt(env, obj))->result(), "org.kde.qt.QSqlResult");
	return xret;
}

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

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

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

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QSqlQuery_value(JNIEnv* env, jobject obj, jint i)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QVariant(((QSqlQuery*) QtSupport::getQt(env, obj))->value((int) i)), "org.kde.qt.QVariant", TRUE);
	return xret;
}

