public final SentenceList getCategoriesList() { return new StaticSentence( s, "SELECT ID, NAME, IMAGE FROM CATEGORIES ORDER BY NAME", null, CategoryInfo.getSerializerRead()); }
public final List<CategoryInfo> getSubcategories(String category) throws BasicException { return new PreparedSentence( s, "SELECT ID, NAME, IMAGE FROM CATEGORIES WHERE PARENTID = ? ORDER BY NAME", SerializerWriteString.INSTANCE, CategoryInfo.getSerializerRead()) .list(category); }
// Catalogo de productos public final List<CategoryInfo> getRootCategories() throws BasicException { return new PreparedSentence( s, "SELECT ID, NAME, IMAGE FROM CATEGORIES WHERE PARENTID IS NULL ORDER BY NAME", null, CategoryInfo.getSerializerRead()) .list(); }