Exemple #1
0
 public List<ProductInfoExt> getProductCatalog(String category) throws BasicException {
   return new PreparedSentence(
           s,
           "SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES "
               + "FROM PRODUCTS P, PRODUCTS_CAT O WHERE P.ID = O.PRODUCT AND P.CATEGORY = ? "
               + "ORDER BY O.CATORDER, P.CODE",
           SerializerWriteString.INSTANCE,
           ProductInfoExt.getSerializerRead())
       .list(category);
 }
Exemple #2
0
 public final ProductInfoExt getProductInfoByReference(String sReference) throws BasicException {
   return (ProductInfoExt)
       new PreparedSentence(
               s,
               "SELECT ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, PRICEBUY, PRICESELL, TAXCAT, CATEGORY, ATTRIBUTESET_ID, IMAGE, ATTRIBUTES "
                   + "FROM PRODUCTS WHERE REFERENCE = ?",
               SerializerWriteString.INSTANCE,
               ProductInfoExt.getSerializerRead())
           .find(sReference);
 }
Exemple #3
0
 public List<ProductInfoExt> getProductComments(String id) throws BasicException {
   return new PreparedSentence(
           s,
           "SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES "
               + "FROM PRODUCTS P, PRODUCTS_CAT O, PRODUCTS_COM M WHERE P.ID = O.PRODUCT AND P.ID = M.PRODUCT2 AND M.PRODUCT = ? "
               + "AND P.ISCOM = "
               + s.DB.TRUE()
               + " "
               + "ORDER BY O.CATORDER, P.NAME",
           SerializerWriteString.INSTANCE,
           ProductInfoExt.getSerializerRead())
       .list(id);
 }
Exemple #4
0
 // Products list
 public final SentenceList getProductList() {
   return new StaticSentence(
       s,
       new QBFBuilder(
           "SELECT ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, PRICEBUY, PRICESELL, TAXCAT, CATEGORY, ATTRIBUTESET_ID, IMAGE, ATTRIBUTES "
               + "FROM PRODUCTS WHERE ?(QBF_FILTER) ORDER BY REFERENCE",
           new String[] {"NAME", "PRICEBUY", "PRICESELL", "CATEGORY", "CODE"}),
       new SerializerWriteBasic(
           new Datas[] {
             Datas.OBJECT,
             Datas.STRING,
             Datas.OBJECT,
             Datas.DOUBLE,
             Datas.OBJECT,
             Datas.DOUBLE,
             Datas.OBJECT,
             Datas.STRING,
             Datas.OBJECT,
             Datas.STRING
           }),
       ProductInfoExt.getSerializerRead());
 }