test_class.file: code/src/test/java/com/googlecode/cqengine/persistence/composite/CompositePersistenceTest.java
test_class.identifier: CompositePersistenceTest
test_case.body: @Test
      public void testCompositePersistence_EndToEnd() {
          OffHeapPersistence<Car, Integer> offHeapPersistence = OffHeapPersistence.onPrimaryKey(Car.CAR_ID);
          DiskPersistence<Car, Integer> diskPersistence = DiskPersistence.onPrimaryKey(Car.CAR_ID);
          IndexedCollection<Car> collection = new ConcurrentIndexedCollection<Car>(CompositePersistence.of(
                  offHeapPersistence,
                  diskPersistence,
                  singletonList(OnHeapPersistence.onPrimaryKey(Car.CAR_ID))
          ));
  
          collection.addIndex(DiskIndex.onAttribute(Car.MANUFACTURER));
          collection.addIndex(OffHeapIndex.onAttribute(Car.MODEL));
          collection.addIndex(NavigableIndex.onAttribute(Car.PRICE));
  
          collection.addAll(CarFactory.createCollectionOfCars(1000));
  
          ResultSet<Car> results = null;
          try {
              results = collection.retrieve(
                      and(
                              or(
                                      equal(Car.MANUFACTURER, "Ford"),
                                      equal(Car.MODEL, "Avensis")
                              ),
                              lessThan(Car.PRICE, 6000.0)
                      )
              );
              Assert.assertEquals(300, results.size());
  
              Assert.assertTrue(offHeapPersistence.getBytesUsed() > 4096); // example: 163840
              Assert.assertTrue(diskPersistence.getBytesUsed() > 4096); // example: 30720
          }
          finally {
              CloseableRequestResources.closeQuietly(results);
              collection.clear();
              offHeapPersistence.close();
              diskPersistence.getFile().delete();
          }
      }
test_case.class_method_signature: CompositePersistenceTest.testCompositePersistence_EndToEnd()
test_case.full_signature: @Test public void testCompositePersistence_EndToEnd()
test_case.identifier: testCompositePersistence_EndToEnd
test_case.invocations: onPrimaryKey onPrimaryKey of singletonList onPrimaryKey addIndex onAttribute addIndex onAttribute addIndex onAttribute addAll createCollectionOfCars retrieve and or equal equal lessThan assertEquals size assertTrue getBytesUsed assertTrue getBytesUsed closeQuietly clear close delete getFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompositePersistence_EndToEnd()
focal_class.declarator: primaryPersistence
focal_class.modifier: final
focal_class.original_string: final Persistence<O, A> primaryPersistence;
focal_class.type: Persistence<O, A>
focal_class.var_name: primaryPersistence
focal_class.declarator: secondaryPersistence
focal_class.modifier: final
focal_class.original_string: final Persistence<O, A> secondaryPersistence;
focal_class.type: Persistence<O, A>
focal_class.var_name: secondaryPersistence
focal_class.declarator: additionalPersistences
focal_class.modifier: final
focal_class.original_string: final List<? extends Persistence<O, A>> additionalPersistences;
focal_class.type: List<? extends Persistence<O, A>>
focal_class.var_name: additionalPersistences
focal_class.declarator: indexPersistences = new ConcurrentHashMap<Index<O>, Persistence<O, A>>(1, 1.0F, 1)
focal_class.modifier: final
focal_class.original_string: final ConcurrentMap<Index<O>, Persistence<O, A>> indexPersistences = new ConcurrentHashMap<Index<O>, Persistence<O, A>>(1, 1.0F, 1);
focal_class.type: ConcurrentMap<Index<O>, Persistence<O, A>>
focal_class.var_name: indexPersistences
focal_class.file: code/src/main/java/com/googlecode/cqengine/persistence/composite/CompositePersistence.java
focal_class.identifier: CompositePersistence
focal_class.interfaces: implements Persistence<O, A>
focal_class.class_method_signature: CompositePersistence.CompositePersistence(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.full_signature: public  CompositePersistence(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.identifier: CompositePersistence
focal_class.modifiers: public
focal_class.parameters: (Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.signature:  CompositePersistence(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.class_method_signature: CompositePersistence.getPrimaryKeyAttribute()
focal_class.full_signature: @Override public SimpleAttribute<O, A> getPrimaryKeyAttribute()
focal_class.identifier: getPrimaryKeyAttribute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SimpleAttribute<O, A>
focal_class.signature: SimpleAttribute<O, A> getPrimaryKeyAttribute()
focal_class.class_method_signature: CompositePersistence.supportsIndex(Index<O> index)
focal_class.full_signature: @Override public boolean supportsIndex(Index<O> index)
focal_class.identifier: supportsIndex
focal_class.modifiers: @Override public
focal_class.parameters: (Index<O> index)
focal_class.return: boolean
focal_class.signature: boolean supportsIndex(Index<O> index)
focal_class.class_method_signature: CompositePersistence.getPersistenceForIndex(Index<O> index)
focal_class.full_signature: public Persistence<O, A> getPersistenceForIndex(Index<O> index)
focal_class.identifier: getPersistenceForIndex
focal_class.modifiers: public
focal_class.parameters: (Index<O> index)
focal_class.return: Persistence<O, A>
focal_class.signature: Persistence<O, A> getPersistenceForIndex(Index<O> index)
focal_class.class_method_signature: CompositePersistence.createObjectStore()
focal_class.full_signature: @Override public ObjectStore<O> createObjectStore()
focal_class.identifier: createObjectStore
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ObjectStore<O>
focal_class.signature: ObjectStore<O> createObjectStore()
focal_class.class_method_signature: CompositePersistence.getPersistenceForIndexOrNullWithCaching(Index<O> index)
focal_class.full_signature:  Persistence<O, A> getPersistenceForIndexOrNullWithCaching(Index<O> index)
focal_class.identifier: getPersistenceForIndexOrNullWithCaching
focal_class.parameters: (Index<O> index)
focal_class.return: Persistence<O, A>
focal_class.signature: Persistence<O, A> getPersistenceForIndexOrNullWithCaching(Index<O> index)
focal_class.class_method_signature: CompositePersistence.getPersistenceForIndexOrNull(Index<O> index)
focal_class.full_signature:  Persistence<O, A> getPersistenceForIndexOrNull(Index<O> index)
focal_class.identifier: getPersistenceForIndexOrNull
focal_class.parameters: (Index<O> index)
focal_class.return: Persistence<O, A>
focal_class.signature: Persistence<O, A> getPersistenceForIndexOrNull(Index<O> index)
focal_class.class_method_signature: CompositePersistence.getPrimaryPersistence()
focal_class.full_signature: public Persistence<O, A> getPrimaryPersistence()
focal_class.identifier: getPrimaryPersistence
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Persistence<O, A>
focal_class.signature: Persistence<O, A> getPrimaryPersistence()
focal_class.class_method_signature: CompositePersistence.getSecondaryPersistence()
focal_class.full_signature: public Persistence<O, A> getSecondaryPersistence()
focal_class.identifier: getSecondaryPersistence
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Persistence<O, A>
focal_class.signature: Persistence<O, A> getSecondaryPersistence()
focal_class.class_method_signature: CompositePersistence.getAdditionalPersistences()
focal_class.full_signature: public List<? extends Persistence<O, A>> getAdditionalPersistences()
focal_class.identifier: getAdditionalPersistences
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<? extends Persistence<O, A>>
focal_class.signature: List<? extends Persistence<O, A>> getAdditionalPersistences()
focal_class.class_method_signature: CompositePersistence.validatePersistenceArguments(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.full_signature: static void validatePersistenceArguments(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.identifier: validatePersistenceArguments
focal_class.modifiers: static
focal_class.parameters: (Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.return: void
focal_class.signature: void validatePersistenceArguments(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.class_method_signature: CompositePersistence.validatePersistenceArgument(Persistence<O, A> persistence, SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.full_signature: static SimpleAttribute<O, A> validatePersistenceArgument(Persistence<O, A> persistence, SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.identifier: validatePersistenceArgument
focal_class.modifiers: static
focal_class.parameters: (Persistence<O, A> persistence, SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.return: SimpleAttribute<O, A>
focal_class.signature: SimpleAttribute<O, A> validatePersistenceArgument(Persistence<O, A> persistence, SimpleAttribute<O, A> primaryKeyAttribute)
focal_class.class_method_signature: CompositePersistence.openRequestScopeResources(QueryOptions queryOptions)
focal_class.full_signature: @Override public void openRequestScopeResources(QueryOptions queryOptions)
focal_class.identifier: openRequestScopeResources
focal_class.modifiers: @Override public
focal_class.parameters: (QueryOptions queryOptions)
focal_class.return: void
focal_class.signature: void openRequestScopeResources(QueryOptions queryOptions)
focal_class.class_method_signature: CompositePersistence.closeRequestScopeResources(QueryOptions queryOptions)
focal_class.full_signature: @Override public void closeRequestScopeResources(QueryOptions queryOptions)
focal_class.identifier: closeRequestScopeResources
focal_class.modifiers: @Override public
focal_class.parameters: (QueryOptions queryOptions)
focal_class.return: void
focal_class.signature: void closeRequestScopeResources(QueryOptions queryOptions)
focal_class.class_method_signature: CompositePersistence.of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.full_signature: public static CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.return: CompositePersistence<O, A>
focal_class.signature: CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_class.class_method_signature: CompositePersistence.of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence)
focal_class.full_signature: public static CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence)
focal_class.return: CompositePersistence<O, A>
focal_class.signature: CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence)
focal_method.body: public static <O, A extends Comparable<A>> CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences) {
          return new CompositePersistence<O, A>(primaryPersistence, secondaryPersistence, additionalPersistences);
      }
focal_method.class_method_signature: CompositePersistence.of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_method.full_signature: public static CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_method.identifier: of
focal_method.modifiers: public static
focal_method.parameters: (Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)
focal_method.return: CompositePersistence<O, A>
focal_method.signature: CompositePersistence<O, A> of(Persistence<O, A> primaryPersistence, Persistence<O, A> secondaryPersistence, List<? extends Persistence<O, A>> additionalPersistences)