Hibernate ORM Wrapped - 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 Wrapped class.

This code example shows how to use the following methods: unwrap
	 */ 
	public static DataSource getDataSource(SessionFactory sessionFactory) {
		if (getConnectionProviderMethod != null && sessionFactory instanceof SessionFactoryImplementor) {
			Wrapped cp = (Wrapped) ReflectionUtils.invokeMethod(getConnectionProviderMethod, sessionFactory);
			if (cp != null) {
				return cp.unwrap(DataSource.class);
			} 
		} 
		return null; 
	} 
 
	/** 
	 * Perform actual closing of the Hibernate Session, 
	 * catching and logging any cleanup exceptions thrown. 
	 * @param session the Hibernate Session to close (may be {@code null}) 
	 * @see org.hibernate.Session#close() 
	 */ 
	public static void closeSession(Session session) {
		if (session != null) {
			try { 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Hibernate ORM Wrapped Methods: