public TraitsDetailView(int resourceId, int definitionId) {
super(null, new TraitsDataSource(), createCriteria(resourceId, definitionId));
}
private static Criteria createCriteria(int resourceId, int definitionId) {
Criteria criteria = new Criteria();
criteria.addCriteria(MeasurementDataTraitCriteria.FILTER_FIELD_RESOURCE_ID, resourceId);
criteria.addCriteria(MeasurementDataTraitCriteria.FILTER_FIELD_DEFINITION_ID, definitionId);
return criteria;
}