|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentabean.util.SQLUtils
public class SQLUtils
| Constructor Summary | |
|---|---|
SQLUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
checkIfTableExists(Connection conn,
String tableName)
|
static void |
close(ResultSet rset,
Statement stmt)
|
static void |
close(ResultSet rset,
Statement stmt,
Connection conn)
|
static void |
close(Statement stmt)
|
static void |
close(Statement stmt,
Connection conn)
|
static void |
executeScript(Connection conn,
String file,
String charset)
|
static int |
fillStatement(PreparedStatement stmt,
Object... params)
Fill the given PreparedStatement object with the specified parameters.Note that this method uses the setObject method which depends
of a specified JDBC driver implementation to work properly. |
static int |
fillStatementIndx(PreparedStatement stmt,
int indx,
Object... params)
Fill the given PreparedStatement object with the specified parameters
starting at indx position.Note that this method uses the setObject method which depends
of a specified JDBC driver implementation to work properly. |
static Limit |
lim(int x)
|
static OrderBy |
orderByAsc(Object field)
|
static OrderBy |
orderByDesc(Object field)
|
static PreparedStatement |
prepare(Connection conn,
String query,
Object... params)
Prepare a statement (PreparedStatement) with the query and set the parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLUtils()
| Method Detail |
|---|
public static void executeScript(Connection conn,
String file,
String charset)
public static boolean checkIfTableExists(Connection conn,
String tableName)
public static void close(Statement stmt)
public static void close(ResultSet rset,
Statement stmt)
public static void close(Statement stmt,
Connection conn)
public static void close(ResultSet rset,
Statement stmt,
Connection conn)
public static int fillStatement(PreparedStatement stmt,
Object... params)
PreparedStatement object with the specified parameters.setObject method which depends
of a specified JDBC driver implementation to work properly.
stmt - - The PreparedStatement objectparams - - Values that will be added in statement
fillStatementIndx(PreparedStatement, int, Object...),
PreparedStatement.setObject(int, Object)
public static int fillStatementIndx(PreparedStatement stmt,
int indx,
Object... params)
PreparedStatement object with the specified parameters
starting at indx position.setObject method which depends
of a specified JDBC driver implementation to work properly.
stmt - - The PreparedStatement objectindx - - Initial index for setting attributes in statementparams - - Values that will be added in statement
fillStatement(PreparedStatement, Object...),
PreparedStatement.setObject(int, Object)
public static PreparedStatement prepare(Connection conn,
String query,
Object... params)
throws SQLException
conn - the connectionquery - the query to prepareparams - the parameters to set in the query
SQLExceptionpublic static OrderBy orderByAsc(Object field)
public static OrderBy orderByDesc(Object field)
public static Limit lim(int x)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||