Java Doc for JetspeedDDLUtil.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » serializer » 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 » Portal » jetspeed 2.1.3 » org.apache.jetspeed.serializer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.jetspeed.serializer.JetspeedDDLUtil

JetspeedDDLUtil
public class JetspeedDDLUtil (Code)
Jetspeed DDLUtil

The Jetspeed DDL Utility is capabale of extracting existing schema information as well as recreating databases.
author:
   Hajo Birthelmer
version:
   $Id: $



Field Summary
final public static  StringDATASOURCE_CLASS
    
final public static  StringDATASOURCE_DATABASENAME
    
final public static  StringDATASOURCE_DRIVER
    
final public static  StringDATASOURCE_PASSWORD
    
final public static  StringDATASOURCE_URL
    
final public static  StringDATASOURCE_USERNAME
    
 Mapparameters
    
 JdbcTypeCategoryEnumtemEnum
    
 PlatformUtilsutils
    
 StringWriterwriter
    

Constructor Summary
public  JetspeedDDLUtil()
    

Method Summary
public  voidalterDatabase(Database model)
     Alter an existing database from the given model.
protected  PlatformconnectToDatabase(DataSource dataSource)
    
protected  PlatformconnectToDatabase(String databaseType)
    
public  voidcreateDatabase(Database model)
     Creates a new database from the given model.
protected  DatabasecreateDatabaseSchemaFromString(String dbDef)
    
protected  DatabasecreateDatabaseSchemaFromXML(String fileName)
    
protected  voiddropDatabase()
     Drops the tables defined in the database model.
protected  voiddropDatabaseTables(Database model)
     Drops the tables defined in the database model on this connection.
public  DataSourcegetDataSource()
    
protected  DatabasegetModel()
     Returns the database model.
public  PlatformgetPlatform()
    
protected  ObjectgetPropertyValue(DynaBean bean, String propName)
     Determines the value of the bean's property that has the given name.
public  ListgetRows(String tableName)
    
public  StringgetSelectQueryForAllString(Table table)
    
public  voidinit(Map parameters)
    
protected  DatabaseinsertData(Database model, String dataXml)
    

Inserts data into the database.

protected  DatabaseinsertData(String dataXml)
     Inserts data into the database.
public  booleanisDatabaseSupported(String driverName, String jdbcConnectionUrl)
     Tries to determine whether a the jdbc driver and connection url re supported.
public  DatabasereadModelFromDatabase(String databaseName)
     Reads the database model from a live database.
public  voidstartUp()
    
public  voidtearDown()
    
protected  voidupdateDatabaseSchema(Database targetModel, boolean alterDb)
    

Update a given database schema to match the schema of targetModel If alterDB is true, the routine attempts to modify the existing database shcema while preserving the data (as much as possible).

public  voidwriteDatabaseSchematoFile(String fileName)
    

Field Detail
DATASOURCE_CLASS
final public static String DATASOURCE_CLASS(Code)



DATASOURCE_DATABASENAME
final public static String DATASOURCE_DATABASENAME(Code)



DATASOURCE_DRIVER
final public static String DATASOURCE_DRIVER(Code)



DATASOURCE_PASSWORD
final public static String DATASOURCE_PASSWORD(Code)



DATASOURCE_URL
final public static String DATASOURCE_URL(Code)



DATASOURCE_USERNAME
final public static String DATASOURCE_USERNAME(Code)



parameters
Map parameters(Code)



temEnum
JdbcTypeCategoryEnum temEnum(Code)



utils
PlatformUtils utils(Code)



writer
StringWriter writer(Code)




Constructor Detail
JetspeedDDLUtil
public JetspeedDDLUtil()(Code)




Method Detail
alterDatabase
public void alterDatabase(Database model) throws SerializerException(Code)
Alter an existing database from the given model. Data is preserved as much as possible
Parameters:
  model - The new database model



connectToDatabase
protected Platform connectToDatabase(DataSource dataSource)(Code)

Create a database connection (platform instance) from a data source


Parameters:
  dataSource -



connectToDatabase
protected Platform connectToDatabase(String databaseType)(Code)

Create a database connection (platform instance) from a (case insensitive) database type (like MySQL)


Parameters:
  dataSource -



createDatabase
public void createDatabase(Database model) throws SerializerException(Code)
Creates a new database from the given model. Note that all data is LOST
Parameters:
  model - The new database model



createDatabaseSchemaFromString
protected Database createDatabaseSchemaFromString(String dbDef)(Code)
Parses the database defined in the given XML definition String and creates a database schema (model) object
Parameters:
  dbDef - The database XML definition The database model



createDatabaseSchemaFromXML
protected Database createDatabaseSchemaFromXML(String fileName)(Code)
Parses the database defined in the given XML file and creates a database schema (model) object
Parameters:
  dbDef - The database XML definition The database model



dropDatabase
protected void dropDatabase() throws DatabaseOperationException(Code)
Drops the tables defined in the database model.



dropDatabaseTables
protected void dropDatabaseTables(Database model) throws DatabaseOperationException(Code)
Drops the tables defined in the database model on this connection.
Parameters:
  model - The database model



getDataSource
public DataSource getDataSource()(Code)



getModel
protected Database getModel()(Code)
Returns the database model. The model



getPlatform
public Platform getPlatform()(Code)



getPropertyValue
protected Object getPropertyValue(DynaBean bean, String propName)(Code)
Determines the value of the bean's property that has the given name. Depending on the case-setting of the current builder, the case of teh name is considered or not.
Parameters:
  bean - The bean
Parameters:
  propName - The name of the property The value



getRows
public List getRows(String tableName)(Code)



getSelectQueryForAllString
public String getSelectQueryForAllString(Table table)(Code)



init
public void init(Map parameters)(Code)
Initializes the datasource and the connection (platform)



insertData
protected Database insertData(Database model, String dataXml) throws DatabaseOperationException(Code)

Inserts data into the database. Data is expected to be in the format


Parameters:
  model - The database model
Parameters:
  dataXml - The data xml The database



insertData
protected Database insertData(String dataXml) throws DatabaseOperationException(Code)
Inserts data into the database.
Parameters:
  dataXml - The data xml The database



isDatabaseSupported
public boolean isDatabaseSupported(String driverName, String jdbcConnectionUrl)(Code)
Tries to determine whether a the jdbc driver and connection url re supported.
Parameters:
  driverName - The fully qualified name of the JDBC driver
Parameters:
  jdbcConnectionUrl - The connection url True if this driver/url is supported



readModelFromDatabase
public Database readModelFromDatabase(String databaseName)(Code)
Reads the database model from a live database.
Parameters:
  platform - The physical database connection
Parameters:
  databaseName - The name of the resulting database The model



startUp
public void startUp()(Code)



tearDown
public void tearDown()(Code)



updateDatabaseSchema
protected void updateDatabaseSchema(Database targetModel, boolean alterDb) throws SerializerException(Code)

Update a given database schema to match the schema of targetModel If alterDB is true, the routine attempts to modify the existing database shcema while preserving the data (as much as possible). If not, the existing tables are dropped prior to recreate
Parameters:
  targetModel - The new database model
Parameters:
  alterDb - if true, try to use alter database and preserve data




writeDatabaseSchematoFile
public void writeDatabaseSchematoFile(String fileName)(Code)
Parses the database defined in the given XML file and creates a database schema (model) object
Parameters:
  fileName -



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.