⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 factory.java

📁 图书馆管理系统,用java编写,有原码,有检索,查询,修改,删除等功能
💻 JAVA
字号:
package com.autumn.pojo.oper;

import org.hibernate.Session;
import org.hibernate.cfg.Configuration;

public class Factory {
	private static Session session = null ; 
	public static BookOper getBookOperInstance()
	{
		return new BookOper() ;
	}
	public static BorrowedOper getBorrowedOperInstance() 
	{
		return new BorrowedOper() ;
	}
	public static ManagerOper getManagerOperIntance()
	{
		return new ManagerOper() ;
	}
	public static ReaderOper getReaderOperIntance()
	{
			return new ReaderOper() ;
	}
	public static HistoryOper getHistoryOperInstance()
	{
		return new HistoryOper() ;
	}
	
	public static Session getSession()
	{
		if(session==null||!session.isOpen()){
			session=new Configuration().configure().buildSessionFactory().openSession();
		}
		return session ;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -