public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentElementHolder(session, persister, key); } else { PersistentSortedSet set = new PersistentSortedSet(session); set.setComparator(comparator); return set; } }
/** * @see PersistentSortedSet#last() */ public Object last() { read(); return ( (java.util.SortedSet) set ).last(); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentElementHolder( session, (Element) collection ); } else { return new PersistentSortedSet( session, (java.util.SortedSet) collection ); } } }
public PersistentSortedSet( SessionImplementor session, CollectionPersister persister, Comparator comparator, Serializable disassembled, Object owner) throws HibernateException { this(session); this.comparator=comparator; beforeInitialize(persister); Serializable[] array = (Serializable[]) disassembled; for (int i=0; i<array.length; i++ ) set.add( persister.getElementType().assemble( array[i], session, owner ) ); setInitialized(); }
SortedSet ss = new TreeSet(pss.comparator()); ss.addAll((Collection) o); return ss;
public PersistentCollection wrap(SessionImplementor session, Object collection) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentElementHolder( session, (Element) collection ); } else { return new PersistentSortedSet( session, (java.util.SortedSet) collection ); } } }
SortedSet ss = new TreeSet(pss.comparator()); ss.addAll(list); return ss;
/** * @see PersistentSortedSet#last() */ public Object last() { read(); return ( (SortedSet) set ).last(); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentElementHolder(session, persister, key); } else { PersistentSortedSet set = new PersistentSortedSet(session); set.setComparator(comparator); return set; } }
/** * @see PersistentSortedSet#first() */ public Object first() { read(); return ( (SortedSet) set ).first(); }
/** * @see PersistentSortedSet#first() */ public Object first() { read(); return ( (java.util.SortedSet) set ).first(); }
/** * @see PersistentSortedSet#tailSet(Object) */ public java.util.SortedSet tailSet(Object fromElement) { read(); java.util.SortedSet s = ( (java.util.SortedSet) set ).tailSet(fromElement); return new SubSetProxy(s); }
/** * @see PersistentSortedSet#headSet(Object) */ public java.util.SortedSet headSet(Object toElement) { read(); java.util.SortedSet s = ( (java.util.SortedSet) set ).headSet(toElement); return new SubSetProxy(s); }
/** * @see PersistentSortedSet#headSet(Object) */ public SortedSet headSet(Object toElement) { read(); SortedSet s = ( (SortedSet) set ).headSet(toElement); return new SubSetProxy(s); }
/** * @see PersistentSortedSet#tailSet(Object) */ public SortedSet tailSet(Object fromElement) { read(); SortedSet s = ( (SortedSet) set ).tailSet(fromElement); return new SubSetProxy(s); }
/** * @see PersistentSortedSet#subSet(Object,Object) */ public java.util.SortedSet subSet(Object fromElement, Object toElement) { read(); java.util.SortedSet s; s = ( (java.util.SortedSet) set ).subSet(fromElement, toElement); return new SubSetProxy(s); }
/** * @see PersistentSortedSet#subSet(Object,Object) */ public SortedSet subSet(Object fromElement, Object toElement) { read(); SortedSet s; s = ( (SortedSet) set ).subSet(fromElement, toElement); return new SubSetProxy(s); }