Hibernate ORM SessionFactoryImplementor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM SessionFactoryImplementor class.

This code example shows how to use the following methods: getCurrentTenantIdentifierResolver, withOptions
This code example shows how to use the following methods: getDialect
    protected Dialect cachedDialect = null;
 
    public synchronized Dialect getHibernateDialect() {
        if (cachedDialect == null) {
            SessionFactoryImplementor factory = (SessionFactoryImplementor) em.unwrap(Session.class).getSessionFactory();
            cachedDialect = factory.getDialect();
        } 
        return cachedDialect;
    } 
 
    public boolean isOracle() { 
        //Since should handle other Oracle dialects as well, since they derive from Oracle8iDialect 
        return getHibernateDialect() instanceof Oracle8iDialect;
    } 
 
    public boolean isPostgreSql() { 
        //Since should handle other Postgres dialects as well, since they derive from PostgreSQL81Dialect 
        return getHibernateDialect() instanceof PostgreSQL81Dialect;
    } 
 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getServiceRegistry
	public static SearchFactoryImplementor getSearchFactoryBySessionImplementor(SessionImplementor session) {
		return getSearchFactoryBySFI( session.getFactory() );
	} 
 
	public static SearchFactoryImplementor getSearchFactoryBySFI(SessionFactoryImplementor sfi) {
		final SearchFactoryReference factoryReference = sfi.getServiceRegistry()
			.getService( SearchFactoryReference.class );
		if ( factoryReference != null ) {
			return factoryReference.getSearchFactory();
		} 
		else { 
			throw LoggerFactory.make().searchFactoryReferenceServiceNotFound();
		} 
	} 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getDialect, getTypeResolver
			sqlType = type;
		} 
		/*else { 
			//trim off the length/precision/scale 
			int loc = sqlType.indexOf('('); 
			if (loc>-1) { 
				sqlType = sqlType.substring(0, loc); 
			} 
		}*/ 
		return "cast(" + args.get(0) + " as " + sqlType + ')';
	} 
 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getSQLExceptionHelper

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE