OffHeapPersistence implements SQLitePersistence<O, A>, Closeable { @Override public boolean supportsIndex(Index<O> index) { return index instanceof OffHeapTypeIndex; } protected  OffHeapPersistence(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties); @Override SimpleAttribute<O, A> getPrimaryKeyAttribute(); String getInstanceName(); @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 SQLiteObjectStore<O, A> createObjectStore(); @Override SQLiteOffHeapIdentityIndex<A, O> createIdentityIndex(); @Override void openRequestScopeResources(QueryOptions queryOptions); @Override void closeRequestScopeResources(QueryOptions queryOptions); static OffHeapPersistence<O, A> onPrimaryKey(SimpleAttribute<O, A> primaryKeyAttribute); static OffHeapPersistence<O, A> onPrimaryKeyWithProperties(SimpleAttribute<O, A> primaryKeyAttribute, Properties overrideProperties);  }
@Test public void testSupportsIndex() { OffHeapPersistence<Car, Integer> persistence = OffHeapPersistence.onPrimaryKey(Car.CAR_ID); Index<Car> offHeapIndex = OffHeapIndex.onAttribute(Car.MANUFACTURER); Index<Car> diskIndex = DiskIndex.onAttribute(Car.MANUFACTURER); Index<Car> navigableIndex = NavigableIndex.onAttribute(Car.MANUFACTURER); Assert.assertTrue(persistence.supportsIndex(offHeapIndex)); Assert.assertFalse(persistence.supportsIndex(diskIndex)); Assert.assertFalse(persistence.supportsIndex(navigableIndex)); }