Spring Framework MutableSortDefinition - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework MutableSortDefinition class.

This code example shows how to use the following methods:
		return this.specialties;
	} 
 
	public List getSpecialties() {
		List sortedSpecs = new ArrayList(getSpecialtiesInternal());
		PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true));
		return Collections.unmodifiableList(sortedSpecs);
	} 
 
	public int getNrOfSpecialties() { 
		return getSpecialtiesInternal().size();
	} 
 
	public void addSpecialty(Specialty specialty) {
		getSpecialtiesInternal().add(specialty);
	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:
		return this.pets;
	} 
 
	public List getPets() {
		List sortedPets = new ArrayList(getPetsInternal());
		PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
		return Collections.unmodifiableList(sortedPets);
	} 
 
	public void addPet(Pet pet) {
		getPetsInternal().add(pet);
		pet.setOwner(this);
	} 
 
	/** 
	 * Return the Pet with the given name, 
	 * or null if none found for this Owner. 
	 * @param name to test 
	 * @return true if pet name is already in use 
	 */ 
5
CodeRank
This code example shows how to use the following methods:
		return this.visits;
	} 
 
	public List getVisits() {
		List sortedVisits = new ArrayList(getVisitsInternal());
		PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
		return Collections.unmodifiableList(sortedVisits);
	} 
 
	public void addVisit(Visit visit) {
		getVisitsInternal().add(visit);
		visit.setPet(this);
	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:
        return this.pets;
    } 
 
    public List getPets() {
        List sortedPets = new ArrayList(getPetsInternal());
        PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true));
        return Collections.unmodifiableList(sortedPets);
    } 
 
    public void addPet(Pet pet) {
        getPetsInternal().add(pet);
        pet.setOwner(this);
    } 
 
    /** 
     * Return the Pet with the given name, or null if none found for this Owner. 
     *  
     * @param name 
     *            to test 
     * @return true if pet name is already in use 
4
CodeRank
This code example shows how to use the following methods:
        return this.visits;
    } 
 
    public List getVisits() {
        List sortedVisits = new ArrayList(getVisitsInternal());
        PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
        return Collections.unmodifiableList(sortedVisits);
    } 
 
    public void addVisit(Visit visit) {
        getVisitsInternal().add(visit);
        visit.setPet(this);
    } 
} 
4
CodeRank
This code example shows how to use the following methods:
        return this.specialties;
    } 
 
    public List getSpecialties() {
        List sortedSpecs = new ArrayList(getSpecialtiesInternal());
        PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true));
        return Collections.unmodifiableList(sortedSpecs);
    } 
 
    public int getNrOfSpecialties() { 
        return getSpecialtiesInternal().size();
    } 
 
    public void addSpecialty(Specialty specialty) {
        getSpecialtiesInternal().add(specialty);
    } 
} 
4
CodeRank
This code example shows how to use the following methods:
        return this.visits;
    } 
 
    public List<Visit> getVisits() {
        List<Visit> sortedVisits = new ArrayList<Visit>(getVisitsInternal());
        PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
        return Collections.unmodifiableList(sortedVisits);
    } 
 
    public void addVisit(Visit visit) {
        getVisitsInternal().add(visit);
        visit.setPet(this);
    } 
 
} 
3
CodeRank
This code example shows how to use the following methods:
        return this.visits;
    } 
 
    public List<Visit> getVisits() {
        List<Visit> sortedVisits = new ArrayList<Visit>(getVisitsInternal());
        PropertyComparator.sort(sortedVisits, new MutableSortDefinition("date", false, false));
        return Collections.unmodifiableList(sortedVisits);
    } 
 
    public void addVisit(Visit visit) {
        getVisitsInternal().add(visit);
        visit.setPet(this);
    } 
 
} 
3
CodeRank