Java Doc for SpringLiquibase.java in  » Database-Client » LiquiBase » liquibase » spring » 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 Client » LiquiBase » liquibase.spring 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   liquibase.spring.SpringLiquibase

All known Subclasses:   liquibase.spring.SpringMigrator,
SpringLiquibase
public class SpringLiquibase implements InitializingBean,BeanNameAware,ResourceLoaderAware(Code)
A Spring-ified wrapper for Liquibase. Example Configuration:

This Spring configuration example will cause liquibase to run automatically when the Spring context is initialized. It will load db-changelog.xml from the classpath and apply it against myDataSource.

 <bean id="myLiquibase"
 class="liquibase.spring.SpringLiquibase"
 >
 <property name="dataSource" ref="myDataSource" />
 <property name="changeLog" value="classpath:db-changelog.xml" />
 <!-- The following configuration options are optional -->
 <property name="executeEnabled" value="true" />
 <!--
 If set to true, writeSqlFileEnabled will write the generated
 SQL to a file before executing it.
 -->
 <property name="writeSqlFileEnabled" value="true" />
 <!--
 sqlOutputDir specifies the directory into which the SQL file
 will be written, if so configured.
 -->
 <property name="sqlOutputDir" value="c:\sql" />
 </bean>
 

author:
   Rob Schoening

Inner Class :public class SpringResourceOpener implements FileOpener


Constructor Summary
public  SpringLiquibase()
    

Method Summary
public  voidafterPropertiesSet()
     Executed automatically when the bean is initialized.
protected  voidexecuteSql(Liquibase liquibase)
     This method will actually execute the changesets.
public  StringgetBeanName()
     Gets the Spring-name of this instance.
public  StringgetChangeLog()
     Returns a Resource that is able to resolve to a file or classpath resource.
public  StringgetContexts()
    
public  DataSourcegetDataSource()
     The DataSource that liquibase will use to perform the migration.
public  StringgetDatabaseProductName()
    
public  StringgetExecuteDisabledWarningMessage()
     Returns a warning message that will be written out to the log.
public  ResourceLoadergetResourceLoader()
    
public  FilegetSqlOutputDir()
     Returns the output directory into which a SQL file will be written *if* writeSqlFileEnabled is set to true.
public  booleanisExecuteEnabled()
     Determines whether liquibase will actually execute DDL statements.
public  booleanisWriteSqlFileEnabled()
     Boolean flag to determine whether generated SQL should be written to disk.
public  voidsetBeanName(String name)
     Spring sets this automatically to the instance's configured bean name.
public  voidsetChangeLog(String dataModel)
     Sets a Spring Resource that is able to resolve to a file or classpath resource.
public  voidsetContexts(String contexts)
    
public  voidsetDataSource(DataSource dataSource)
     The DataSource that liquibase will use to perform the migration.
public  voidsetExecuteEnabled(boolean executeSql)
     Determines whether liquibase will actually execute DDL statements.
public  voidsetResourceLoader(ResourceLoader resourceLoader)
    
public  voidsetSqlOutputDir(File sqlOutputDir)
     Sets the output directory into which a SQL file will be written if writeSqlFileEnabled is also set to true.
public  voidsetWriteSqlFileEnabled(boolean writeSqlFile)
     Boolean flag to determine whether generated SQL should be written to disk.
protected  voidwriteSqlFile(Liquibase liquibase)
     If there are any un-run changesets, this method will write them out to a file, if so configured.


Constructor Detail
SpringLiquibase
public SpringLiquibase()(Code)




Method Detail
afterPropertiesSet
public void afterPropertiesSet() throws LiquibaseException(Code)
Executed automatically when the bean is initialized.



executeSql
protected void executeSql(Liquibase liquibase) throws LiquibaseException(Code)
This method will actually execute the changesets.
Parameters:
  liquibase -
throws:
  SQLException -
throws:
  IOException -



getBeanName
public String getBeanName()(Code)
Gets the Spring-name of this instance.



getChangeLog
public String getChangeLog()(Code)
Returns a Resource that is able to resolve to a file or classpath resource.



getContexts
public String getContexts()(Code)



getDataSource
public DataSource getDataSource()(Code)
The DataSource that liquibase will use to perform the migration.



getDatabaseProductName
public String getDatabaseProductName() throws JDBCException(Code)



getExecuteDisabledWarningMessage
public String getExecuteDisabledWarningMessage()(Code)
Returns a warning message that will be written out to the log. It is here so that it can be customized.



getResourceLoader
public ResourceLoader getResourceLoader()(Code)



getSqlOutputDir
public File getSqlOutputDir()(Code)
Returns the output directory into which a SQL file will be written *if* writeSqlFileEnabled is set to true.



isExecuteEnabled
public boolean isExecuteEnabled()(Code)
Determines whether liquibase will actually execute DDL statements.



isWriteSqlFileEnabled
public boolean isWriteSqlFileEnabled()(Code)
Boolean flag to determine whether generated SQL should be written to disk.



setBeanName
public void setBeanName(String name)(Code)
Spring sets this automatically to the instance's configured bean name.



setChangeLog
public void setChangeLog(String dataModel)(Code)
Sets a Spring Resource that is able to resolve to a file or classpath resource. An example might be classpath:db-changelog.xml.



setContexts
public void setContexts(String contexts)(Code)



setDataSource
public void setDataSource(DataSource dataSource)(Code)
The DataSource that liquibase will use to perform the migration.



setExecuteEnabled
public void setExecuteEnabled(boolean executeSql)(Code)
Determines whether liquibase will actually execute DDL statements.
Parameters:
  executeSql -



setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader)(Code)



setSqlOutputDir
public void setSqlOutputDir(File sqlOutputDir)(Code)
Sets the output directory into which a SQL file will be written if writeSqlFileEnabled is also set to true.
Parameters:
  sqlOutputDir -



setWriteSqlFileEnabled
public void setWriteSqlFileEnabled(boolean writeSqlFile)(Code)
Boolean flag to determine whether generated SQL should be written to disk.



writeSqlFile
protected void writeSqlFile(Liquibase liquibase) throws LiquibaseException(Code)
If there are any un-run changesets, this method will write them out to a file, if so configured.
Parameters:
  liquibase -
throws:
  SQLException -
throws:
  IOException -
throws:
  LiquibaseException -



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.