@@ -0,0 +1,581 @@
+/**%0A * %0A */%0Apackage goodsbase.util;%0A%0Aimport goodsbase.model.Category;%0Aimport goodsbase.model.DataLoadException;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Set;%0A%0A/**Contains useful methods for loading data%0A * @author Daria%0A *%0A */%0Apublic class Loaders %7B%0A%0A%09/**Loads categories and sorts them by name%0A%09 * @throws DataLoadException%0A%09 * */%0A%09public static Category%5B%5D getSortedByNameCategories() throws DataLoadException%7B%09%09 %0A%09%09Set%3CCategory%3E cats = Category.load();%0A%09%09Category%5B%5D catsArr = cats.toArray(new Category%5B0%5D);%0A%09%09Arrays.sort(catsArr, Category.BY_NAME);%0A%09%09return catsArr;%09%09%09%0A%09%7D%0A%09%0A%7D%0A

add class for useful methods new file: src/goodsbase/util/Loaders.java