Example usage for org.hibernate.collection.internal PersistentSortedMap PersistentSortedMap

List of usage examples for org.hibernate.collection.internal PersistentSortedMap PersistentSortedMap

Introduction

In this page you can find the example usage for org.hibernate.collection.internal PersistentSortedMap PersistentSortedMap.

Prototype

@Deprecated
public PersistentSortedMap(SessionImplementor session) 

Source Link

Document

Constructs a PersistentSortedMap.

Usage

From source file:org.granite.hibernate4.jmf.PersistentSortedMapCodec.java

License:Open Source License

public PersistentSortedMap newInstance(ExtendedObjectInput in, String className)
        throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException,
        InvocationTargetException, SecurityException, NoSuchMethodException {

    PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(true, null);
    snapshot.readInitializationData(in);

    if (!snapshot.isInitialized())
        return new PersistentSortedMap(null);

    Comparator<? super Object> comparator = snapshot.newComparator(in);
    return new PersistentSortedMap(null, new TreeMap<Object, Object>(comparator));
}