Class OverrideConfiguration

  • All Implemented Interfaces:
    Serializable

    public class OverrideConfiguration
    extends org.hibernate.cfg.Configuration
    Provide schema reconfig and overriderable class mapping in sessionFactory
    Since:
    2.1
    Author:
    chaostone
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  OverrideConfiguration.OverrideMappings  
      • Nested classes/interfaces inherited from class org.hibernate.cfg.Configuration

        org.hibernate.cfg.Configuration.MappingsImpl, org.hibernate.cfg.Configuration.MetadataSourceQueue
    • Field Summary

      • Fields inherited from class org.hibernate.cfg.Configuration

        ARTEFACT_PROCESSING_ORDER, auxiliaryDatabaseObjects, classes, collections, columnNameBindingPerTable, DEFAULT_ARTEFACT_PROCESSING_ORDER, DEFAULT_CACHE_CONCURRENCY_STRATEGY, extendsQueue, fetchProfiles, filterDefinitions, imports, metadataSourceQueue, namedQueries, namedSqlQueries, propertyReferences, secondPasses, settingsFactory, sqlFunctions, sqlResultSetMappings, tableNameBinding, tables, typeDefs, USE_NEW_ID_GENERATOR_MAPPINGS, xmlHelper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.hibernate.cfg.Mappings createMappings()  
      protected org.hibernate.cfg.Configuration doConfigure​(InputStream stream, String resourceName)
      Just disable xml file validation.
      Speed up boostrap
      int getDynaupdateMinColumn()  
      protected void secondPassCompile()
      Update persistentclass and collection's schema.
      Remove duplicated persistentClass register in classes map.
      void setDynaupdateMinColumn​(int dynaupdateMinColumn)  
      • Methods inherited from class org.hibernate.cfg.Configuration

        add, addAnnotatedClass, addAuxiliaryDatabaseObject, addCacheableFile, addCacheableFile, addCacheableFileStrictly, addClass, addDirectory, addDocument, addFetchProfile, addFile, addFile, addFilterDefinition, addInputStream, addJar, addPackage, addProperties, addResource, addResource, addSqlFunction, addURL, addXML, buildMapping, buildMappings, buildSessionFactory, buildSessionFactory, buildSettings, buildSettings, configure, configure, configure, configure, configure, doConfigure, findPossibleExtends, generateDropSchemaScript, generateSchemaCreationScript, generateSchemaUpdateScript, generateSchemaUpdateScriptList, getClassMapping, getClassMappings, getCollectionMapping, getCollectionMappings, getConfigurationInputStream, getCurrentTenantIdentifierResolver, getEntityNotFoundDelegate, getEntityResolver, getEntityTuplizerFactory, getFilterDefinitions, getIdentifierGeneratorFactory, getImports, getInterceptor, getMappedSuperclassMappings, getNamedQueries, getNamedSQLQueries, getNamingStrategy, getNamingStrategyDelegator, getProperties, getProperty, getReflectionManager, getSessionFactoryObserver, getSqlFunctions, getSqlResultSetMappings, getTableMappings, getTypeResolver, iterateFetchProfiles, mergeProperties, registerTypeContributor, registerTypeOverride, registerTypeOverride, registerTypeOverride, reset, secondPassCompileForeignKeys, setCacheConcurrencyStrategy, setCacheConcurrencyStrategy, setCacheConcurrencyStrategy, setCollectionCacheConcurrencyStrategy, setCollectionCacheConcurrencyStrategy, setCurrentTenantIdentifierResolver, setEntityNotFoundDelegate, setEntityResolver, setInterceptor, setNamingStrategy, setNamingStrategyDelegator, setPrecedence, setProperties, setProperty, setSessionFactoryObserver, validateSchema
    • Constructor Detail

      • OverrideConfiguration

        public OverrideConfiguration()
      • OverrideConfiguration

        public OverrideConfiguration​(org.hibernate.cfg.SettingsFactory settingsFactory)
    • Method Detail

      • doConfigure

        protected org.hibernate.cfg.Configuration doConfigure​(InputStream stream,
                                                              String resourceName)
                                                       throws org.hibernate.HibernateException
        Just disable xml file validation.
        Speed up boostrap
        Overrides:
        doConfigure in class org.hibernate.cfg.Configuration
        Throws:
        org.hibernate.HibernateException
      • createMappings

        public org.hibernate.cfg.Mappings createMappings()
        Overrides:
        createMappings in class org.hibernate.cfg.Configuration
      • secondPassCompile

        protected void secondPassCompile()
                                  throws org.hibernate.MappingException
        Update persistentclass and collection's schema.
        Remove duplicated persistentClass register in classes map.
        Overrides:
        secondPassCompile in class org.hibernate.cfg.Configuration
        Throws:
        org.hibernate.MappingException
        See Also:
        Configuration.addClass(Class)
      • getDynaupdateMinColumn

        public int getDynaupdateMinColumn()
      • setDynaupdateMinColumn

        public void setDynaupdateMinColumn​(int dynaupdateMinColumn)