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


java.lang.Object
   liquibase.database.AbstractDatabase

All known Subclasses:   liquibase.database.MySQLDatabase,  liquibase.database.DerbyDatabase,  liquibase.database.CacheDatabase,  liquibase.database.OracleDatabase,  liquibase.database.PostgresDatabase,  liquibase.database.MaxDBDatabase,  liquibase.database.FirebirdDatabase,  liquibase.database.DB2Database,  liquibase.database.MSSQLDatabase,  liquibase.database.UnsupportedDatabase,  liquibase.database.HsqlDatabase,
AbstractDatabase
abstract public class AbstractDatabase implements Database(Code)
AbstractDatabase is extended by all supported databases as a facade to the underlying database. The physical connection can be retrieved from the AbstractDatabase implementation, as well as any database-specific characteristics such as the datatype for "boolean" fields.


Field Summary
protected  booleanchangeLogCreateAttempted
    
protected  booleanchangeLogLockCreateAttempted
    
protected  booleanchangeLogLockTableExists
    
protected  booleanchangeLogTableExists
    
protected  StringcurrentDateTimeFunction
    
final protected static  Loggerlog
    

Constructor Summary
protected  AbstractDatabase()
    

Method Summary
protected  booleancanCreateChangeLogTable()
    
public  voidcheckDatabaseChangeLogLockTable()
     This method will check the database ChangeLogLock table used to keep track of if a machine is updating the database.
public  voidcheckDatabaseChangeLogTable()
     This method will check the database ChangeLog table used to keep track of the changes in the file.
public  voidclose()
    
public  voidcommit()
    
public  ObjectconvertDatabaseValueToJavaObject(Object defaultValue, int dataType, int columnSize, int decimalDigits)
    
public  StringconvertJavaObjectToString(Object value)
    
public  StringconvertRequestedSchemaToCatalog(String requestedSchema)
    
public  StringconvertRequestedSchemaToSchema(String requestedSchema)
    
protected  ObjectconvertToCorrectJavaType(String value, int dataType, int columnSize, int decimalDigits)
    
protected  SqlStatementcreateChangeToTagSQL()
     Returns SQL to return the date of the most recient changeset execution.
public  SqlStatementcreateFindSequencesSQL(String schema)
    
protected  SqlStatementcreateTagSQL(String tagName, Date dateExecuted)
     Returns SQL to tag the database.
public  booleandoesChangeLogLockTableExist()
    
public  booleandoesChangeLogTableExist()
    
public  booleandoesTagExist(String tag)
    
public  voiddropDatabaseObjects(String schema)
     Drops all objects owned by the connected user.
public  booleanequals(Object o)
    
public  StringescapeColumnName(String columnName)
    
public  StringescapeColumnNameList(String columnNames)
    
public  StringescapeSequenceName(String schemaName, String sequenceName)
    
public  StringescapeStringForDatabase(String string)
    
public  StringescapeTableName(String schemaName, String tableName)
    
public  StringescapeViewName(String schemaName, String viewName)
    
public  StringgeneratePrimaryKeyName(String tableName)
    
public  booleangetAutoCommitMode()
    
public  StringgetAutoIncrementClause()
     Returns database-specific auto-increment DDL clause.
public  StringgetColumnType(String columnType, Boolean autoIncrement)
     Returns the database-specific datatype for the given column configuration. This method will convert some generic column types (e.g.
final public  StringgetColumnType(ColumnConfig columnConfig)
    
public  StringgetConcatSql(String... values)
    
public  DatabaseConnectiongetConnection()
    
public  StringgetConnectionURL()
    
public  StringgetConnectionUsername()
    
protected  SqlStatementgetCreateChangeLogLockSQL()
    
protected  SqlStatementgetCreateChangeLogSQL()
    
public  StringgetDatabaseChangeLogLockTableName()
    
public  StringgetDatabaseChangeLogTableName()
    
public  StringgetDatabaseProductName()
     Returns the name of the database product according to the underlying database.
public  StringgetDatabaseProductName(Connection conn)
    
public  StringgetDatabaseProductVersion()
    
public  intgetDatabaseType(int type)
    
public  StringgetDateLiteral(String isoDate)
     Return a date literal with the same value as a string formatted using ISO 8601.

Note: many databases accept date literals in ISO8601 format with the 'T' replaced with a space.

public  StringgetDateLiteral(java.sql.Timestamp date)
    
public  StringgetDateLiteral(java.sql.Date date)
    
public  StringgetDateLiteral(java.sql.Time date)
    
public  StringgetDateLiteral(Date date)
    
public  StringgetDateType()
     Returns the actual database-specific data type to use a "date" (no time information) column.
public  StringgetDefaultCatalogName()
    
protected  StringgetDefaultDatabaseSchemaName()
    
public  StringgetDefaultSchemaName()
    
public  StringgetDriverName()
    
public  StringgetFalseBooleanValue()
     The database-specific value to use for "false" "boolean" columns.
public  JdbcTemplategetJdbcTemplate()
    
public  StringgetLineComment()
     Returns database-specific line comment string.
public  RanChangeSetgetRanChangeSet(ChangeSet changeSet)
    
public  List<RanChangeSet>getRanChangeSetList()
     Returns the ChangeSets that have been run against the current database.
public  DategetRanDate(ChangeSet changeSet)
    
public  ChangeSet.RunStatusgetRunStatus(ChangeSet changeSet)
    
public  SqlStatementgetSelectChangeLogLockSQL()
    
public  DatabaseSnapshotgetSnapshot()
    
protected  Set<String>getSystemTablesAndViews()
     Returns system (undroppable) tables and views.
public  StringgetTimeType()
     Returns the actual database-specific data type to use a "time" column.
public  StringgetTrueBooleanValue()
     The database-specific value to use for "true" "boolean" columns.
public  StringgetViewDefinition(String schemaName, String viewName)
    
public  SqlStatementgetViewDefinitionSql(String schemaName, String viewName)
    
public  inthashCode()
    
public  booleanisColumnAutoIncrement(String schemaName, String tableName, String columnName)
    
protected  booleanisDateOnly(String isoDate)
    
protected  booleanisDateTime(String isoDate)
    
public  booleanisLiquibaseTable(String tableName)
    
public  booleanisSystemTable(String catalogName, String schemaName, String tableName)
    
public  booleanisSystemView(String catalogName, String schemaName, String viewName)
    
protected  booleanisTimeOnly(String isoDate)
    
public  voidmarkChangeSetAsRan(ChangeSet changeSet)
     After the change set has been ran against the database this method will update the change log table with the information.
public  voidmarkChangeSetAsReRan(ChangeSet changeSet)
    
protected  DateparseDate(String dateAsString)
    
public  voidremoveRanStatus(ChangeSet changeSet)
    
public  voidrollback()
    
public  voidsetConnection(Connection conn)
    
public  voidsetConnection(DatabaseConnection conn)
    
public  voidsetCurrentDateTimeFunction(String function)
    
public  voidsetDefaultSchemaName(String schemaName)
    
public  voidsetJdbcTemplate(JdbcTemplate template)
    
public  booleanshouldQuoteValue(String value)
    
public  booleansupportsAutoIncrement()
    
public  booleansupportsDDLInTransaction()
     By default databases should support DDL within a transaction.
public  booleansupportsSchemas()
    
public  booleansupportsSequences()
     Does the database type support sequence.
public  voidtag(String tagString)
     Tags the database changelog with the given string.
public  StringtoString()
    

Field Detail
changeLogCreateAttempted
protected boolean changeLogCreateAttempted(Code)



changeLogLockCreateAttempted
protected boolean changeLogLockCreateAttempted(Code)



changeLogLockTableExists
protected boolean changeLogLockTableExists(Code)



changeLogTableExists
protected boolean changeLogTableExists(Code)



currentDateTimeFunction
protected String currentDateTimeFunction(Code)



log
final protected static Logger log(Code)




Constructor Detail
AbstractDatabase
protected AbstractDatabase()(Code)




Method Detail
canCreateChangeLogTable
protected boolean canCreateChangeLogTable() throws JDBCException(Code)



checkDatabaseChangeLogLockTable
public void checkDatabaseChangeLogLockTable() throws JDBCException(Code)
This method will check the database ChangeLogLock table used to keep track of if a machine is updating the database. If the table does not exist it will create one otherwise it will not do anything besides outputting a log message.



checkDatabaseChangeLogTable
public void checkDatabaseChangeLogTable() throws JDBCException(Code)
This method will check the database ChangeLog table used to keep track of the changes in the file. If the table does not exist it will create one otherwise it will not do anything besides outputting a log message.



close
public void close() throws JDBCException(Code)



commit
public void commit() throws JDBCException(Code)



convertDatabaseValueToJavaObject
public Object convertDatabaseValueToJavaObject(Object defaultValue, int dataType, int columnSize, int decimalDigits) throws ParseException(Code)



convertJavaObjectToString
public String convertJavaObjectToString(Object value)(Code)



convertRequestedSchemaToCatalog
public String convertRequestedSchemaToCatalog(String requestedSchema) throws JDBCException(Code)



convertRequestedSchemaToSchema
public String convertRequestedSchemaToSchema(String requestedSchema) throws JDBCException(Code)



convertToCorrectJavaType
protected Object convertToCorrectJavaType(String value, int dataType, int columnSize, int decimalDigits) throws ParseException(Code)



createChangeToTagSQL
protected SqlStatement createChangeToTagSQL()(Code)
Returns SQL to return the date of the most recient changeset execution.



createFindSequencesSQL
public SqlStatement createFindSequencesSQL(String schema) throws JDBCException(Code)



createTagSQL
protected SqlStatement createTagSQL(String tagName, Date dateExecuted)(Code)
Returns SQL to tag the database. SQL Contains two ?:
  1. tag string
  2. date executed



doesChangeLogLockTableExist
public boolean doesChangeLogLockTableExist()(Code)



doesChangeLogTableExist
public boolean doesChangeLogTableExist()(Code)



doesTagExist
public boolean doesTagExist(String tag) throws JDBCException(Code)



dropDatabaseObjects
public void dropDatabaseObjects(String schema) throws JDBCException(Code)
Drops all objects owned by the connected user.
Parameters:
  schema -



equals
public boolean equals(Object o)(Code)



escapeColumnName
public String escapeColumnName(String columnName)(Code)



escapeColumnNameList
public String escapeColumnNameList(String columnNames)(Code)



escapeSequenceName
public String escapeSequenceName(String schemaName, String sequenceName)(Code)



escapeStringForDatabase
public String escapeStringForDatabase(String string)(Code)



escapeTableName
public String escapeTableName(String schemaName, String tableName)(Code)



escapeViewName
public String escapeViewName(String schemaName, String viewName)(Code)



generatePrimaryKeyName
public String generatePrimaryKeyName(String tableName)(Code)



getAutoCommitMode
public boolean getAutoCommitMode()(Code)
Auto-commit mode to run in



getAutoIncrementClause
public String getAutoIncrementClause()(Code)
Returns database-specific auto-increment DDL clause.



getColumnType
public String getColumnType(String columnType, Boolean autoIncrement)(Code)
Returns the database-specific datatype for the given column configuration. This method will convert some generic column types (e.g. boolean, currency) to the correct type for the current database.



getColumnType
final public String getColumnType(ColumnConfig columnConfig)(Code)



getConcatSql
public String getConcatSql(String... values)(Code)



getConnection
public DatabaseConnection getConnection()(Code)



getConnectionURL
public String getConnectionURL() throws JDBCException(Code)



getConnectionUsername
public String getConnectionUsername() throws JDBCException(Code)



getCreateChangeLogLockSQL
protected SqlStatement getCreateChangeLogLockSQL()(Code)



getCreateChangeLogSQL
protected SqlStatement getCreateChangeLogSQL()(Code)



getDatabaseChangeLogLockTableName
public String getDatabaseChangeLogLockTableName()(Code)



getDatabaseChangeLogTableName
public String getDatabaseChangeLogTableName()(Code)



getDatabaseProductName
public String getDatabaseProductName()(Code)
Returns the name of the database product according to the underlying database.



getDatabaseProductName
public String getDatabaseProductName(Connection conn) throws JDBCException(Code)



getDatabaseProductVersion
public String getDatabaseProductVersion() throws JDBCException(Code)



getDatabaseType
public int getDatabaseType(int type)(Code)



getDateLiteral
public String getDateLiteral(String isoDate)(Code)
Return a date literal with the same value as a string formatted using ISO 8601.

Note: many databases accept date literals in ISO8601 format with the 'T' replaced with a space. Only databases which do not accept these strings should need to override this method.

Implementation restriction: Currently, only the following subsets of ISO8601 are supported: yyyy-MM-dd hh:mm:ss yyyy-MM-ddThh:mm:ss




getDateLiteral
public String getDateLiteral(java.sql.Timestamp date)(Code)



getDateLiteral
public String getDateLiteral(java.sql.Date date)(Code)



getDateLiteral
public String getDateLiteral(java.sql.Time date)(Code)



getDateLiteral
public String getDateLiteral(Date date)(Code)



getDateType
public String getDateType()(Code)
Returns the actual database-specific data type to use a "date" (no time information) column.



getDefaultCatalogName
public String getDefaultCatalogName() throws JDBCException(Code)



getDefaultDatabaseSchemaName
protected String getDefaultDatabaseSchemaName() throws JDBCException(Code)



getDefaultSchemaName
public String getDefaultSchemaName()(Code)



getDriverName
public String getDriverName() throws JDBCException(Code)



getFalseBooleanValue
public String getFalseBooleanValue()(Code)
The database-specific value to use for "false" "boolean" columns.



getJdbcTemplate
public JdbcTemplate getJdbcTemplate()(Code)



getLineComment
public String getLineComment()(Code)
Returns database-specific line comment string.



getRanChangeSet
public RanChangeSet getRanChangeSet(ChangeSet changeSet) throws JDBCException, DatabaseHistoryException(Code)



getRanChangeSetList
public List<RanChangeSet> getRanChangeSetList() throws JDBCException(Code)
Returns the ChangeSets that have been run against the current database.



getRanDate
public Date getRanDate(ChangeSet changeSet) throws JDBCException, DatabaseHistoryException(Code)



getRunStatus
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws JDBCException, DatabaseHistoryException(Code)
Returns the run status for the given ChangeSet



getSelectChangeLogLockSQL
public SqlStatement getSelectChangeLogLockSQL() throws JDBCException(Code)



getSnapshot
public DatabaseSnapshot getSnapshot() throws JDBCException(Code)



getSystemTablesAndViews
protected Set<String> getSystemTablesAndViews()(Code)
Returns system (undroppable) tables and views.



getTimeType
public String getTimeType()(Code)
Returns the actual database-specific data type to use a "time" column.



getTrueBooleanValue
public String getTrueBooleanValue()(Code)
The database-specific value to use for "true" "boolean" columns.



getViewDefinition
public String getViewDefinition(String schemaName, String viewName) throws JDBCException(Code)



getViewDefinitionSql
public SqlStatement getViewDefinitionSql(String schemaName, String viewName) throws JDBCException(Code)



hashCode
public int hashCode()(Code)



isColumnAutoIncrement
public boolean isColumnAutoIncrement(String schemaName, String tableName, String columnName) throws SQLException, JDBCException(Code)



isDateOnly
protected boolean isDateOnly(String isoDate)(Code)



isDateTime
protected boolean isDateTime(String isoDate)(Code)



isLiquibaseTable
public boolean isLiquibaseTable(String tableName)(Code)



isSystemTable
public boolean isSystemTable(String catalogName, String schemaName, String tableName)(Code)



isSystemView
public boolean isSystemView(String catalogName, String schemaName, String viewName)(Code)



isTimeOnly
protected boolean isTimeOnly(String isoDate)(Code)



markChangeSetAsRan
public void markChangeSetAsRan(ChangeSet changeSet) throws JDBCException(Code)
After the change set has been ran against the database this method will update the change log table with the information.



markChangeSetAsReRan
public void markChangeSetAsReRan(ChangeSet changeSet) throws JDBCException(Code)



parseDate
protected Date parseDate(String dateAsString) throws DateParseException(Code)



removeRanStatus
public void removeRanStatus(ChangeSet changeSet) throws JDBCException(Code)



rollback
public void rollback() throws JDBCException(Code)



setConnection
public void setConnection(Connection conn)(Code)



setConnection
public void setConnection(DatabaseConnection conn)(Code)



setCurrentDateTimeFunction
public void setCurrentDateTimeFunction(String function)(Code)



setDefaultSchemaName
public void setDefaultSchemaName(String schemaName) throws JDBCException(Code)



setJdbcTemplate
public void setJdbcTemplate(JdbcTemplate template)(Code)



shouldQuoteValue
public boolean shouldQuoteValue(String value)(Code)



supportsAutoIncrement
public boolean supportsAutoIncrement()(Code)



supportsDDLInTransaction
public boolean supportsDDLInTransaction()(Code)
By default databases should support DDL within a transaction.



supportsSchemas
public boolean supportsSchemas()(Code)



supportsSequences
public boolean supportsSequences()(Code)
Does the database type support sequence.



tag
public void tag(String tagString) throws JDBCException(Code)
Tags the database changelog with the given string.



toString
public String toString()(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.