edu.iastate.jtm.util
Class MySqlConnector
java.lang.Object
edu.iastate.jtm.util.MySqlConnector
public class MySqlConnector
- extends java.lang.Object
- Author:
- Jing Ding
fcmodeler.pathbinder
MetNet
|
Constructor Summary |
MySqlConnector()
|
MySqlConnector(java.lang.String h,
java.lang.String db,
java.lang.String u,
java.lang.String p)
Creates a new instance of DbManager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MySqlConnector
public MySqlConnector(java.lang.String h,
java.lang.String db,
java.lang.String u,
java.lang.String p)
throws java.sql.SQLException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException
- Creates a new instance of DbManager
- Throws:
java.sql.SQLException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
MySqlConnector
public MySqlConnector()
throws java.sql.SQLException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException
- Throws:
java.sql.SQLException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
setBatchSize
public void setBatchSize(int size)
close
public void close()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getStatement
public java.sql.Statement getStatement()
addBatch
public void addBatch(java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
execute
public void execute(java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
executeFile
public void executeFile(java.io.File sql)
throws java.io.IOException,
java.sql.SQLException
- Run a sql file.
- Parameters:
sql - SQL command file.
- Throws:
java.io.IOException
java.sql.SQLException
commit
public void commit()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createStatement
public java.sql.Statement createStatement()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getSearchText
public static java.lang.String getSearchText(java.lang.String term,
boolean caseSensitive,
boolean exact)
main
public static void main(java.lang.String[] args)