|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.backsource.utils.sql.MetadataUtil
A collection of static utility methods to work with jdbc metadata.
| Constructor Summary | |
MetadataUtil()
|
|
| Method Summary | |
static void |
checkCreateTable(java.sql.Connection con,
java.lang.String tableName,
java.lang.String createStatement)
Check if the table exists. |
static boolean |
tableExists(java.sql.Connection con,
java.lang.String tableName)
Check if a table exists in the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MetadataUtil()
| Method Detail |
public static boolean tableExists(java.sql.Connection con,
java.lang.String tableName)
throws java.sql.SQLException
java.sql.SQLException
public static void checkCreateTable(java.sql.Connection con,
java.lang.String tableName,
java.lang.String createStatement)
throws java.sql.SQLException
This method does only check if the table name exists. It does not check that the table actually matches the create statement
Example
MetadataUtil.checkCreateTable(con,
"Customer",
"CREATE TABLE Customer ("
+ " Id INTEGER,"
+ " Name TEXT"
+ ")");
tableName - name of tablecreateStatement - table definition.
java.sql.SQLException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||