本文整理了Java中org.hibernate.engine.spi.SessionFactoryImplementor.getSessionFactoryOptions()
方法的一些代码示例,展示了SessionFactoryImplementor.getSessionFactoryOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SessionFactoryImplementor.getSessionFactoryOptions()
方法的具体详情如下:
包路径:org.hibernate.engine.spi.SessionFactoryImplementor
类名称:SessionFactoryImplementor
方法名:getSessionFactoryOptions
暂无
代码示例来源:origin: hibernate/hibernate-orm
public ParameterSubstitutionRecognizer(SessionFactoryImplementor factory) {
this.jdbcPositionalParamCount = factory.getSessionFactoryOptions().jdbcStyleParamsZeroBased()
? 0
: 1;
}
代码示例来源:origin: hibernate/hibernate-orm
protected String qualify(String regionName) {
return sessionFactory.getSessionFactoryOptions().getCacheRegionPrefix() == null
? regionName
: sessionFactory.getSessionFactoryOptions().getCacheRegionPrefix() + '.' + regionName;
}
代码示例来源:origin: hibernate/hibernate-orm
/**
* Constructs a JoinSequence
*
* @param factory The SessionFactory
*/
public JoinSequence(SessionFactoryImplementor factory) {
this.factory = factory;
this.collectionJoinSubquery = factory.getSessionFactoryOptions().isCollectionJoinSubqueryRewriteEnabled();
}
代码示例来源:origin: hibernate/hibernate-orm
/**
* Constructs a Nullability
*
* @param session The session
*/
public Nullability(SharedSessionContractImplementor session) {
this.session = session;
this.checkNullability = session.getFactory().getSessionFactoryOptions().isCheckNullability();
}
/**
代码示例来源:origin: hibernate/hibernate-orm
public ExceptionConverterImpl(SharedSessionContractImplementor sharedSessionContract) {
this.sharedSessionContract = sharedSessionContract;
isJpaBootstrap = sharedSessionContract.getFactory().getSessionFactoryOptions().isJpaBootstrap();
nativeExceptionHandling51Compliance = sharedSessionContract.getFactory().getSessionFactoryOptions().nativeExceptionHandling51Compliance();
}
代码示例来源:origin: hibernate/hibernate-orm
private boolean isInitializeProxyWhenAccessingIdentifier() {
return session != null && session.getFactory()
.getSessionFactoryOptions()
.getJpaCompliance().isJpaProxyComplianceEnabled();
}
代码示例来源:origin: hibernate/hibernate-orm
private void performInjections(T listener) {
if ( CallbackRegistryConsumer.class.isInstance( listener ) ) {
( (CallbackRegistryConsumer) listener ).injectCallbackRegistry( listenerRegistry.getCallbackRegistry() );
}
if ( JpaBootstrapSensitive.class.isInstance( listener ) ) {
( (JpaBootstrapSensitive) listener ).wasJpaBootstrap(
listenerRegistry.getSessionFactory().getSessionFactoryOptions().isJpaBootstrap()
);
}
}
代码示例来源:origin: hibernate/hibernate-orm
public StatisticsImpl(SessionFactoryImplementor sessionFactory) {
this.sessionFactory = sessionFactory;
this.queryStatsMap = new BoundedConcurrentHashMap(
sessionFactory != null ?
sessionFactory.getSessionFactoryOptions().getQueryStatisticsMaxSize() :
Statistics.DEFAULT_QUERY_STATISTICS_MAX_SIZE,
20,
BoundedConcurrentHashMap.Eviction.LRU
);
clear();
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public JpaCompliance getJpaCompliance() {
return transactionCoordinatorOwner.getJdbcSessionOwner()
.getJdbcSessionContext()
.getSessionFactory()
.getSessionFactoryOptions()
.getJpaCompliance();
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected String renderOrderByElement(String expression, String collation, String order, String nulls) {
final NullPrecedence nullPrecedence = NullPrecedence.parse(
nulls,
sessionFactory.getSessionFactoryOptions().getDefaultNullPrecedence()
);
return sessionFactory.getDialect().renderOrderByElement( expression, collation, order, nullPrecedence );
}
}
代码示例来源:origin: hibernate/hibernate-orm
protected void prepareForPossibleLoadingOutsideTransaction() {
if ( session != null ) {
allowLoadOutsideTransaction = session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled();
if ( allowLoadOutsideTransaction && sessionFactoryUuid == null ) {
sessionFactoryUuid = session.getFactory().getUuid();
}
}
}
代码示例来源:origin: hibernate/hibernate-orm
public boolean isBatchable() {
return optimisticLockStyle() == OptimisticLockStyle.NONE
|| ( !isVersioned() && optimisticLockStyle() == OptimisticLockStyle.VERSION )
|| getFactory().getSessionFactoryOptions().isJdbcBatchVersionedData();
}
代码示例来源:origin: hibernate/hibernate-orm
private String generateDelete(String tableName, String[] columnNames, String idSubselect, String comment) {
final Delete delete = new Delete()
.setTableName( tableName )
.setWhere( "(" + String.join( ", ", columnNames ) + ") IN (" + idSubselect + ")" );
if ( factory().getSessionFactoryOptions().isCommentsEnabled() ) {
delete.setComment( comment );
}
return delete.toStatementString();
}
代码示例来源:origin: hibernate/hibernate-orm
public MultiTableDeleteExecutor(HqlSqlWalker walker) {
final MultiTableBulkIdStrategy strategy = walker.getSessionFactoryHelper().getFactory().getSessionFactoryOptions()
.getMultiTableBulkIdStrategy();
this.deleteHandler = strategy.buildDeleteHandler( walker.getSessionFactoryHelper().getFactory(), walker );
}
代码示例来源:origin: hibernate/hibernate-orm
public MultiTableUpdateExecutor(HqlSqlWalker walker) {
MultiTableBulkIdStrategy strategy = walker.getSessionFactoryHelper()
.getFactory()
.getSessionFactoryOptions()
.getMultiTableBulkIdStrategy();
this.updateHandler = strategy.buildUpdateHandler( walker.getSessionFactoryHelper().getFactory(), walker );
}
代码示例来源:origin: hibernate/hibernate-orm
private static boolean useMinimalPuts(SharedSessionContractImplementor session, EntityEntry entityEntry) {
if ( session.getFactory().getSessionFactoryOptions().isMinimalPutsEnabled() ) {
return session.getCacheMode() != CacheMode.REFRESH;
}
else {
return entityEntry.getPersister().hasLazyProperties()
&& entityEntry.getPersister().isLazyPropertiesCacheable();
}
}
代码示例来源:origin: hibernate/hibernate-orm
private String generateVersionIncrementUpdateString() {
Update update = new Update( getFactory().getDialect() );
update.setTableName( getTableName( 0 ) );
if ( getFactory().getSessionFactoryOptions().isCommentsEnabled() ) {
update.setComment( "forced version increment" );
}
update.addColumn( getVersionColumnName() );
update.addPrimaryKeyColumns( rootTableKeyColumnNames );
update.setVersionColumnName( getVersionColumnName() );
return update.toStatementString();
}
代码示例来源:origin: hibernate/hibernate-orm
protected String generateLockString() {
final SessionFactoryImplementor factory = lockable.getFactory();
final Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSessionFactoryOptions().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: hibernate/hibernate-orm
protected String generateLockString() {
final SessionFactoryImplementor factory = lockable.getFactory();
final Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSessionFactoryOptions().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
代码示例来源:origin: hibernate/hibernate-orm
protected String generateLockString() {
final SessionFactoryImplementor factory = lockable.getFactory();
final Update update = new Update( factory.getDialect() );
update.setTableName( lockable.getRootTableName() );
update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
update.setVersionColumnName( lockable.getVersionColumnName() );
update.addColumn( lockable.getVersionColumnName() );
if ( factory.getSessionFactoryOptions().isCommentsEnabled() ) {
update.setComment( lockMode + " lock " + lockable.getEntityName() );
}
return update.toStatementString();
}
内容来源于网络,如有侵权,请联系作者删除!