Java Doc for DatabaseSchema.java in  » Database-JDBC-Connection-Pool » sequoia-2.10.9 » org » continuent » sequoia » common » sql » schema » 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 JDBC Connection Pool » sequoia 2.10.9 » org.continuent.sequoia.common.sql.schema 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.continuent.sequoia.common.sql.schema.DatabaseSchema

DatabaseSchema
public class DatabaseSchema implements Serializable(Code)
A DatabaseSchema describes all the tables and columns of a database.
author:
   Emmanuel Cecchet
author:
   Nicolas Modrzyk
version:
   1.0



Constructor Summary
public  DatabaseSchema(String vdbName)
     Creates a new DatabaseSchema instance.
public  DatabaseSchema(String vdbName, int nbOfTables)
     Creates a new DatabaseSchema instance with a specified number of tables.
public  DatabaseSchema(DatabaseSchema schema)
     Creates a new DatabaseSchema instance from an existing database schema (the schema is cloned).

Method Summary
public synchronized  voidaddProcedure(DatabaseProcedure procedure)
     Adds a DatabaseProcedure describing a procedure of the database.
public synchronized  voidaddTable(DatabaseTable table)
     Adds a DatabaseTable describing a table of the database.
public  booleanallTablesAreUnlockedOrLockedByTransaction(AbstractRequest request)
     Returns true if all tables are not locked by anyone.
public  booleanequals(Object other)
     Two DatabaseSchema are considered equal if they have the same tables and the same procedures.
public  TransactionLogicalLockgetLock()
     Returns the lock for this table.
public  DatabaseProceduregetProcedure(String procedureKey)
     Returns the DatabaseProcedure object matching the given procedure name or null if not found.
public  DatabaseProceduregetProcedure(DatabaseProcedure procedure)
     Returns the DatabaseProcedure object matching the given procedure or null if not found.
public  HashMapgetProcedures()
     Returns an HashMap of DatabaseProcedure objects describing the database.
public  DatabaseTablegetTable(String tableName)
     Returns the DatabaseTable object matching the given table name or null if not found.
public  DatabaseTablegetTable(String tableName, boolean isCaseSensitive)
     Returns the DatabaseTable object matching the given table name or null if not found.
public synchronized  HashMapgetTables()
     Returns an HashMap of DatabaseTable objects describing the database.
final public  StringgetVirtualDatabaseName()
     Returns the virtual database name value.
public  StringgetXml()
     Get xml information about this schema.
public  booleanhasATableLockedByTransaction(long transactionId)
     Returns true if the given transaction locks (or wait for a lock) on any of the table of this schema.
public  booleanhasProcedure(String procedureName, int nbOfParameters)
     Returns true if the given ProcedureName is found in this schema.
public  booleanhasTable(String tableName)
     Returns true if the given TableName is found in this schema.
public  booleanisCompatibleSubset(DatabaseSchema other)
     Checks if this DatabaseSchema is a compatible subset of a given schema.
public  booleanisCompatibleWith(DatabaseSchema other)
     Checks if this DatabaseSchema is compatible with the given schema.
public  ListlockAllTables(AbstractRequest request)
     Lock all tables that are not already locked by this transaction (assumes that locks are free).
public  voidmergeSchema(DatabaseSchema databaseSchema)
     Merges the given schema with the current one.
public  voidreleaseLocksOnAllTables(long transactionId)
     Release locks held by the given transaction on all tables.
public synchronized  booleanremoveProcedure(DatabaseProcedure procedure)
     removes a DatabaseProcedure describing a procedure of the database.
public synchronized  booleanremoveTable(DatabaseTable table)
     Removes a DatabaseTable describing a table of the database.
public synchronized  voidremoveTableFromDependingTables(DatabaseTable table)
     Removes a DatabaseTable from the depending tables list of all tables in the schema.
public  voidsetLocks(DatabaseSchema oldSchema)
     When the database schema is reloaded, the locks held by active transactions must be retained.
public  voidupdateSchema(DatabaseSchema databaseSchema)
     Updates the given schema with the current one.


Constructor Detail
DatabaseSchema
public DatabaseSchema(String vdbName)(Code)
Creates a new DatabaseSchema instance.
Parameters:
  vdbName - the virtual database name this schema represents



DatabaseSchema
public DatabaseSchema(String vdbName, int nbOfTables)(Code)
Creates a new DatabaseSchema instance with a specified number of tables.
Parameters:
  vdbName - the virtual database name this schema represents
Parameters:
  nbOfTables - an int value



DatabaseSchema
public DatabaseSchema(DatabaseSchema schema)(Code)
Creates a new DatabaseSchema instance from an existing database schema (the schema is cloned).
Parameters:
  schema - the existing database schema




Method Detail
addProcedure
public synchronized void addProcedure(DatabaseProcedure procedure)(Code)
Adds a DatabaseProcedure describing a procedure of the database.
Parameters:
  procedure - the procedure to add



addTable
public synchronized void addTable(DatabaseTable table)(Code)
Adds a DatabaseTable describing a table of the database.
Parameters:
  table - the table to add



allTablesAreUnlockedOrLockedByTransaction
public boolean allTablesAreUnlockedOrLockedByTransaction(AbstractRequest request)(Code)
Returns true if all tables are not locked by anyone.
Parameters:
  request - request trying to execute (to indicate if it is inautocommit mode and the transaction id) true if all tables are unlocked.



equals
public boolean equals(Object other)(Code)
Two DatabaseSchema are considered equal if they have the same tables and the same procedures.
Parameters:
  other - the object to compare with true if the schemas are equals



getLock
public TransactionLogicalLock getLock()(Code)
Returns the lock for this table. a TransactionLogicalLock instance



getProcedure
public DatabaseProcedure getProcedure(String procedureKey)(Code)
Returns the DatabaseProcedure object matching the given procedure name or null if not found.
Parameters:
  procedureKey - the procedure key to look for a DatabaseProcedure value or null



getProcedure
public DatabaseProcedure getProcedure(DatabaseProcedure procedure)(Code)
Returns the DatabaseProcedure object matching the given procedure or null if not found.
Parameters:
  procedure - the procedure to look for a DatabaseProcedure value or null



getProcedures
public HashMap getProcedures()(Code)
Returns an HashMap of DatabaseProcedure objects describing the database. The key entry is given by DatabaseProcedure.getKey(). an HashMap of DatabaseProcedure



getTable
public DatabaseTable getTable(String tableName)(Code)
Returns the DatabaseTable object matching the given table name or null if not found.
Parameters:
  tableName - the table name to look for a DatabaseTable value or null



getTable
public DatabaseTable getTable(String tableName, boolean isCaseSensitive)(Code)
Returns the DatabaseTable object matching the given table name or null if not found. An extra boolean indicates if table name matching is case sensitive or not.
Parameters:
  tableName - the table name to look for
Parameters:
  isCaseSensitive - true if name matching must be case sensitive a DatabaseTable value or null



getTables
public synchronized HashMap getTables()(Code)
Returns an HashMap of DatabaseTable objects describing the database. The key is the table name. an HashMap of DatabaseTable



getVirtualDatabaseName
final public String getVirtualDatabaseName()(Code)
Returns the virtual database name value. Returns the virtual database name.



getXml
public String getXml()(Code)
Get xml information about this schema. xml formatted information on this database schema.



hasATableLockedByTransaction
public boolean hasATableLockedByTransaction(long transactionId)(Code)
Returns true if the given transaction locks (or wait for a lock) on any of the table of this schema.
Parameters:
  transactionId - the transaction identifier true if the transaction locks or wait for a lock on at least onetable



hasProcedure
public boolean hasProcedure(String procedureName, int nbOfParameters)(Code)
Returns true if the given ProcedureName is found in this schema.
Parameters:
  procedureName - the name of the procedure you are looking for
Parameters:
  nbOfParameters - number of parameters of the stored procecdure true if the procedure has been found



hasTable
public boolean hasTable(String tableName)(Code)
Returns true if the given TableName is found in this schema.
Parameters:
  tableName - the name of the table you are looking for true if the table has been found



isCompatibleSubset
public boolean isCompatibleSubset(DatabaseSchema other)(Code)
Checks if this DatabaseSchema is a compatible subset of a given schema. It means that all tables in this schema must be present with the same definition in the other schema.
Parameters:
  other - the object to compare with true if the two schemas are compatible



isCompatibleWith
public boolean isCompatibleWith(DatabaseSchema other)(Code)
Checks if this DatabaseSchema is compatible with the given schema. It means that all tables in this schema that are common with the other schema must be identical.
Parameters:
  other - the object to compare with true if the two schemas are compatible



lockAllTables
public List lockAllTables(AbstractRequest request)(Code)
Lock all tables that are not already locked by this transaction (assumes that locks are free).
Parameters:
  request - request trying to execute (to indicate if it is inautocommit mode and the transaction id) list of locks acquired (excluding locks already acquired beforethis method was called)



mergeSchema
public void mergeSchema(DatabaseSchema databaseSchema) throws SQLException(Code)
Merges the given schema with the current one. All missing tables or columns are added if no conflict is detected. An exception is thrown if the given schema definition conflicts with the current one.
Parameters:
  databaseSchema - the schema to merge
throws:
  SQLException - if the schemas conflict



releaseLocksOnAllTables
public void releaseLocksOnAllTables(long transactionId)(Code)
Release locks held by the given transaction on all tables.
Parameters:
  transactionId - the transaction identifier



removeProcedure
public synchronized boolean removeProcedure(DatabaseProcedure procedure)(Code)
removes a DatabaseProcedure describing a procedure of the database.
Parameters:
  procedure - to remove true if the procedure was successfully removed



removeTable
public synchronized boolean removeTable(DatabaseTable table)(Code)
Removes a DatabaseTable describing a table of the database.
Parameters:
  table - the table to remove true if the table was successfully removed



removeTableFromDependingTables
public synchronized void removeTableFromDependingTables(DatabaseTable table)(Code)
Removes a DatabaseTable from the depending tables list of all tables in the schema.
Parameters:
  table - the table to remove



setLocks
public void setLocks(DatabaseSchema oldSchema)(Code)
When the database schema is reloaded, the locks held by active transactions must be retained.
Parameters:
  oldSchema - the previous version of the schema.



updateSchema
public void updateSchema(DatabaseSchema databaseSchema)(Code)
Updates the given schema with the current one. All missing tables or columns are added and if the given schema definition conflicts with the current one, the current schema definition is overriden with the one that is provided.
Parameters:
  databaseSchema - the schema to merge



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.