|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujorm.orm.metaModel.MetaDbService
public class MetaDbService
A service method for the MetaDatabase class. The service class can be overriten
MetaParams.META_DB_SERVICE| Field Summary | |
|---|---|
protected boolean |
anyChange
There is a database change |
protected MetaDatabase |
db
Meta Database from constructor |
protected StringBuilder |
sql
SQL Buffer |
protected Statement |
stat
DB Statement for common use |
| Constructor Summary | |
|---|---|
MetaDbService()
|
|
| Method Summary | |
|---|---|
protected void |
changeIndex(List<MetaIndex> indexes)
5. |
protected void |
checkKeyWord(String word,
MetaTable table,
Set<String> keywords)
Check the keyword |
protected void |
checkReportKeywords(Connection conn,
List<MetaTable> tables,
List<MetaColumn> newColumns,
List<MetaIndex> indexes)
1. |
void |
create(MetaDatabase metaDatabase,
Session session)
Create DB |
protected void |
createForeignKey(List<MetaColumn> foreignColumns)
6. |
protected void |
createNewColumn(List<MetaColumn> newColumns,
List<MetaColumn> foreignColumns)
4. |
protected void |
createSchema(int tableTotalCount,
List<MetaTable> tables,
Connection conn)
2. |
protected void |
createSequenceTable(boolean createSequenceTable)
7. |
protected void |
createTable(List<MetaTable> tables,
List<MetaColumn> foreignColumns)
3. |
protected void |
createTableComments(List<MetaTable> tables)
8. |
protected void |
createTableComments(List<MetaTable> cTables,
StringBuilder out)
Create table and column comments. |
protected String |
dbIdentifier(String name,
DatabaseMetaData dmd)
Returns a native database identifirer. |
protected void |
executeUpdate(Appendable sql,
MetaTable table)
Check missing database table, index, or column |
protected UjoSequencer |
findFirstSequencer()
Find the first sequence of the database or returns null if no sequence was not found. |
protected SqlDialect |
getDialect()
|
protected SqlDialectEx |
getDialectEx()
Returns an extended dialect |
StringBuilder |
getSql()
SQL Buffer |
protected boolean |
initialize(Connection conn)
0. |
protected boolean |
isAnyChange()
Has the database any change? |
protected boolean |
isCatalog()
Does the database support a catalog? The feature supports: MySqlDialect and MSSqlDialect. |
protected boolean |
isModelChanged(Connection conn,
List<MetaTable> newTables,
List<MetaColumn> newColumns,
List<MetaIndex> newIndexes)
Find database table or columns to modify. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MetaDatabase db
protected final StringBuilder sql
protected Statement stat
protected boolean anyChange
| Constructor Detail |
|---|
public MetaDbService()
| Method Detail |
|---|
public void create(MetaDatabase metaDatabase,
Session session)
public StringBuilder getSql()
protected boolean isModelChanged(Connection conn,
List<MetaTable> newTables,
List<MetaColumn> newColumns,
List<MetaIndex> newIndexes)
throws SQLException
conn - Database connectionnewTables - Output parameternewColumns - Output parameter
SQLException
protected String dbIdentifier(String name,
DatabaseMetaData dmd)
throws SQLException
SQLException
protected boolean initialize(Connection conn)
throws Exception
Exception
protected void checkReportKeywords(Connection conn,
List<MetaTable> tables,
List<MetaColumn> newColumns,
List<MetaIndex> indexes)
throws Exception
Exception
protected void createSchema(int tableTotalCount,
List<MetaTable> tables,
Connection conn)
throws SQLException,
IOException
SQLException
IOException
protected void createTable(List<MetaTable> tables,
List<MetaColumn> foreignColumns)
throws Exception
Exception
protected void createNewColumn(List<MetaColumn> newColumns,
List<MetaColumn> foreignColumns)
throws Exception
Exception
protected void changeIndex(List<MetaIndex> indexes)
throws Exception
Exception
protected void createForeignKey(List<MetaColumn> foreignColumns)
throws Exception
Exception
protected void createSequenceTable(boolean createSequenceTable)
throws Exception
Exception
protected void createTableComments(List<MetaTable> tables)
throws Exception
Exception
protected void createTableComments(List<MetaTable> cTables,
StringBuilder out)
protected void checkKeyWord(String word,
MetaTable table,
Set<String> keywords)
throws Exception
Exception
protected void executeUpdate(Appendable sql,
MetaTable table)
throws IllegalStateException,
SQLException
IllegalStateException
SQLExceptionprotected UjoSequencer findFirstSequencer()
protected boolean isAnyChange()
protected SqlDialect getDialect()
protected SqlDialectEx getDialectEx()
protected final boolean isCatalog()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||