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

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

Introduction

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

Prototype

@Deprecated
public PersistentSortedSet(SessionImplementor session) 

Source Link

Document

Constructs a PersistentSortedSet

Usage

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

License:Open Source License

public PersistentSortedSet 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 PersistentSortedSet(null);

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