| java.lang.Object org.jsqltool.conn.DbConnectionUtil
DbConnectionUtil | public class DbConnectionUtil (Code) | | Title: JSqlTool Project
Description: Utility Class used to connect to the database and fetch data.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of JSqlTool project.
This library is free software; you can redistribute it and/or
modify it under the terms of the (LGPL) Lesser General Public
License as published by the Free Software Foundation;
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The author may be contacted at:
maurocarniel@tin.it
author: Mauro Carniel version: 1.0 |
DbConnectionUtil | public DbConnectionUtil(JFrame parent, DbConnection c)(Code) | | Create a database connection.
Parameters: c - databse connection descriptor |
executeStmt | public synchronized int executeStmt(String stmt, Vector parameters)(Code) | | Execute a SQL Script.
Parameters: stmt - SQL statement to execute number of rows updated |
getCrossReference | public synchronized TableModel getCrossReference(String tableName)(Code) | | Parameters: tableName - table name used to retrieve its fk table fks |
getLastQueryIndex | public synchronized int getLastQueryIndex(String query, Vector parameters, int maxRows)(Code) | | Parameters: query - query to execute Parameters: maxRows - max number of records to read result set index of the first record of the last block |
getPK | public synchronized Hashtable getPK(String tableName)(Code) | | Parameters: tableName - table name used to retrieve its pk collection of links (pk field name,table model column index) |
getQuery | public synchronized TableModel getQuery(String query, Vector parameters)(Code) | | Parameters: query - query to execute table model which contains a block of records |
getQuery | public synchronized TableModel getQuery(String query, Vector parameters, int startPos, int maxRows)(Code) | | Parameters: query - query to execute Parameters: startPos - first record to read Parameters: maxRows - max number of records to read table model which contains the records |
getSchemas | public synchronized List getSchemas()(Code) | | catalogs list |
getTableColumns | public synchronized TableModel getTableColumns(String tableName)(Code) | | Parameters: tableName - table name table columns |
getTableIndexes | public synchronized TableModel getTableIndexes(String tableName)(Code) | | Parameters: tableName - table name used to retrieve its indexes table indexes |
getTables | public synchronized List getTables(String schema, String tableType)(Code) | | tables list, filtered by schema |
saveProfile | public void saveProfile(boolean isEdit)(Code) | | |
writeBlob | final public void writeBlob(byte[] bytes, PreparedStatement stmt) throws Exception(Code) | | Store a byte[] a BLOB field.
Parameters: bytes - byte[] to store Parameters: stmt - statement whose first element is a BLOB field |
|
|