Java Doc for SchemaDiff.java in  » Database-Client » SQL-Workbench » workbench » db » diff » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » SQL Workbench » workbench.db.diff 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   workbench.db.diff.SchemaDiff

SchemaDiff
public class SchemaDiff (Code)
Compare two Schemas for differences in the definition of the tables
author:
   support@sql-workbench.net


Field Summary
final public static  StringTAG_ADD_PROC
    
final public static  StringTAG_ADD_TABLE
    
final public static  StringTAG_ADD_VIEW
    
final public static  StringTAG_COMPARE_INFO
    
final public static  StringTAG_CONSTRAINT_INFO
    
final public static  StringTAG_DROP_PROC
    
final public static  StringTAG_DROP_SEQUENCE
    
final public static  StringTAG_DROP_TABLE
    
final public static  StringTAG_DROP_VIEW
    
final public static  StringTAG_FK_INFO
    
final public static  StringTAG_GRANT_INFO
    
final public static  StringTAG_INDEX_INFO
    
final public static  StringTAG_PK_INFO
    
final public static  StringTAG_PROC_INFO
    
final public static  StringTAG_PROC_PAIR
    
final public static  StringTAG_REF_CONN
    
final public static  StringTAG_SEQUENCE_INFO
    
final public static  StringTAG_TABLE_PAIR
    
final public static  StringTAG_TARGET_CONN
    
final public static  StringTAG_VIEW_INFO
    
final public static  StringTAG_VIEW_PAIR
    

Constructor Summary
public  SchemaDiff()
    
public  SchemaDiff(WbConnection source, WbConnection target)
    
public  SchemaDiff(WbConnection source, WbConnection target, String xmlNameSpace)
     Create a new SchemaDiff for the given connections with the given namespace to be used when writing the XML.

Method Summary
public  voidcancel()
    
public  voidcompareAll()
     Setup this SchemaDiff object to compare all tables that the user can access in the reference connection with all matching (=same name) tables in the target connection.
public  booleangetCompareJdbcTypes()
    
public  StringgetEncoding()
    
public  booleangetIncludeForeignKeys()
    
public  booleangetIncludeIndex()
    
public  booleangetIncludePrimaryKeys()
    
public  booleangetIncludeSequences()
    
public  booleangetIncludeTableConstraints()
    
public  booleangetIncludeTableGrants()
    
public  StringgetMigrateTargetXml()
     Return the XML that describes how the target schema needs to be modified in order to get the same structure as the reference schema. For this, each defined table in the reference schema will be compared to the corresponding table in the target schema.
public  booleanisCancelled()
    
public  voidsetCompareJdbcTypes(boolean flag)
    
public  voidsetEncoding(String encoding)
     Set the encoding that is used for writing the XML.
public  voidsetExcludeTables(List<String> tables)
     Define a list of table names that should not be compared.
public  voidsetIncludeForeignKeys(boolean flag)
     Control whether foreign keys should be compared as well.
public  voidsetIncludeIndex(boolean flag)
     Control whether index definitions should be compared as well.
public  voidsetIncludePrimaryKeys(boolean flag)
     Control whether primary keys should be compared as well.
public  voidsetIncludeProcedures(boolean flag)
    
public  voidsetIncludeSequences(boolean flag)
    
public  voidsetIncludeTableConstraints(boolean flag)
     Control whether table constraints should be compared as well.
public  voidsetIncludeTableGrants(boolean flag)
    
public  voidsetIncludeViews(boolean flag)
    
public  voidsetMonitor(RowActionMonitor mon)
    
public  voidsetSchemas(String rSchema, String tSchema)
     Setup this SchemaDiff object to compare all tables that the user can access in the reference connection with all matching (=same name) tables in the target connection.
public  voidsetTableNames(List<String> referenceList, List<String> targetList)
     Define table names to be compared.
public  voidsetTables(List<TableIdentifier> referenceList, List<TableIdentifier> targetList)
     Define the tables to be compared.
public  voidsetTables(List<TableIdentifier> reference)
     Define the reference tables to be compared with the matching tables (based on the name) in the target connection.
public  voidwriteXml(Writer out)
     Write the XML of the schema differences to the supplied writer. This writes some meta information about the compare, and then creates a TableDiff object for each pair of tables that needs to be compared.

Field Detail
TAG_ADD_PROC
final public static String TAG_ADD_PROC(Code)



TAG_ADD_TABLE
final public static String TAG_ADD_TABLE(Code)



TAG_ADD_VIEW
final public static String TAG_ADD_VIEW(Code)



TAG_COMPARE_INFO
final public static String TAG_COMPARE_INFO(Code)



TAG_CONSTRAINT_INFO
final public static String TAG_CONSTRAINT_INFO(Code)



TAG_DROP_PROC
final public static String TAG_DROP_PROC(Code)



TAG_DROP_SEQUENCE
final public static String TAG_DROP_SEQUENCE(Code)



TAG_DROP_TABLE
final public static String TAG_DROP_TABLE(Code)



TAG_DROP_VIEW
final public static String TAG_DROP_VIEW(Code)



TAG_FK_INFO
final public static String TAG_FK_INFO(Code)



TAG_GRANT_INFO
final public static String TAG_GRANT_INFO(Code)



TAG_INDEX_INFO
final public static String TAG_INDEX_INFO(Code)



TAG_PK_INFO
final public static String TAG_PK_INFO(Code)



TAG_PROC_INFO
final public static String TAG_PROC_INFO(Code)



TAG_PROC_PAIR
final public static String TAG_PROC_PAIR(Code)



TAG_REF_CONN
final public static String TAG_REF_CONN(Code)



TAG_SEQUENCE_INFO
final public static String TAG_SEQUENCE_INFO(Code)



TAG_TABLE_PAIR
final public static String TAG_TABLE_PAIR(Code)



TAG_TARGET_CONN
final public static String TAG_TARGET_CONN(Code)



TAG_VIEW_INFO
final public static String TAG_VIEW_INFO(Code)



TAG_VIEW_PAIR
final public static String TAG_VIEW_PAIR(Code)




Constructor Detail
SchemaDiff
public SchemaDiff()(Code)



SchemaDiff
public SchemaDiff(WbConnection source, WbConnection target)(Code)
Create a new SchemaDiff for the given connections



SchemaDiff
public SchemaDiff(WbConnection source, WbConnection target, String xmlNameSpace)(Code)
Create a new SchemaDiff for the given connections with the given namespace to be used when writing the XML.
Parameters:
  source - The connection to the reference schema
Parameters:
  target - the connection to the target schema
Parameters:
  xmlNameSpace - the namespace to be used for the XML, may be null.




Method Detail
cancel
public void cancel()(Code)
Cancel the creation of the XML file
See Also:   SchemaDiff.isCancelled()



compareAll
public void compareAll() throws SQLException(Code)
Setup this SchemaDiff object to compare all tables that the user can access in the reference connection with all matching (=same name) tables in the target connection. This will retrieve all user tables from the reference (=source) connection and will match them to the tables in the target connection. When using compareAll() drop statements will be created for tables present in the target connection but not existing in the reference connection.
See Also:   SchemaDiff.setTables(List,List)
See Also:   SchemaDiff.setTables(List)



getCompareJdbcTypes
public boolean getCompareJdbcTypes()(Code)



getEncoding
public String getEncoding()(Code)
Return the encoding that is used in the encoding attribute of the XML tag



getIncludeForeignKeys
public boolean getIncludeForeignKeys()(Code)



getIncludeIndex
public boolean getIncludeIndex()(Code)



getIncludePrimaryKeys
public boolean getIncludePrimaryKeys()(Code)



getIncludeSequences
public boolean getIncludeSequences()(Code)



getIncludeTableConstraints
public boolean getIncludeTableConstraints()(Code)



getIncludeTableGrants
public boolean getIncludeTableGrants()(Code)



getMigrateTargetXml
public String getMigrateTargetXml()(Code)
Return the XML that describes how the target schema needs to be modified in order to get the same structure as the reference schema. For this, each defined table in the reference schema will be compared to the corresponding table in the target schema.
See Also:   TableDiff.getMigrateTargetXml



isCancelled
public boolean isCancelled()(Code)
Return if the XML generation has been cancelled true if #cancel() has been called



setCompareJdbcTypes
public void setCompareJdbcTypes(boolean flag)(Code)



setEncoding
public void setEncoding(String encoding)(Code)
Set the encoding that is used for writing the XML. This will be put into the



setExcludeTables
public void setExcludeTables(List<String> tables)(Code)
Define a list of table names that should not be compared. Tables in the reference/source database that match one of the names in this list will be skipped.



setIncludeForeignKeys
public void setIncludeForeignKeys(boolean flag)(Code)
Control whether foreign keys should be compared as well. The default is to compare foreign keys.



setIncludeIndex
public void setIncludeIndex(boolean flag)(Code)
Control whether index definitions should be compared as well. The default is to compare index definitions



setIncludePrimaryKeys
public void setIncludePrimaryKeys(boolean flag)(Code)
Control whether primary keys should be compared as well. The default is to compare primary keys.



setIncludeProcedures
public void setIncludeProcedures(boolean flag)(Code)



setIncludeSequences
public void setIncludeSequences(boolean flag)(Code)



setIncludeTableConstraints
public void setIncludeTableConstraints(boolean flag)(Code)
Control whether table constraints should be compared as well. The default is to not compare primary keys.



setIncludeTableGrants
public void setIncludeTableGrants(boolean flag)(Code)



setIncludeViews
public void setIncludeViews(boolean flag)(Code)



setMonitor
public void setMonitor(RowActionMonitor mon)(Code)
Set the workbench.storage.RowActionMonitor for reporting progress



setSchemas
public void setSchemas(String rSchema, String tSchema) throws SQLException(Code)
Setup this SchemaDiff object to compare all tables that the user can access in the reference connection with all matching (=same name) tables in the target connection. This will retrieve all user tables from the reference (=source) connection and will match them to the tables in the target connection. When using compareAll() drop statements will be created for tables present in the target connection but not existing in the reference connection.
See Also:   SchemaDiff.setTables(List,List)
See Also:   SchemaDiff.setTables(List)



setTableNames
public void setTableNames(List<String> referenceList, List<String> targetList) throws SQLException(Code)
Define table names to be compared. The table names in the passed lists will be converted to TableIdentifiers and then passed on to setTables(List, List) No name matching will take place. Thus it's possible to compare tables that might have different names but are supposed to be identical otherwise.
See Also:   SchemaDiff.setTables(List,List)
See Also:   SchemaDiff.compareAll()



setTables
public void setTables(List<TableIdentifier> referenceList, List<TableIdentifier> targetList) throws SQLException(Code)
Define the tables to be compared. They will be compared based on the position in the arrays (i.e. reference at index 0 will be compared to target at index 0...) No name matching will take place. Thus it's possible to compare tables that might have different names but are supposed to be identical otherwise.
See Also:   SchemaDiff.setTables(List)
See Also:   SchemaDiff.compareAll()



setTables
public void setTables(List<TableIdentifier> reference) throws SQLException(Code)
Define the reference tables to be compared with the matching tables (based on the name) in the target connection. The list has to contain objects of type workbench.db.TableIdentifier
See Also:   SchemaDiff.setTables(List,List)
See Also:   SchemaDiff.compareAll()



writeXml
public void writeXml(Writer out) throws IOException(Code)
Write the XML of the schema differences to the supplied writer. This writes some meta information about the compare, and then creates a TableDiff object for each pair of tables that needs to be compared. The output of TableDiff.getMigrateTargetXml will then be written into the writer.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.