Java Doc for AbstractMetaDataBasedSearchCallback.java in  » Testing » DbUnit » org » dbunit » database » search » 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 » Testing » DbUnit » org.dbunit.database.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.dbunit.util.search.AbstractNodesFilterSearchCallback
      org.dbunit.database.search.AbstractMetaDataBasedSearchCallback

All known Subclasses:   org.dbunit.database.search.ImportedAndExportedKeysSearchCallback,  org.dbunit.database.search.ImportedKeysSearchCallback,
AbstractMetaDataBasedSearchCallback
abstract public class AbstractMetaDataBasedSearchCallback extends AbstractNodesFilterSearchCallback (Code)
Super-class for the ISearchCallback that implements the getEdges() method using the database meta-data.
author:
   Felipe Leme
version:
   $Revision: 554 $
since:
   Aug 25, 2005


Field Summary
final protected static  intEXPORT
    
final protected static  int[]FK_INDEXES
    
final protected static  intIMPORT
    
final protected static  int[]PK_INDEXES
    
final protected static  int[]TABLENAME_INDEXES
     indexes of the column names on the MetaData result sets.

Constructor Summary
public  AbstractMetaDataBasedSearchCallback(IDatabaseConnection connection)
     Defautl constructor.

Method Summary
protected static  ForeignKeyRelationshipEdgecreateFKEdge(ResultSet rs, int type, String from, String to, String fkColumn, String pkColumn)
    
public  IDatabaseConnectiongetConnection()
     Get the connection where the edges will be calculated from.
protected  SortedSetgetNodesFromExportedKeys(Object node)
     Get the nodes using the reverse foreign key dependency, i.e, if table C has a FK for a table A, then getNodesFromExportedKeys(A) will return C.
NOTE: this method should be used only as an auxiliary method for sub-classes that also use getNodesFromImportedKeys() or something similiar, otherwise the generated sequence of tables might not work when inserted in the database (as some tables might be missing).
protected  SortedSetgetNodesFromImportAndExportKeys(Object node)
     Get the nodes using the both direct and reverse foreign key dependency, i.e, if table C has a FK for a table A and table A has a FK for a table B, then getNodesFromImportAndExportedKeys(A) will return B and C.
protected  SortedSetgetNodesFromImportedKeys(Object node)
     Get the nodes using the direct foreign key dependency, i.e, if table A has a FK for a table B, then getNodesFromImportedKeys(A) will return B.
protected  IEdgenewEdge(ResultSet rs, int type, String from, String to, String fkColumn, String pkColumn)
     This method can be overwritten by the sub-classes if they need to decorate the edge (for instance, providing an Edge that contains the primary and foreign keys used).

Field Detail
EXPORT
final protected static int EXPORT(Code)



FK_INDEXES
final protected static int[] FK_INDEXES(Code)



IMPORT
final protected static int IMPORT(Code)



PK_INDEXES
final protected static int[] PK_INDEXES(Code)



TABLENAME_INDEXES
final protected static int[] TABLENAME_INDEXES(Code)
indexes of the column names on the MetaData result sets.




Constructor Detail
AbstractMetaDataBasedSearchCallback
public AbstractMetaDataBasedSearchCallback(IDatabaseConnection connection)(Code)
Defautl constructor.
Parameters:
  connection - connection where the edges will be calculated from




Method Detail
createFKEdge
protected static ForeignKeyRelationshipEdge createFKEdge(ResultSet rs, int type, String from, String to, String fkColumn, String pkColumn) throws SearchException(Code)
Creates an edge representing a foreign key relationship between 2 tables.

Parameters:
  rs - database meta-data result set
Parameters:
  type - type of relationship (IMPORT or EXPORT)
Parameters:
  from - name of the table representing the 'from' node
Parameters:
  to - name of the table representing the 'to' node
Parameters:
  fkColumn - name of the foreign key column
Parameters:
  pkColumn - name of the primary key column edge representing the relationship between the 2 tables, according to the type
throws:
  SearchException - not thrown in this method (but might on sub-classes)



getConnection
public IDatabaseConnection getConnection()(Code)
Get the connection where the edges will be calculated from. the connection where the edges will be calculated from



getNodesFromExportedKeys
protected SortedSet getNodesFromExportedKeys(Object node) throws SearchException(Code)
Get the nodes using the reverse foreign key dependency, i.e, if table C has a FK for a table A, then getNodesFromExportedKeys(A) will return C.
NOTE: this method should be used only as an auxiliary method for sub-classes that also use getNodesFromImportedKeys() or something similiar, otherwise the generated sequence of tables might not work when inserted in the database (as some tables might be missing).

Parameters:
  node - table name tables with reverse FK dependency from node
throws:
  SearchException -



getNodesFromImportAndExportKeys
protected SortedSet getNodesFromImportAndExportKeys(Object node) throws SearchException(Code)
Get the nodes using the both direct and reverse foreign key dependency, i.e, if table C has a FK for a table A and table A has a FK for a table B, then getNodesFromImportAndExportedKeys(A) will return B and C.
Parameters:
  node - table name tables with reverse and direct FK dependency from node
throws:
  SearchException -



getNodesFromImportedKeys
protected SortedSet getNodesFromImportedKeys(Object node) throws SearchException(Code)
Get the nodes using the direct foreign key dependency, i.e, if table A has a FK for a table B, then getNodesFromImportedKeys(A) will return B.
Parameters:
  node - table name tables with direct FK dependency from node
throws:
  SearchException -



newEdge
protected IEdge newEdge(ResultSet rs, int type, String from, String to, String fkColumn, String pkColumn) throws SearchException(Code)
This method can be overwritten by the sub-classes if they need to decorate the edge (for instance, providing an Edge that contains the primary and foreign keys used).
Parameters:
  rs - database meta-data result set
Parameters:
  type - type of relationship (IMPORT or EXPORT)
Parameters:
  from - name of the table representing the 'from' node
Parameters:
  to - name of the table representing the 'to' node
Parameters:
  fkColumn - name of the foreign key column
Parameters:
  pkColumn - name of the primary key column edge representing the relationship between the 2 tables, according to the type
throws:
  SearchException - not thrown in this method (but might on sub-classes)



Fields inherited from org.dbunit.util.search.AbstractNodesFilterSearchCallback
final protected static int ALLOW_MODE(Code)(Java Doc)
final protected static int DENY_MODE(Code)(Java Doc)
final protected static int NO_MODE(Code)(Java Doc)
final protected Logger logger(Code)(Java Doc)

Methods inherited from org.dbunit.util.search.AbstractNodesFilterSearchCallback
protected Set getFilteredNodes()(Code)(Java Doc)
protected int getFilteringMode()(Code)(Java Doc)
public void nodeAdded(Object fromNode) throws SearchException(Code)(Java Doc)
public boolean searchNode(Object node) throws SearchException(Code)(Java Doc)
protected void setAllowedNodes(Set filteredNodes)(Code)(Java Doc)
protected void setAllowedNodes(Object[] filteredNodes)(Code)(Java Doc)
protected void setDeniedNodes(Set filteredNodes)(Code)(Java Doc)
protected void setDeniedNodes(Object[] filteredNodes)(Code)(Java Doc)

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.