@ SuppressWarnings ( "unchecked" ) public List < Team > getTeams ( ) { pm . getFetchPlan ( ) . addGroup ( Team . FetchGroup . ALL . name ( ) ) ; final Query query = pm . newQuery ( Team . class ) ; query . setOrdering ( "name asc" ) ; return ( List < Team > ) query . execute ( ) ; }
Returns a complete list of all Team objects in ascending order by name .