use of org.sagebionetworks.bridge.dynamodb.DynamoSubpopulation in project BridgeServer2 by Sage-Bionetworks.
the class SubpopulationServiceTest method createSubpop.
private Subpopulation createSubpop(String name, Integer min, Integer max, String group) {
DynamoSubpopulation subpop = new DynamoSubpopulation();
subpop.setAppId(TEST_APP_ID);
subpop.setName(name);
subpop.setGuidString(BridgeUtils.generateGuid());
Criteria criteria = Criteria.create();
if (min != null) {
criteria.setMinAppVersion(OperatingSystem.IOS, min);
}
if (max != null) {
criteria.setMaxAppVersion(OperatingSystem.IOS, max);
}
if (group != null) {
criteria.setAllOfGroups(ImmutableSet.of(group));
}
subpop.setCriteria(criteria);
return subpop;
}
Aggregations