OrderedSlotCollection returned in case of ordered multivalued index BLD200306060100
authordprusa@netbeans.org
Thu, 05 Jun 2003 09:08:58 +0000
changeset 1291f772e4169b3c
parent 1290 97c40ff3906b
child 1292 0121faf0606f
OrderedSlotCollection returned in case of ordered multivalued index
mdr/src/org/netbeans/mdr/storagemodel/transientimpl/TransientMultivaluedIndex.java
mdr/src/org/netbeans/mdr/storagemodel/transientimpl/TransientMultivaluedOrderedIndex.java
     1.1 --- a/mdr/src/org/netbeans/mdr/storagemodel/transientimpl/TransientMultivaluedIndex.java	Thu Jun 05 08:24:58 2003 +0000
     1.2 +++ b/mdr/src/org/netbeans/mdr/storagemodel/transientimpl/TransientMultivaluedIndex.java	Thu Jun 05 09:08:58 2003 +0000
     1.3 @@ -352,7 +352,13 @@
     1.4          }
     1.5      }
     1.6      
     1.7 +    protected SlotCollection createSlotCollection (Object key, Collection c) {
     1.8 +        return new SlotCollection (key, c);
     1.9 +    }
    1.10      
    1.11 +    protected SlotCollection createSlotCollection (Object key, Collection c, SinglevaluedIndex repos) {
    1.12 +        return new SlotCollection (key, c, repos);
    1.13 +    }
    1.14      
    1.15      /** Returns a collection view of the values associated in the index with specified key.
    1.16       * Returned collection is read only and may not be modified.
    1.17 @@ -371,7 +377,7 @@
    1.18              c = new ArrayList();
    1.19              this.map.put(key,c);
    1.20          }
    1.21 -        return new SlotCollection(key, c);
    1.22 +        return createSlotCollection(key, c);
    1.23      }
    1.24      
    1.25      /** Like getItems, but if the index contains keys, this returns the objects
    1.26 @@ -390,7 +396,7 @@
    1.27              c = new ArrayList();
    1.28              this.map.put(key, c);
    1.29          }
    1.30 -        return new SlotCollection(key, c, repos);
    1.31 +        return createSlotCollection(key, c, repos);
    1.32      }
    1.33      
    1.34      protected void handleRemove(Object key, Object value) throws StorageException {
     2.1 --- a/mdr/src/org/netbeans/mdr/storagemodel/transientimpl/TransientMultivaluedOrderedIndex.java	Thu Jun 05 08:24:58 2003 +0000
     2.2 +++ b/mdr/src/org/netbeans/mdr/storagemodel/transientimpl/TransientMultivaluedOrderedIndex.java	Thu Jun 05 09:08:58 2003 +0000
     2.3 @@ -315,6 +315,14 @@
     2.4          this.txlog.push(new CompensatingTransaction.AddOrderedCTx(key, value, index));
     2.5      }
     2.6      
     2.7 +    protected SlotCollection createSlotCollection (Object key, Collection c) {
     2.8 +        return new OrderedSlotCollection (key, c);
     2.9 +    }
    2.10 +    
    2.11 +    protected SlotCollection createSlotCollection (Object key, Collection c, SinglevaluedIndex repos) {
    2.12 +        return new OrderedSlotCollection (key, c, repos);
    2.13 +    }
    2.14 +    
    2.15      /** Returns a list view of the values assosiated in the index with specified key.
    2.16       * Returned collection is read only and may not be modified.
    2.17       * If there are no values associated with the key empty collection is returned.