@Override public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) { PersistentSortedSet set = new PersistentSortedSet(session); set.setComparator(comparator); return set; }
@Override @SuppressWarnings("unchecked") public Object first() { read(); return ( (SortedSet) set ).first(); }
@Override public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) { return new PersistentSortedSet( session, (java.util.SortedSet) collection ); } }
@Override @SuppressWarnings("unchecked") public PersistentCollection wrap( SortedSet rawCollection, PersistentCollectionDescriptor collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentSortedSet( session, collectionDescriptor, rawCollection ); }
@Override @SuppressWarnings("unchecked") public Object last() { read(); return ( (SortedSet) set ).last(); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { PersistentSortedSet set = new PersistentSortedSet(session); set.setComparator(comparator); return set; }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentSortedSet( session, (java.util.SortedSet) collection ); } }
@Override @SuppressWarnings("unchecked") public SortedSet headSet(Object toElement) { read(); final SortedSet headSet = ( (SortedSet) set ).headSet( toElement ); return new SubSetProxy( headSet ); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { PersistentSortedSet set = new PersistentSortedSet(session); set.setComparator(comparator); return set; }
@Override @SuppressWarnings("unchecked") public PersistentCollection instantiateWrapper( Object key, PersistentCollectionDescriptor collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentSortedSet( session, collectionDescriptor, key ); }
@Override @SuppressWarnings("unchecked") public SortedSet tailSet(Object fromElement) { read(); final SortedSet tailSet = ( (SortedSet) set ).tailSet( fromElement ); return new SubSetProxy( tailSet ); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentSortedSet( session, (java.util.SortedSet) collection ); } }
@Override @SuppressWarnings("unchecked") public SortedSet subSet(Object fromElement, Object toElement) { read(); final SortedSet subSet = ( (SortedSet) set ).subSet( fromElement, toElement ); return new SubSetProxy( subSet ); }
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)); } }
/** * @see PersistentSortedSet#first() */ public Object first() { read(); return ( (SortedSet) set ).first(); }
if (initialized) { Set<?> set = ((ExternalizablePersistentSet)value).getContentAsSet(target, comparator); coll = (sorted ? new PersistentSortedSet(null, (SortedSet<?>)set) : new PersistentSet(null, set)); coll = (sorted ? new PersistentSortedSet() : new PersistentSet());
@Override @SuppressWarnings("unchecked") public Object first() { read(); return ( (SortedSet) set ).first(); }
@Override @SuppressWarnings("unchecked") public Object last() { read(); return ( (SortedSet) set ).last(); }
/** * @see PersistentSortedSet#first() */ public Object first() { read(); return ( (SortedSet) set ).first(); }
/** * @see PersistentSortedSet#last() */ public Object last() { read(); return ( (SortedSet) set ).last(); }