Class HibernateEjb3Database

  • All Implemented Interfaces:
    liquibase.database.Database, liquibase.servicelocator.PrioritizedService
    Direct Known Subclasses:
    JpaPersistenceDatabase

    public class HibernateEjb3Database
    extends HibernateDatabase
    Database implementation for "ejb3" hibernate configurations.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.persistence.EntityManagerFactory entityManagerFactory  
      • Fields inherited from class liquibase.database.AbstractJdbcDatabase

        caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercased
      • Fields inherited from interface liquibase.servicelocator.PrioritizedService

        COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.hibernate.boot.Metadata buildMetadataFromPath()
      Calls #createEntityManagerFactory() to create and save the entity manager factory.
      protected void configureSources​(org.hibernate.boot.MetadataSources sources)
      Adds sources based on what is in the saved entityManagerFactory
      protected org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl createEntityManagerFactoryBuilder()  
      protected String findDialectName()
      Called by HibernateDatabase.createMetadataSources() to determine the correct dialect name based on url parameters, configuration files, etc.
      protected String getDefaultDatabaseProductName()  
      String getProperty​(String name)
      Returns the value of the given property.
      String getShortName()  
      boolean isCorrectDatabaseImplementation​(liquibase.database.DatabaseConnection conn)  
      • Methods inherited from class liquibase.database.AbstractJdbcDatabase

        addReservedWords, canCreateChangeLogTable, close, commit, correctObjectName, correctSchema, correctSchema, dataTypeIsNotModifiable, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDataTypeName, escapeIndexName, escapeObjectName, escapeObjectName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeRollbackStatements, executeStatements, filterRollbackVisitors, generateAutoIncrementBy, generateAutoIncrementStartWith, generateDatabaseFunctionValue, generatePrimaryKeyName, get, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getConnectionSchemaNameCallStatement, getContainingObjects, getCurrentDateTimeFunction, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDataTypeMaxParameters, getDateFunctions, getDateLiteral, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultFractionalDigitsForTimestamp, getDefaultScaleForNativeDataType, getDefaultSchema, getFetchSize, getJdbcCatalogName, getJdbcCatalogName, getJdbcSchemaName, getJdbcSchemaName, getLineComment, getLiquibaseCatalogName, getLiquibaseSchemaName, getLiquibaseTablespaceName, getMaxFractionalDigitsForTimestamp, getName, getObjectQuotingStrategy, getOutputDefaultCatalog, getOutputDefaultSchema, getQuotingEndCharacter, getQuotingEndReplacement, getQuotingStartCharacter, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSchemaAndCatalogCase, getSchemaFromJdbcInfo, getSystemSchema, getSystemTables, getSystemViews, getTimeLiteral, getViewDefinition, hashCode, isAutoCommit, isDateOnly, isDateTime, isDefaultCatalog, isDefaultSchema, isFunction, isLiquibaseObject, isReservedWord, isSystemObject, isSystemView, isTimeOnly, isTimestamp, jdbcCallsCatalogsSchemas, markChangeSetExecStatus, mustQuoteObjectName, parseDate, quoteObject, removeRanStatus, requiresExplicitNullForColumns, resetInternalState, rollback, saveRollbackStatement, saveStatements, set, setAutoCommit, setCanCacheLiquibaseTableInfo, setCaseSensitive, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultCatalogName, setDefaultSchemaName, setLiquibaseCatalogName, setLiquibaseSchemaName, setLiquibaseTablespaceName, setObjectQuotingStrategy, setOutputDefaultCatalog, setOutputDefaultSchema, startsWithNumeric, supportsAutoIncrement, supportsBatchUpdates, supportsCatalogInObjectName, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsNotNullConstraintNames, supportsPrimaryKeyNames, supportsRestrictForeignKeys, supportsSequences, tag, toString, unescapeDataTypeName, unescapeDataTypeString, validate
    • Field Detail

      • entityManagerFactory

        protected javax.persistence.EntityManagerFactory entityManagerFactory
    • Constructor Detail

      • HibernateEjb3Database

        public HibernateEjb3Database()
    • Method Detail

      • getShortName

        public String getShortName()
      • getDefaultDatabaseProductName

        protected String getDefaultDatabaseProductName()
        Specified by:
        getDefaultDatabaseProductName in class liquibase.database.AbstractJdbcDatabase
      • isCorrectDatabaseImplementation

        public boolean isCorrectDatabaseImplementation​(liquibase.database.DatabaseConnection conn)
                                                throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • buildMetadataFromPath

        protected org.hibernate.boot.Metadata buildMetadataFromPath()
                                                             throws liquibase.exception.DatabaseException
        Calls #createEntityManagerFactory() to create and save the entity manager factory.
        Overrides:
        buildMetadataFromPath in class HibernateDatabase
        Throws:
        liquibase.exception.DatabaseException
      • createEntityManagerFactoryBuilder

        protected org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl createEntityManagerFactoryBuilder()
      • getProperty

        public String getProperty​(String name)
        Description copied from class: HibernateDatabase
        Returns the value of the given property. Should return the value given as a connection URL first, then fall back to configuration-specific values.
        Overrides:
        getProperty in class HibernateDatabase
      • configureSources

        protected void configureSources​(org.hibernate.boot.MetadataSources sources)
                                 throws liquibase.exception.DatabaseException
        Adds sources based on what is in the saved entityManagerFactory
        Specified by:
        configureSources in class HibernateDatabase
        Throws:
        liquibase.exception.DatabaseException