Example #1
0
  @Override
  public List<DictionaryData> findDictValue(String columnValue) throws Exception {

    Dictionary dictionary =
        (Dictionary) this.findByColumn(Dictionary.class.getName(), "code", columnValue).get(0);
    Set<DictionaryData> dictionaryDatas = dictionary.getDatas();
    List<DictionaryData> list =
        new ArrayList<DictionaryData>(Arrays.asList(dictionaryDatas.toArray()));
    // 对list排序,
    PropertyComparator.sort(list, new MutableSortDefinition("id", false, true));
    return list;
  }
Example #2
0
 @XmlElement
 public List<Specialty> getSpecialties() {
   List<Specialty> sortedSpecs = new ArrayList<Specialty>(getSpecialtiesInternal());
   PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true));
   return Collections.unmodifiableList(sortedSpecs);
 }
Example #3
0
 public List<Pet> getPets() {
   List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
   PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
   return Collections.unmodifiableList(sortedPets);
 }
Example #4
0
 public List<Visit> getVisits() {
   List<Visit> sortedVisits = new ArrayList<Visit>(getVisitsInternal());
   PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
   return Collections.unmodifiableList(sortedVisits);
 }