Java Doc for DD_Version.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » catalog » 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 » db derby 10.2 » org.apache.derby.impl.sql.catalog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.sql.catalog.DD_Version

DD_Version
public class DD_Version implements Formatable(Code)
Generic code for upgrading data dictionaries. Currently has all minor version upgrade logic.

A word about minor vs. major upgraded. Minor upgrades must be backwards/forwards compatible. So they cannot version classes or introduce new classes. Major releases are only backwards compatible; they will run against an old database, but not the other way around. So they can introduce new classes, etc.
author:
   Rick



Field Summary
 intmajorVersionNumber
    

Constructor Summary
public  DD_Version()
     Public niladic constructor needed for Formatable interface.
 DD_Version(DataDictionaryImpl bootingDictionary, int majorVersionNumber)
     Construct a Version for the currently booting data dictionary.

Method Summary
 booleancheckVersion(int requiredMajorVersion, String feature)
     Check to see if a database has been upgraded to the required level in order to use a language feature.
Parameters:
  requiredMajorVersion - Data Dictionary major version
Parameters:
  feature - Non-null to throw an error, null to return the state of the version match.
protected  voiddropJDBCMetadataSPSes(TransactionController tc, boolean removeSYSIBMonly)
     Drop all jdbc metadata spses.
protected  voiddropSystemCatalog(TransactionController tc, CatalogRowFactory crf)
     Drop a System catalog.
protected  voiddropSystemCatalogDescription(TransactionController tc, TableDescriptor td)
     Remove the description of a System table from the data dictionary. This does not delete the conglomerates that hold the catalog or its indexes.
Parameters:
  tc - TransactionController
Parameters:
  td - Table descriptor for the catalog to drop.
protected  voidfillIndex(TransactionController tc, long heapConglomerateNumber, TabInfoImpl tabInfo, int indexNumber)
     Populates a new system index from the base system table.
public  intgetTypeFormatId()
     Get the formatID which corresponds to this class.
protected  voidmakeSystemCatalog(TransactionController tc, TabInfoImpl ti)
     Make a catalog.
final public  voidreadExternal(ObjectInput in)
     Read this object from a stream of stored objects.
public  StringtoString()
     Stringify this Version.
 voidupgradeIfNeeded(DD_Version dictionaryVersion, TransactionController tc, Properties startParams)
     Upgrade the data dictionary catalogs to the version represented by this DD_Version.
final public  voidwriteExternal(ObjectOutput out)
     Write this object to a stream of stored objects.

Field Detail
majorVersionNumber
int majorVersionNumber(Code)




Constructor Detail
DD_Version
public DD_Version()(Code)
Public niladic constructor needed for Formatable interface.



DD_Version
DD_Version(DataDictionaryImpl bootingDictionary, int majorVersionNumber)(Code)
Construct a Version for the currently booting data dictionary. The minor version is set by the subclass.
Parameters:
  bootingDictionary - The booting dictionary that needs to be upgraded.




Method Detail
checkVersion
boolean checkVersion(int requiredMajorVersion, String feature) throws StandardException(Code)
Check to see if a database has been upgraded to the required level in order to use a language feature.
Parameters:
  requiredMajorVersion - Data Dictionary major version
Parameters:
  feature - Non-null to throw an error, null to return the state of the version match. True if the database has been upgraded to the required level, false otherwise.



dropJDBCMetadataSPSes
protected void dropJDBCMetadataSPSes(TransactionController tc, boolean removeSYSIBMonly) throws StandardException(Code)
Drop all jdbc metadata spses. This it to ensure that we don't have any problems with old metadata queries that have outdated query text (the plans are always cleared out on upgrade time).
Parameters:
  tc - the xact
Parameters:
  removeSYSIBMonly - if true, remove storedprepared statements in the SYSIBM schema only; otherwise,remove stored prepared statements in all system schemas(including SYSIBM)
exception:
  StandardException - Standard Cloudscape error policy.



dropSystemCatalog
protected void dropSystemCatalog(TransactionController tc, CatalogRowFactory crf) throws StandardException(Code)
Drop a System catalog.
Parameters:
  tc - TransactionController
Parameters:
  crf - CatalogRowFactory for the catalog to drop.
exception:
  StandardException - Standard Cloudscape error policy.



dropSystemCatalogDescription
protected void dropSystemCatalogDescription(TransactionController tc, TableDescriptor td) throws StandardException(Code)
Remove the description of a System table from the data dictionary. This does not delete the conglomerates that hold the catalog or its indexes.
Parameters:
  tc - TransactionController
Parameters:
  td - Table descriptor for the catalog to drop.
exception:
  StandardException - Standard Cloudscape error policy.



fillIndex
protected void fillIndex(TransactionController tc, long heapConglomerateNumber, TabInfoImpl tabInfo, int indexNumber) throws StandardException(Code)
Populates a new system index from the base system table.
Parameters:
  tc - transaction controller
Parameters:
  heapConglomerateNumber - identifies system table to Store
Parameters:
  tabInfo - describes base system table
Parameters:
  indexNumber - index to populate
exception:
  StandardException - Thrown on failure



getTypeFormatId
public int getTypeFormatId()(Code)
Get the formatID which corresponds to this class. Map to the 5.0 version identifier so that 5.0 will understand this object when we write it out in soft upgrade mode. CS 5.0 will de-serialize it correctly. When we are writing out a 5.1 version number we write out the 5.1 version just to ensure no problems. the formatID of this class



makeSystemCatalog
protected void makeSystemCatalog(TransactionController tc, TabInfoImpl ti) throws StandardException(Code)
Make a catalog.
Parameters:
  tc - TransactionController
exception:
  StandardException - Standard Cloudscape error policy.



readExternal
final public void readExternal(ObjectInput in) throws IOException(Code)
Read this object from a stream of stored objects. Set the minor version. Ignore the major version.
Parameters:
  in - read this.
exception:
  IOException - on error



toString
public String toString()(Code)
Stringify this Version. String representation of this Version.



upgradeIfNeeded
void upgradeIfNeeded(DD_Version dictionaryVersion, TransactionController tc, Properties startParams) throws StandardException(Code)
Upgrade the data dictionary catalogs to the version represented by this DD_Version.
Parameters:
  dictionaryVersion - the version of the data dictionary tables.
exception:
  StandardException - Ooops



writeExternal
final public void writeExternal(ObjectOutput out) throws IOException(Code)
Write this object to a stream of stored objects. Write out the minor version which is bumped across minor release. Just to be safe, write out the major version too. This will allow us to do versioning of a specific Version impl in the future.
Parameters:
  out - write bytes here.
exception:
  IOException - on error



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.