Java 类org.springframework.beans.support.MutableSortDefinition 实例源码

项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:amazon-ecs-java-microservices    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs,
            new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:artifactory    文件:ListPropertySorter.java   
/**
 * Sorts the input string using property comparator. The property must have a getter and must be primitive type or
 * to implement Comparable. The sort is not case sensitive if the property is character based.
 *
 * @param listToSort Modifiable list to sort
 * @param sortParam  The property to sort by and is ascending or descending.
 */
public static void sort(List listToSort, SortParam sortParam) {
    if (!listToSort.isEmpty() && sortParam != null) {
        final String property = sortParam.getProperty();
        if (StringUtils.hasText(property)) {
            final SortDefinition sortDefinition = new MutableSortDefinition(property, true,
                    sortParam.isAscending());
            Collections.sort(listToSort, new PropertyComparator(sortDefinition));
        }
    }
}
项目:artifactory    文件:MasterDetailRowPanel.java   
private void sortList(List<D> list, SortParam sortParam) {
    if (sortParam != null && sortParam.getProperty().startsWith("detail.")) {
        ListPropertySorter.sort(list, sortParam);
        final String property = sortParam.getProperty().substring(7);
        final SortDefinition sortDefinition = new MutableSortDefinition(property, true, sortParam.isAscending());
        Collections.sort(list, new PropertyComparator(sortDefinition));
    }
}
项目:artifactory    文件:MasterDetailTable.java   
@Override
@SuppressWarnings({"unchecked"})
public Iterator iterator(int first, int count) {
    final SortParam sortParam = getSort();
    if (sortParam != null && sortParam.getProperty().startsWith("master.")) {
        ListPropertySorter.sort(list, sortParam);
        final String property = sortParam.getProperty().substring(7);
        final SortDefinition sortDefinition = new MutableSortDefinition(property, true,
                sortParam.isAscending());
        Collections.sort(list, new PropertyComparator(sortDefinition));
    }
    List<?> result = list.subList(first, first + count);
    return result.iterator();
}
项目:nextreports-server    文件:SortableDataAdapter.java   
@Override
public Iterator<T> iterator(long first, long count) {
    long size = provider.size();
    List<T> resources = new ArrayList<T>((int) size);
    Iterator<? extends T> iter = provider.iterator(0, size);
    while (iter.hasNext()) {
        resources.add(iter.next());
    }

    if (comparators != null) {
        SortParam<String> sortParam = getSort();
        if (sortParam != null) {
            String sortProperty = sortParam.getProperty();
            if (sortProperty != null) {
                Comparator<T> comparator = comparators.get(sortProperty);
                if (comparator != null) {
                    Collections.sort(resources, comparator);
                    if (getSort().isAscending() == false) {
                        Collections.reverse(resources);
                    }
                } else {
                    SortDefinition sortDefinition = new MutableSortDefinition(sortProperty, true, getSort().isAscending());
                    PropertyComparator.sort(resources, sortDefinition);
                }                       
            }
        }
    }

    return Collections.unmodifiableList(resources.subList((int) first, (int) (first + count))).iterator();
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:amazon-ecs-java-microservices    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:amazon-ecs-java-microservices    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits,
            new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}
项目:DevOps-for-Web-Development    文件:Vet.java   
@XmlElement
public List<Specialty> getSpecialties() {
    List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal());
    PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedSpecs);
}
项目:DevOps-for-Web-Development    文件:Owner.java   
public List<Pet> getPets() {
    List<Pet> sortedPets = new ArrayList<>(getPetsInternal());
    PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
    return Collections.unmodifiableList(sortedPets);
}
项目:DevOps-for-Web-Development    文件:Pet.java   
public List<Visit> getVisits() {
    List<Visit> sortedVisits = new ArrayList<>(getVisitsInternal());
    PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
    return Collections.unmodifiableList(sortedVisits);
}