/** @return
* @throws HibernateException */
@SuppressWarnings("deprecation")
private static SessionFactory configureSessionFactory() throws HibernateException {
AnnotationConfiguration annotationConfiguration = new AnnotationConfiguration();
annotationConfiguration.addAnnotatedClass(OnyazilarDAO.class);
annotationConfiguration.addAnnotatedClass(BucakDAO.class);
annotationConfiguration.addAnnotatedClass(FirmalarAnaDAO.class);
annotationConfiguration.addAnnotatedClass(FirmalarSubelerAnaDAO.class);
annotationConfiguration.addAnnotatedClass(FirmalarSubelerTelefonDAO.class);
annotationConfiguration.addAnnotatedClass(FirmalarTelefonDAO.class);
annotationConfiguration.addAnnotatedClass(KontakKisilerAnaDAO.class);
annotationConfiguration.addAnnotatedClass(KontakKisilerTelefonDAO.class);
annotationConfiguration.addAnnotatedClass(KosullarDAO.class);
annotationConfiguration.addAnnotatedClass(SehirDAO.class);
annotationConfiguration.addAnnotatedClass(SozlesmelerDAO.class);
annotationConfiguration.addAnnotatedClass(TeslimatSartlariDAO.class);
annotationConfiguration.addAnnotatedClass(UlkeDAO.class);
annotationConfiguration.addAnnotatedClass(UrunlerAnaDAO.class);
annotationConfiguration.addAnnotatedClass(UrunlerExtraDAO.class);
annotationConfiguration.configure("hibernate.cfg.xml");
// new SchemaExport(annotationConfiguration).create(true,true);
Configuration configuration = new Configuration();
configuration.configure();
sessionFactory = configuration.buildSessionFactory();