Java Doc for SchemaManager.java in  » Database-DBMS » hsql » org » hsqldb » 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 DBMS » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.SchemaManager

SchemaManager
public class SchemaManager (Code)
Manages all SCHEMA related database objects
author:
   fredt@users
version:
   1.8.0
since:
   1.8.0

Inner Class :public class Schema

Field Summary
final static  StringDEFINITION_SCHEMA
    
final static  StringINFORMATION_SCHEMA
    
static  HsqlNameINFORMATION_SCHEMA_HSQLNAME
    
final static  StringPUBLIC_SCHEMA
    
final static  StringSYSTEM_SCHEMA
    
static  HsqlNameSYSTEM_SCHEMA_HSQLNAME
    
 Databasedatabase
    
 HsqlNamedefaultSchemaHsqlName
    
 HashMappedListschemaMap
    

Constructor Summary
 SchemaManager(Database database)
    

Method Summary
public  IteratorallSequencesIterator()
    
public  IteratorallTablesIterator()
    
 voidcheckCascadeDropViews(View view, boolean cascade)
     Throws if the view is referenced in a view.
 voidcheckCascadeDropViews(Table table, boolean cascade)
     Throws if the table is referenced in a view.
 voidcheckCascadeDropViews(NumberSequence sequence, boolean cascade)
     Throws if the sequence is referenced in a view.
 voidcheckColumnIsInView(Table table, String column)
     Throws if the column is referenced in a view.
 voidcheckConstraintExists(String name, String schemaName, boolean yes)
    
 voidcheckIndexExists(String name, String schemaName, boolean yes)
    
 voidcheckTriggerExists(String name, String schemaName, boolean yes)
     Checks if a Trigger with given name either exists or does not, based on the value of the argument, yes.
 voidcheckUserTableNotExists(Session session, String tableName, String schema)
    
 voidcheckUserViewNotExists(Session session, String viewName, String schema)
    
 voidclearStructures()
    
 voidclearTempTables(Session exclude, Table table)
     Clear copies of a temporary table from all sessions apart from one.
 voidcreateSchema(String name, boolean isQuoted)
    
 NumberSequencecreateSequence(HsqlName hsqlname, long start, long increment, int type)
    
 voiddropIndex(Session session, String indexname, String schema, boolean ifExists)
     Drops the index with the specified name.
 voiddropSchema(String name, boolean cascade)
    
 voiddropSequence(NumberSequence sequence)
    
 voiddropTable(Session session, String name, String schemaName, boolean ifExists, boolean isView, boolean cascade)
     Drops the specified user-defined view or table from this Database object.
 voiddropTable(Table table, boolean cascade)
    
 voiddropTrigger(Session session, String name, String schemaName)
     Drops a trigger with the specified name in the given context.
public  NumberSequencefindSequence(String name, String schemaName)
     Returns the specified Sequence visible within the context of the specified Session.
 TablefindUserTable(Session session, String name, String schemaName)
     Returns the specified user-defined table or view visible within the context of the specified schema.
 TablefindUserTableForIndex(Session session, String name, String schemaName)
     Returns the table that has an index with the given name and schema.
 IteratorfullSchemaNamesIterator()
    
public  HsqlArrayListgetAllTables()
     Returns an HsqlArrayList containing references to all non-system tables and views.
 HsqlNamegetDefaultSchemaHsqlName()
    
public  StringgetDefaultSchemaName()
    
 HsqlNamegetSchemaHsqlName(String name)
     If schemaName is null, return the current schema name, else return the HsqlName object for the schema.
 StringgetSchemaName(String name)
    
 NumberSequencegetSequence(String name, String schemaName)
    
public  TablegetTable(Session session, String name, String schema)
     Returns the specified user-defined table or view visible within the context of the specified Session, or any system table of the given name.
 intgetTableIndex(Table table)
     Returns index of a table or view in the HsqlArrayList that contains the table objects for this Database.
public  HashMappedListgetTables(String schema)
    
public  TablegetUserTable(Session session, String name, String schema)
     Returns the specified user-defined table or view visible within the context of the specified Session.
 View[]getViewsWithSequence(NumberSequence sequence)
     Returns an array of views that reference a sequence.
public  booleanisSystemSchema(HsqlName schema)
    
 voidlinkTable(Table t)
     Registers the specified table or view with this Database.
 voidlogSequences(Session session, Logger logger)
    
 voidrecompileViews(Table table)
     After addition or removal of columns and indexes all views that reference the table should be recompiled.
 voidregisterConstraintName(String name, HsqlName tableName)
    
 voidregisterIndexName(String name, HsqlName tableName)
    
 voidregisterTriggerName(String name, HsqlName tableName)
    
 voidremoveConstraintName(String name, HsqlName tableName)
    
 voidremoveConstraintNames(HsqlName tableName)
    
 voidremoveExportedKeys(Table toDrop)
     Removes any foreign key Constraint objects (exported keys) held by any tables referenced by the specified table.
 voidremoveIndexName(String name, HsqlName tableName)
    
 voidremoveIndexNames(HsqlName tableName)
    
 voidrenameIndex(String oldName, String newName, HsqlName tableName)
    
 voidrenameSchema(String name, String newName, boolean isQuoted)
    
 voidrenameTable(Session session, Table table, String newName, boolean isQuoted)
    
 booleanschemaExists(String name)
    
 IteratorsequenceIterator(String schema)
    
 voidsetTable(int index, Table table)
    
public  IteratortablesIterator(String schema)
    
 HsqlNametoSchemaHsqlName(String name)
    
public  IteratoruserSchemaNameIterator()
    

Field Detail
DEFINITION_SCHEMA
final static String DEFINITION_SCHEMA(Code)



INFORMATION_SCHEMA
final static String INFORMATION_SCHEMA(Code)



INFORMATION_SCHEMA_HSQLNAME
static HsqlName INFORMATION_SCHEMA_HSQLNAME(Code)



PUBLIC_SCHEMA
final static String PUBLIC_SCHEMA(Code)



SYSTEM_SCHEMA
final static String SYSTEM_SCHEMA(Code)



SYSTEM_SCHEMA_HSQLNAME
static HsqlName SYSTEM_SCHEMA_HSQLNAME(Code)



database
Database database(Code)



defaultSchemaHsqlName
HsqlName defaultSchemaHsqlName(Code)



schemaMap
HashMappedList schemaMap(Code)




Constructor Detail
SchemaManager
SchemaManager(Database database)(Code)




Method Detail
allSequencesIterator
public Iterator allSequencesIterator()(Code)



allTablesIterator
public Iterator allTablesIterator()(Code)



checkCascadeDropViews
void checkCascadeDropViews(View view, boolean cascade) throws HsqlException(Code)
Throws if the view is referenced in a view.



checkCascadeDropViews
void checkCascadeDropViews(Table table, boolean cascade) throws HsqlException(Code)
Throws if the table is referenced in a view.



checkCascadeDropViews
void checkCascadeDropViews(NumberSequence sequence, boolean cascade) throws HsqlException(Code)
Throws if the sequence is referenced in a view.



checkColumnIsInView
void checkColumnIsInView(Table table, String column) throws HsqlException(Code)
Throws if the column is referenced in a view.



checkConstraintExists
void checkConstraintExists(String name, String schemaName, boolean yes) throws HsqlException(Code)



checkIndexExists
void checkIndexExists(String name, String schemaName, boolean yes) throws HsqlException(Code)



checkTriggerExists
void checkTriggerExists(String name, String schemaName, boolean yes) throws HsqlException(Code)
Checks if a Trigger with given name either exists or does not, based on the value of the argument, yes.



checkUserTableNotExists
void checkUserTableNotExists(Session session, String tableName, String schema) throws HsqlException(Code)

throws:
  HsqlException - if exists



checkUserViewNotExists
void checkUserViewNotExists(Session session, String viewName, String schema) throws HsqlException(Code)

throws:
  HsqlException - if exists.



clearStructures
void clearStructures()(Code)



clearTempTables
void clearTempTables(Session exclude, Table table)(Code)
Clear copies of a temporary table from all sessions apart from one.



createSchema
void createSchema(String name, boolean isQuoted) throws HsqlException(Code)



createSequence
NumberSequence createSequence(HsqlName hsqlname, long start, long increment, int type) throws HsqlException(Code)



dropIndex
void dropIndex(Session session, String indexname, String schema, boolean ifExists) throws HsqlException(Code)
Drops the index with the specified name.



dropSchema
void dropSchema(String name, boolean cascade) throws HsqlException(Code)



dropSequence
void dropSequence(NumberSequence sequence) throws HsqlException(Code)



dropTable
void dropTable(Session session, String name, String schemaName, boolean ifExists, boolean isView, boolean cascade) throws HsqlException(Code)
Drops the specified user-defined view or table from this Database object.

The process of dropping a table or view includes:

  1. checking that the specified Session's currently connected User has the right to perform this operation and refusing to proceed if not by throwing.
  2. checking for referential constraints that conflict with this operation and refusing to proceed if they exist by throwing.
  3. removing the specified Table from this Database object.
  4. removing any exported foreign keys Constraint objects held by any tables referenced by the table to be dropped. This is especially important so that the dropped Table ceases to be referenced, eventually allowing its full garbage collection.


Parameters:
  name - of the table or view to drop
Parameters:
  ifExists - if true and if the Table to drop does not exist, failsilently, else throw
Parameters:
  isView - true if the name argument refers to a View
Parameters:
  session - the connected context in which to perform thisoperation
throws:
  HsqlException - if any of the checks listed above fail




dropTable
void dropTable(Table table, boolean cascade) throws HsqlException(Code)



dropTrigger
void dropTrigger(Session session, String name, String schemaName) throws HsqlException(Code)
Drops a trigger with the specified name in the given context.



findSequence
public NumberSequence findSequence(String name, String schemaName) throws HsqlException(Code)
Returns the specified Sequence visible within the context of the specified Session.



findUserTable
Table findUserTable(Session session, String name, String schemaName)(Code)
Returns the specified user-defined table or view visible within the context of the specified schema. It excludes system tables. Returns null if the table does not exist in the context.



findUserTableForIndex
Table findUserTableForIndex(Session session, String name, String schemaName)(Code)
Returns the table that has an index with the given name and schema.



fullSchemaNamesIterator
Iterator fullSchemaNamesIterator()(Code)
Iterator includes INFORMATION_SCHEMA



getAllTables
public HsqlArrayList getAllTables()(Code)
Returns an HsqlArrayList containing references to all non-system tables and views. This includes all tables and views registered with this Database.



getDefaultSchemaHsqlName
HsqlName getDefaultSchemaHsqlName()(Code)



getDefaultSchemaName
public String getDefaultSchemaName()(Code)



getSchemaHsqlName
HsqlName getSchemaHsqlName(String name) throws HsqlException(Code)
If schemaName is null, return the current schema name, else return the HsqlName object for the schema. If schemaName does not exist, throw.



getSchemaName
String getSchemaName(String name) throws HsqlException(Code)
Same as above, but return string



getSequence
NumberSequence getSequence(String name, String schemaName) throws HsqlException(Code)



getTable
public Table getTable(Session session, String name, String schema) throws HsqlException(Code)
Returns the specified user-defined table or view visible within the context of the specified Session, or any system table of the given name. It excludes any temp tables created in other Sessions. Throws if the table does not exist in the context.



getTableIndex
int getTableIndex(Table table)(Code)
Returns index of a table or view in the HsqlArrayList that contains the table objects for this Database.
Parameters:
  table - the Table object the index of the specified table or view, or -1 if not found



getTables
public HashMappedList getTables(String schema)(Code)



getUserTable
public Table getUserTable(Session session, String name, String schema) throws HsqlException(Code)
Returns the specified user-defined table or view visible within the context of the specified Session. It excludes system tables and any temp tables created in different Sessions. Throws if the table does not exist in the context.



getViewsWithSequence
View[] getViewsWithSequence(NumberSequence sequence)(Code)
Returns an array of views that reference a sequence.



isSystemSchema
public boolean isSystemSchema(HsqlName schema)(Code)
is a schema read-only



linkTable
void linkTable(Table t)(Code)
Registers the specified table or view with this Database.



logSequences
void logSequences(Session session, Logger logger) throws HsqlException(Code)



recompileViews
void recompileViews(Table table) throws HsqlException(Code)
After addition or removal of columns and indexes all views that reference the table should be recompiled.



registerConstraintName
void registerConstraintName(String name, HsqlName tableName) throws HsqlException(Code)



registerIndexName
void registerIndexName(String name, HsqlName tableName) throws HsqlException(Code)



registerTriggerName
void registerTriggerName(String name, HsqlName tableName) throws HsqlException(Code)



removeConstraintName
void removeConstraintName(String name, HsqlName tableName) throws HsqlException(Code)



removeConstraintNames
void removeConstraintNames(HsqlName tableName)(Code)



removeExportedKeys
void removeExportedKeys(Table toDrop)(Code)
Removes any foreign key Constraint objects (exported keys) held by any tables referenced by the specified table.

This method is called as the last step of a successful call to dropTable() in order to ensure that the dropped Table ceases to be referenced when enforcing referential integrity.
Parameters:
  toDrop - The table to which other tables may be holding keys.This is a table that is in the process of being dropped.




removeIndexName
void removeIndexName(String name, HsqlName tableName) throws HsqlException(Code)



removeIndexNames
void removeIndexNames(HsqlName tableName)(Code)



renameIndex
void renameIndex(String oldName, String newName, HsqlName tableName) throws HsqlException(Code)



renameSchema
void renameSchema(String name, String newName, boolean isQuoted) throws HsqlException(Code)



renameTable
void renameTable(Session session, Table table, String newName, boolean isQuoted) throws HsqlException(Code)



schemaExists
boolean schemaExists(String name)(Code)



sequenceIterator
Iterator sequenceIterator(String schema)(Code)



setTable
void setTable(int index, Table table)(Code)



tablesIterator
public Iterator tablesIterator(String schema)(Code)



toSchemaHsqlName
HsqlName toSchemaHsqlName(String name)(Code)



userSchemaNameIterator
public Iterator userSchemaNameIterator()(Code)



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.