private static SampleTypeModel createAllTypesModel(List<SampleType> basicTypes) {
    final SampleType allSampleType = new SampleType();
    allSampleType.setCode(EntityType.ALL_TYPES_CODE);
    allSampleType.setListable(true);

    Set<SampleTypePropertyType> allPropertyTypes = new HashSet<SampleTypePropertyType>();
    for (SampleType basicType : basicTypes) {
      allPropertyTypes.addAll(basicType.getAssignedPropertyTypes());
      setDatabaseInstance(allSampleType, basicType.getDatabaseInstance());
    }

    allSampleType.setSampleTypePropertyTypes(
        new ArrayList<SampleTypePropertyType>(allPropertyTypes));

    return new SampleTypeModel(allSampleType);
  }