FileDocCategorySizeDatePackage
SortedMapType.javaAPI DocHibernate 3.2.51715Mon Jul 10 11:31:10 BST 2006org.hibernate.type

SortedMapType

public class SortedMapType extends MapType

Fields Summary
private final Comparator
comparator
Constructors Summary
public SortedMapType(String role, String propertyRef, Comparator comparator, boolean isEmbeddedInXML)

		super(role, propertyRef, isEmbeddedInXML);
		this.comparator = comparator;
	
Methods Summary
public java.lang.ClassgetReturnedClass()

		return java.util.SortedMap.class;
	
public org.hibernate.collection.PersistentCollectioninstantiate(org.hibernate.engine.SessionImplementor session, org.hibernate.persister.collection.CollectionPersister persister, java.io.Serializable key)

		if ( session.getEntityMode()==EntityMode.DOM4J ) {
			return new PersistentMapElementHolder(session, persister, key);
		}
		else {
			PersistentSortedMap map = new PersistentSortedMap(session);
			map.setComparator(comparator);
			return map;
		}
	
public java.lang.Objectinstantiate(int anticipatedSize)

		return new TreeMap(comparator);
	
public org.hibernate.collection.PersistentCollectionwrap(org.hibernate.engine.SessionImplementor session, java.lang.Object collection)

		if ( session.getEntityMode()==EntityMode.DOM4J ) {
			return new PersistentElementHolder( session, (Element) collection );
		}
		else {
			return new PersistentSortedMap( session, (java.util.SortedMap) collection );
		}