@Test void testXrefIntegerIdValue() { Attribute genderIdAttribute = mock(Attribute.class); when(genderIdAttribute.getDataType()).thenReturn(INT); when(genderEntityType.getIdAttribute()).thenReturn(genderIdAttribute); Attribute genderAttr = mock(Attribute.class); when(genderAttr.getDataType()).thenReturn(XREF); when(genderAttr.getRefEntity()).thenReturn(genderEntityType); doReturn(genderAttr).when(entityType).getAttribute("gender"); Query<Entity> q = molgenisRSQL.createQuery("gender==2", repository); assertEquals(new QueryImpl<>().eq("gender", 2), q); }
public Query<Entity> createQuery(String rsql, Repository<Entity> repository) { Node rootNode = rsqlParser.parse(rsql); MolgenisRSQLVisitor visitor = new MolgenisRSQLVisitor(repository); return rootNode.accept(visitor); }
MolgenisRSQL { public Query<Entity> createQuery(String rsql, Repository<Entity> repository) { Node rootNode = rsqlParser.parse(rsql); MolgenisRSQLVisitor visitor = new MolgenisRSQLVisitor(repository); return rootNode.accept(visitor); } }
MolgenisRSQL { public Query<Entity> createQuery(String rsql, Repository<Entity> repository) { Node rootNode = rsqlParser.parse(rsql); MolgenisRSQLVisitor visitor = new MolgenisRSQLVisitor(repository); return rootNode.accept(visitor); } MolgenisRSQL(RSQLParser rsqlParser); }
MolgenisRSQL { public Query<Entity> createQuery(String rsql, Repository<Entity> repository) { Node rootNode = rsqlParser.parse(rsql); MolgenisRSQLVisitor visitor = new MolgenisRSQLVisitor(repository); return rootNode.accept(visitor); } MolgenisRSQL(RSQLParser rsqlParser); Query<Entity> createQuery(String rsql, Repository<Entity> repository); }
MolgenisRSQL { public Query<Entity> createQuery(String rsql, Repository<Entity> repository) { Node rootNode = rsqlParser.parse(rsql); MolgenisRSQLVisitor visitor = new MolgenisRSQLVisitor(repository); return rootNode.accept(visitor); } MolgenisRSQL(RSQLParser rsqlParser); Query<Entity> createQuery(String rsql, Repository<Entity> repository);  }