@Override public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) { PersistentSortedMap map = new PersistentSortedMap(session); map.setComparator(comparator); return map; }
@Override @SuppressWarnings("unchecked") public Object firstKey() { read(); return ( (SortedMap) map ).firstKey(); }
@Override @SuppressWarnings("unchecked") public Object remove(Object key) { write(); return subMap.remove( key ); }
@Override public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) { return new PersistentSortedMap( session, (java.util.SortedMap) collection ); } }
@Override public PersistentCollection instantiateWrapper( Object key, PersistentCollectionDescriptor collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentSortedMap( session, collectionDescriptor, key ); }
@Override @SuppressWarnings("unchecked") public Object lastKey() { read(); return ( (SortedMap) map ).lastKey(); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { PersistentSortedMap map = new PersistentSortedMap(session); map.setComparator(comparator); return map; }
@Override public PersistentCollection wrap( SortedMap rawCollection, PersistentCollectionDescriptor collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentSortedMap( session, collectionDescriptor, rawCollection ); } }
@Override @SuppressWarnings("unchecked") public Object put(Object key, Object value) { write(); return subMap.put( key, value ); }
@Override @SuppressWarnings("unchecked") public SortedMap tailMap(Object fromKey) { read(); final SortedMap tailMap = ( (SortedMap) map ).tailMap( fromKey ); return new SortedSubMap( tailMap ); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { PersistentSortedMap map = new PersistentSortedMap(session); map.setComparator(comparator); return map; }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentSortedMap( session, (java.util.SortedMap) collection ); }
@Override @SuppressWarnings("unchecked") public void putAll(Map other) { write(); subMap.putAll( other ); }
@Override @SuppressWarnings("unchecked") public SortedMap subMap(Object fromKey, Object toKey) { read(); final SortedMap subMap = ( (SortedMap) map ).subMap( fromKey, toKey ); return new SortedSubMap( subMap ); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentSortedMap( session, (java.util.SortedMap) collection ); }
@Override @SuppressWarnings("unchecked") public void clear() { write(); subMap.clear(); }