public void setSessionFactory ( SessionFactory sessionFactory ) throws HibernateLayerException { try { this . sessionFactory = sessionFactory ; if ( null != layerInfo ) { entityMetadata = sessionFactory . getClassMetadata ( layerInfo . getFeatureInfo ( ) . getDataSourceName ( ) ) ; } } catch ( Exception e ) { // NOSONAR throw new HibernateLayerException ( e , ExceptionCode . HIBERNATE_NO_SESSION_FACTORY ) ; } }
Set session factory .