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

📄 sortedmaptype.java

📁 用Java实现的23个常用设计模式源代码
💻 JAVA
字号:
//$Id: SortedMapType.java,v 1.9.2.2 2003/11/06 13:49:11 oneovthafew Exp $package net.sf.hibernate.type;import java.io.Serializable;import java.util.Comparator;import net.sf.hibernate.HibernateException;import net.sf.hibernate.collection.CollectionPersister;import net.sf.hibernate.collection.PersistentCollection;import net.sf.hibernate.collection.SortedMap;import net.sf.hibernate.engine.SessionImplementor;public class SortedMapType extends MapType {		private final Comparator comparator;		public SortedMapType(String role, Comparator comparator) {		super(role);		this.comparator = comparator;	}		public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister) {		SortedMap map = new SortedMap(session);		map.setComparator(comparator);		return map;	}		public Class getReturnedClass() {		return java.util.SortedMap.class;	}		public PersistentCollection wrap(SessionImplementor session, Object collection) {		return new SortedMap( session, (java.util.SortedMap) collection );	}		public PersistentCollection assembleCachedCollection(		SessionImplementor session,		CollectionPersister persister,		Serializable disassembled,		Object owner)		throws HibernateException {		return new SortedMap(session, persister, comparator, disassembled, owner);		}}

⌨️ 快捷键说明

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