Esempio n. 1
0
 public final SentenceList getCategoriesList() {
   return new StaticSentence(
       s,
       "SELECT ID, NAME, IMAGE FROM CATEGORIES ORDER BY NAME",
       null,
       CategoryInfo.getSerializerRead());
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 // 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();
 }