/** * Yuck. This is needed because JPA lets users define "global building options" * in {@code orm.xml} mappings. Forget that there are generally multiple * {@code orm.xml} mappings if using XML approach... Ugh */ public void apply(JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults) { if ( !mappingDefaults.shouldImplicitlyQuoteIdentifiers() ) { mappingDefaults.implicitlyQuoteIdentifiers = jpaOrmXmlPersistenceUnitDefaults.shouldImplicitlyQuoteIdentifiers(); } if ( mappingDefaults.getImplicitCatalogName() == null ) { mappingDefaults.implicitCatalogName = StringHelper.nullIfEmpty( jpaOrmXmlPersistenceUnitDefaults.getDefaultCatalogName() ); } if ( mappingDefaults.getImplicitSchemaName() == null ) { mappingDefaults.implicitSchemaName = StringHelper.nullIfEmpty( jpaOrmXmlPersistenceUnitDefaults.getDefaultSchemaName() ); } } }
/** * Yuck. This is needed because JPA lets users define "global building options" * in {@code orm.xml} mappings. Forget that there are generally multiple * {@code orm.xml} mappings if using XML approach... Ugh */ public void apply(JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults) { if ( !mappingDefaults.shouldImplicitlyQuoteIdentifiers() ) { mappingDefaults.implicitlyQuoteIdentifiers = jpaOrmXmlPersistenceUnitDefaults.shouldImplicitlyQuoteIdentifiers(); } if ( mappingDefaults.getImplicitCatalogName() == null ) { mappingDefaults.implicitCatalogName = StringHelper.nullIfEmpty( jpaOrmXmlPersistenceUnitDefaults.getDefaultCatalogName() ); } if ( mappingDefaults.getImplicitSchemaName() == null ) { mappingDefaults.implicitSchemaName = StringHelper.nullIfEmpty( jpaOrmXmlPersistenceUnitDefaults.getDefaultSchemaName() ); } }