use of org.infinispan.query.dsl.embedded.testdomain.NotIndexed in project infinispan by infinispan.
the class EmbeddedRemoteInteropQueryTest method testEmbeddedQueryForEmbeddedEntryOnNonIndexedType.
public void testEmbeddedQueryForEmbeddedEntryOnNonIndexedType() {
cache.put(1, new NotIndexed("testing 123"));
// get user back from remote cache via query and check its attributes
QueryFactory qf = org.infinispan.query.Search.getQueryFactory(cache);
Query<NotIndexed> query = qf.create("FROM " + NotIndexed.class.getName() + " WHERE notIndexedField LIKE '%123%'");
List<NotIndexed> list = query.execute().list();
assertNotNull(list);
assertEquals(1, list.size());
assertNotNull(list.get(0));
assertEquals("testing 123", list.get(0).notIndexedField);
}
use of org.infinispan.query.dsl.embedded.testdomain.NotIndexed in project infinispan by infinispan.
the class QueryStringTest method testDeleteByQueryOnNonIndexedType.
public void testDeleteByQueryOnNonIndexedType() {
getCacheForWrite().put("notIndexedToBeDeleted", new NotIndexed("testing delete"));
Query<NotIndexed> select = createQueryFromString("FROM " + NotIndexed.class.getName() + " WHERE notIndexedField = 'testing delete'");
assertEquals(OptionalLong.of(1), select.execute().hitCount());
Query<Transaction> delete = createQueryFromString("DELETE FROM " + NotIndexed.class.getName() + " WHERE notIndexedField = 'testing delete'");
assertEquals(1, delete.executeStatement());
assertEquals(OptionalLong.of(0), select.execute().hitCount());
}
use of org.infinispan.query.dsl.embedded.testdomain.NotIndexed in project infinispan by infinispan.
the class EmbeddedRemoteInteropQueryTest method testRemoteQueryForEmbeddedEntryOnNonIndexedType.
public void testRemoteQueryForEmbeddedEntryOnNonIndexedType() {
cache.put(1, new NotIndexed("testing 123"));
// get user back from remote cache via query and check its attributes
QueryFactory qf = Search.getQueryFactory(remoteCache);
Query<NotIndexed> query = qf.create("FROM sample_bank_account.NotIndexed WHERE notIndexedField LIKE '%123%'");
List<NotIndexed> list = query.execute().list();
assertNotNull(list);
assertEquals(1, list.size());
assertNotNull(list.get(0));
assertEquals("testing 123", list.get(0).notIndexedField);
}
use of org.infinispan.query.dsl.embedded.testdomain.NotIndexed in project infinispan by infinispan.
the class RemoteQueryDisableIndexingTest method populateCache.
@BeforeClass
protected void populateCache() {
getCacheForWrite().put("notIndexed1", new NotIndexed("testing 123"));
getCacheForWrite().put("notIndexed2", new NotIndexed("xyz"));
}
use of org.infinispan.query.dsl.embedded.testdomain.NotIndexed in project infinispan by infinispan.
the class RemoteQueryStringTest method testDeleteByQueryOnNonIndexedType.
@Override
public void testDeleteByQueryOnNonIndexedType() {
getCacheForWrite().put("notIndexedToBeDeleted", new NotIndexed("testing delete"));
Query<NotIndexed> select = createQueryFromString("FROM sample_bank_account.NotIndexed WHERE notIndexedField = 'testing delete'");
assertEquals(OptionalLong.of(1), select.execute().hitCount());
Query<Transaction> delete = createQueryFromString("DELETE FROM sample_bank_account.NotIndexed WHERE notIndexedField = 'testing delete'");
assertEquals(1, delete.executeStatement());
assertEquals(OptionalLong.of(0), select.execute().hitCount());
}
Aggregations