@Test @DisplayName("fail to create query with mask when id list is empty") void failForEmptyIds() { assertThrows(IllegalArgumentException.class, () -> factory.byIdsWithMask(TEST_ENTITY_TYPE, emptySet(), "", "")); }
public Query byIdsWithMask(Class<? extends EntityState> entityClass, Set<?> ids, String... maskPaths) { checkSpecified(entityClass); checkNotNull(ids); checkArgument(!ids.isEmpty(), ENTITY_IDS_EMPTY_MSG); FieldMask fieldMask = fromStringList(null, ImmutableList.copyOf(maskPaths)); Query result = composeQuery(entityClass, ids, null, fieldMask); return result; }
QueryFactory { public Query byIdsWithMask(Class<? extends EntityState> entityClass, Set<?> ids, String... maskPaths) { checkSpecified(entityClass); checkNotNull(ids); checkArgument(!ids.isEmpty(), ENTITY_IDS_EMPTY_MSG); FieldMask fieldMask = fromStringList(null, ImmutableList.copyOf(maskPaths)); Query result = composeQuery(entityClass, ids, null, fieldMask); return result; } }
QueryFactory { public Query byIdsWithMask(Class<? extends EntityState> entityClass, Set<?> ids, String... maskPaths) { checkSpecified(entityClass); checkNotNull(ids); checkArgument(!ids.isEmpty(), ENTITY_IDS_EMPTY_MSG); FieldMask fieldMask = fromStringList(null, ImmutableList.copyOf(maskPaths)); Query result = composeQuery(entityClass, ids, null, fieldMask); return result; } QueryFactory(ActorRequestFactory actorRequestFactory); }
QueryFactory { public Query byIdsWithMask(Class<? extends EntityState> entityClass, Set<?> ids, String... maskPaths) { checkSpecified(entityClass); checkNotNull(ids); checkArgument(!ids.isEmpty(), ENTITY_IDS_EMPTY_MSG); FieldMask fieldMask = fromStringList(null, ImmutableList.copyOf(maskPaths)); Query result = composeQuery(entityClass, ids, null, fieldMask); return result; } QueryFactory(ActorRequestFactory actorRequestFactory); QueryBuilder select(Class<? extends EntityState> targetType); Query byIdsWithMask(Class<? extends EntityState> entityClass,
                               Set<?> ids,
                               String... maskPaths); Query byIds(Class<? extends EntityState> entityClass, Set<?> ids); Query allWithMask(Class<? extends EntityState> entityClass, String... maskPaths); Query all(Class<? extends EntityState> entityClass); }
QueryFactory { public Query byIdsWithMask(Class<? extends EntityState> entityClass, Set<?> ids, String... maskPaths) { checkSpecified(entityClass); checkNotNull(ids); checkArgument(!ids.isEmpty(), ENTITY_IDS_EMPTY_MSG); FieldMask fieldMask = fromStringList(null, ImmutableList.copyOf(maskPaths)); Query result = composeQuery(entityClass, ids, null, fieldMask); return result; } QueryFactory(ActorRequestFactory actorRequestFactory); QueryBuilder select(Class<? extends EntityState> targetType); Query byIdsWithMask(Class<? extends EntityState> entityClass,
                               Set<?> ids,
                               String... maskPaths); Query byIds(Class<? extends EntityState> entityClass, Set<?> ids); Query allWithMask(Class<? extends EntityState> entityClass, String... maskPaths); Query all(Class<? extends EntityState> entityClass);  }