//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.qt;

import org.kde.qt.Qt;
import java.util.ArrayList;

public class QSqlDatabase extends QObject  {
	protected QSqlDatabase(Class dummy){super((Class) null);}
	public native QMetaObject metaObject();
	public native String className();
	public native boolean open();
	public native boolean open(String user, String password);
	public native void close();
	public native boolean isOpen();
	public native boolean isOpenError();
	public native ArrayList tables();
	public native ArrayList tables(int type);
	public native QSqlIndex primaryIndex(String tablename);
	public native QSqlRecord record(String tablename);
	public native QSqlRecord record(QSqlQueryInterface query);
	public native QSqlRecordInfo recordInfo(String tablename);
	public native QSqlRecordInfo recordInfo(QSqlQueryInterface query);
	public native QSqlQueryInterface exec(String query);
	public native QSqlQueryInterface exec();
	public native QSqlError lastError();
	public native boolean transaction();
	public native boolean commit();
	public native boolean rollback();
	public native void setDatabaseName(String name);
	public native void setUserName(String name);
	public native void setPassword(String password);
	public native void setHostName(String host);
	public native void setPort(int p);
	public native void setConnectOptions(String options);
	public native void setConnectOptions();
	public native String databaseName();
	public native String userName();
	public native String password();
	public native String hostName();
	public native String driverName();
	public native int port();
	public native String connectOptions();
	public native QSqlDriver driver();
	public static native String tr(String arg1, String arg2);
	public static native String tr(String arg1);
	public static native QSqlDatabase addDatabase(String type, String connectionName);
	public static native QSqlDatabase addDatabase(String type);
	public static native QSqlDatabase addDatabase(QSqlDriver driver, String connectionName);
	public static native QSqlDatabase addDatabase(QSqlDriver driver);
	public static native QSqlDatabase database(String connectionName, boolean open);
	public static native QSqlDatabase database(String connectionName);
	public static native QSqlDatabase database();
	public static native void removeDatabase(String connectionName);
	public static native void removeDatabase(QSqlDatabase db);
	public static native boolean contains(String connectionName);
	public static native boolean contains();
	public static native ArrayList drivers();
	// void registerSqlDriver(const QString& arg1,const QSqlDriverCreatorBase* arg2); >>>> NOT CONVERTED
	public static native boolean isDriverAvailable(String name);
	public QSqlDatabase(String type, String name, QObject parent, String objname) {
		super((Class) null);
		newQSqlDatabase(type,name,parent,objname);
	}
	private native void newQSqlDatabase(String type, String name, QObject parent, String objname);
	public QSqlDatabase(String type, String name, QObject parent) {
		super((Class) null);
		newQSqlDatabase(type,name,parent);
	}
	private native void newQSqlDatabase(String type, String name, QObject parent);
	public QSqlDatabase(String type, String name) {
		super((Class) null);
		newQSqlDatabase(type,name);
	}
	private native void newQSqlDatabase(String type, String name);
	public QSqlDatabase(QSqlDriver driver, QObject parent, String objname) {
		super((Class) null);
		newQSqlDatabase(driver,parent,objname);
	}
	private native void newQSqlDatabase(QSqlDriver driver, QObject parent, String objname);
	public QSqlDatabase(QSqlDriver driver, QObject parent) {
		super((Class) null);
		newQSqlDatabase(driver,parent);
	}
	private native void newQSqlDatabase(QSqlDriver driver, QObject parent);
	public QSqlDatabase(QSqlDriver driver) {
		super((Class) null);
		newQSqlDatabase(driver);
	}
	private native void newQSqlDatabase(QSqlDriver driver);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}
