|
Ontimize 5.2071EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.db.sql.AbstractSQLHandler
| Field Summary | |
protected static java.lang.String |
ADD
|
protected static java.lang.String |
ALTER_TABLE
|
protected static java.lang.String |
COLUMN
|
protected static java.lang.String |
CREATE_TABLE
|
static boolean |
DEBUG
|
protected static java.lang.String |
DEFAULT
|
protected static java.lang.String |
DROP
|
protected static java.lang.String |
DROP_TABLE
|
protected static java.lang.String |
NOT_NULL
|
| Fields inherited from interface com.ontimize.db.sql.SQLHandler |
CLOSE_PARENTHESIS, OPEN_PARENTHESIS |
| Constructor Summary | |
AbstractSQLHandler()
|
|
| Method Summary | |
ISQLInfo |
alterSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
This method alters a database table. |
java.lang.String |
alterSQLTable(SQLTableAlter table,
java.sql.Connection connection)
Alter the table in the database using ANSI standard |
ISQLInfo |
alterSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
This method alters a database table in transactional mode. |
ISQLInfo |
createSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
This method creates a database table. |
java.lang.String |
createSQLTable(SQLTableCreation table,
java.sql.Connection connection)
Creates the table in the database using ANSI standard |
ISQLInfo |
createSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
This method creates a database table in transactional mode. |
java.lang.String |
createStatementAlterTable(SQLTableAlter table)
Return the SQL Statement to alter the table. |
java.lang.String |
createStatementCreateTable(SQLTableCreation table)
Return the SQL Statement to create the table. |
java.lang.String |
createStatementDropTable(SQLTableDrop table)
Return the SQL Statement to drop the table. |
ISQLInfo |
dropSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
This method drops a database table. |
java.lang.String |
dropSQLTable(SQLTableDrop table,
java.sql.Connection connection)
Drop the table in the database using ANSI standard |
ISQLInfo |
dropSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
This method drops a database table in transactional mode. |
protected static void |
executeSQL(java.lang.String sql,
java.sql.Connection con)
Execute the SQL Statement. |
ISQLInfo |
executeSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
This method executes a serial of SQL actions(create,drop or alter) over a database table. |
ISQLInfo |
executeSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
This method executes a serial of SQL actions(create,drop or alter) over a database table in transactional mode. |
java.lang.String |
executeStatement(java.lang.String statement,
java.sql.Connection connection)
|
java.lang.String |
getCreateStatementAlterTableColumn(SQLTableAlterColumn table)
|
java.lang.String |
getCreateStatementAlterTableConstraint(SQLTableAlterConstraint table)
|
protected java.lang.String |
getDefinitionColumn(SQLColumn column,
boolean includePrimaryKey)
|
protected java.lang.String |
getStringDefaultValue(java.lang.Object value,
SQLColumn column)
|
java.lang.String |
isMultiplePrimaryKey(SQLTableCreation table)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ontimize.db.sql.SQLHandler |
getSQLTypeName |
| Field Detail |
public static boolean DEBUG
protected static final java.lang.String CREATE_TABLE
protected static final java.lang.String DROP_TABLE
protected static final java.lang.String ALTER_TABLE
protected static final java.lang.String DEFAULT
protected static final java.lang.String NOT_NULL
protected static final java.lang.String ADD
protected static final java.lang.String DROP
protected static final java.lang.String COLUMN
| Constructor Detail |
public AbstractSQLHandler()
| Method Detail |
public ISQLInfo executeSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
SQLHandlercommit or the method rollback. Moreover, Exceptions
are also managed by this method.
-connection.setAutoCommit(false);
...
...
-executeSQLTableTransactional
...
...
-connection.setAutoCommit(true);
executeSQLTable in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
public ISQLInfo executeSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
throws java.lang.Exception
SQLHandler
executeSQLTableTransactional in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
java.lang.Exception
public ISQLInfo createSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
SQLHandlercommit or the method rollback. Moreover, Exceptions
are also managed by this method.
-connection.setAutoCommit(false);
...
...
-createSQLTableTransactional
...
...
-connection.setAutoCommit(true);
createSQLTable in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
public ISQLInfo dropSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
SQLHandlercommit or the method rollback. Moreover, Exceptions
are also managed by this method.
-connection.setAutoCommit(false);
...
...
-dropSQLTableTransactional
...
...
-connection.setAutoCommit(true);
dropSQLTable in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
public ISQLInfo alterSQLTable(java.util.List sqlTables,
java.sql.Connection connection)
SQLHandlercommit or the method rollback. Moreover, Exceptions
are also managed by this method.
-connection.setAutoCommit(false);
...
...
-alterSQLTableTransactional
...
...
-connection.setAutoCommit(true);
alterSQLTable in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
public ISQLInfo createSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
throws java.lang.Exception
SQLHandler
-execute sql to create all tables
createSQLTableTransactional in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
java.lang.Exception
public ISQLInfo dropSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
throws java.lang.Exception
SQLHandler
-execute sql to drop all tables
dropSQLTableTransactional in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
java.lang.Exception
public ISQLInfo alterSQLTableTransactional(java.util.List sqlTables,
java.sql.Connection connection)
throws java.lang.Exception
SQLHandler
-execute sql to alter all tables
alterSQLTableTransactional in interface SQLHandlersqlTables - list with all sqlTablesconnection - the connection
java.lang.Exception
protected static void executeSQL(java.lang.String sql,
java.sql.Connection con)
throws java.lang.Exception
sql - String which contains the SQL Statement.con - The connection.
java.lang.Exception
public java.lang.String createSQLTable(SQLTableCreation table,
java.sql.Connection connection)
throws java.lang.Exception
table - connection -
java.lang.Exception
public java.lang.String dropSQLTable(SQLTableDrop table,
java.sql.Connection connection)
throws java.lang.Exception
table - connection -
java.lang.Exception
public java.lang.String alterSQLTable(SQLTableAlter table,
java.sql.Connection connection)
throws java.lang.Exception
table - connection -
java.lang.Exception
public java.lang.String executeStatement(java.lang.String statement,
java.sql.Connection connection)
throws java.lang.Exception
java.lang.Exception
public java.lang.String createStatementCreateTable(SQLTableCreation table)
throws java.lang.Exception
SQLHandler
createStatementCreateTable in interface SQLHandlertable - The SQLTableCreation table with whole information to create it.
String with the SQL statement
java.lang.Exception
protected java.lang.String getDefinitionColumn(SQLColumn column,
boolean includePrimaryKey)
throws java.lang.Exception
java.lang.Exception
protected java.lang.String getStringDefaultValue(java.lang.Object value,
SQLColumn column)
public java.lang.String isMultiplePrimaryKey(SQLTableCreation table)
public java.lang.String createStatementDropTable(SQLTableDrop table)
throws java.lang.Exception
SQLHandler
createStatementDropTable in interface SQLHandlertable - The SQLTableDrop table with whole information to drop it.
String with the SQL statement
java.lang.Exception
public java.lang.String createStatementAlterTable(SQLTableAlter table)
throws java.lang.Exception
SQLHandler
createStatementAlterTable in interface SQLHandlertable - The SQLTableAlter table with whole information to alter it.
String with the SQL statement
java.lang.Exception
public java.lang.String getCreateStatementAlterTableColumn(SQLTableAlterColumn table)
throws java.lang.Exception
java.lang.Exception
public java.lang.String getCreateStatementAlterTableConstraint(SQLTableAlterConstraint table)
throws java.lang.Exception
java.lang.Exception
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||