DiskPersistence implements SQLitePersistence<O, A>, Closeable { @Override public boolean supportsIndex(Index<O> index) { return index instanceof DiskTypeIndex; } protected  DiskPersistence(SimpleAttribute<O, A> primaryKeyAttribute, File file, Properties overrideProperties); @Override SimpleAttribute<O, A> getPrimaryKeyAttribute(); File getFile(); @Override Connection getConnection(Index<?> index, QueryOptions queryOptions); @Override boolean supportsIndex(Index<O> index); @Override void close(); @Override long getBytesUsed(); @Override void compact(); @Override void expand(long numBytes); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override ObjectStore<O> createObjectStore(); @Override SQLiteDiskIdentityIndex<A, O> createIdentityIndex(); @Override void openRequestScopeResources(QueryOptions queryOptions); @Override void closeRequestScopeResources(QueryOptions queryOptions); static File createTempFile(); static DiskPersistence<O, A> onPrimaryKey(SimpleAttribute<O, A> primaryKeyAttribute); static DiskPersistence<O, A> onPrimaryKeyInFile(SimpleAttribute<O, A> primaryKeyAttribute, File file); static DiskPersistence<O, A> onPrimaryKeyInFileWithProperties(SimpleAttribute<O, A> primaryKeyAttribute, File file, Properties overrideProperties);  }
@Test public void testSupportsIndex() { DiskPersistence<Car, Integer> persistence = DiskPersistence.onPrimaryKey(Car.CAR_ID); Index<Car> diskIndex = DiskIndex.onAttribute(Car.MANUFACTURER); Index<Car> offHeapIndex = OffHeapIndex.onAttribute(Car.MANUFACTURER); Index<Car> navigableIndex = NavigableIndex.onAttribute(Car.MANUFACTURER); Assert.assertTrue(persistence.supportsIndex(diskIndex)); Assert.assertFalse(persistence.supportsIndex(offHeapIndex)); Assert.assertFalse(persistence.supportsIndex(navigableIndex)); }