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