@Override
public List<Category> getAllCategoriesParent () throws FaceletException {
// Get regular list
- List<Category> deque = new LinkedList<>();
+ List<Category> list = new LinkedList<>();
- // Create fake entry
- Category fake = new ProductCategory(0L, this.getMessageStringFromKey("ADMIN_CATEGORY_HAS_NO_PARENT"), null); //NOI18N
+ // Create null category
+ Category nullCategory = new ProductCategory();
+ nullCategory.setCategoryTitle(this.getMessageStringFromKey("ADMIN_CATEGORY_HAS_NO_PARENT")); //NOI18N
// Add it
- deque.add(fake);
+ list.add(nullCategory);
// Add all
- deque.addAll(this.getAllCategories());
+ list.addAll(this.getAllCategories());
// Return it
- return deque;
+ return list;
}
@Override