<commit_before>/*
 * Copyright © 2013 <NAME>, Inc. (JSI). All Rights Reserved.
 *
 * The U.S. Agency for International Development (USAID) funded this section of the application development under the terms of the USAID | DELIVER PROJECT contract no. GPO-I-00-06-00007-00.
 */

package org.openlmis.report.mapper.lookup;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.openlmis.report.model.dto.Product;
import org.openlmis.report.model.dto.ProductList;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * e-lmis
 * Created by: <NAME>
 * Date: 4/12/13
 * Time: 2:39 AM
 */
@Repository
public interface ProductReportMapper {

    @Select("SELECT id, primaryname as name, code, " +
            "CASE WHEN tracer = true THEN 'Indicator Product' ELSE 'Regular' END tracer" +
            " " +
            "   FROM " +
            "       products order by tracer,name")
    List<Product> getAll();

    @Select("SELECT * " +
            "   FROM " +
            "       products")
    List<ProductList> getFullProductList();

    @Select("SELECT id, primaryname as name, code, " +
            "CASE WHEN tracer = true THEN 'Indicator Product' ELSE 'Regular' END tracer  " +
            "FROM products " +
            "WHERE categoryid = #{categoryId} " +
            "order by tracer,name")
    List<Product> getProductListByCategory(@Param("categoryId") Integer categoryId);




}<commit_msg>ELMIS-594 : Supply Status by Facility - List all Products a Product filter field<commit_after>/*
 * Copyright © 2013 <NAME>, Inc. (JSI). All Rights Reserved.
 *
 * The U.S. Agency for International Development (USAID) funded this section of the application development under the terms of the USAID | DELIVER PROJECT contract no. GPO-I-00-06-00007-00.
 */

package org.openlmis.report.mapper.lookup;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.openlmis.report.model.dto.Product;
import org.openlmis.report.model.dto.ProductList;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * e-lmis
 * Created by: <NAME>
 * Date: 4/12/13
 * Time: 2:39 AM
 */
@Repository
public interface ProductReportMapper {

    @Select("SELECT id, genericname as name, code, " +
            "CASE WHEN tracer = true THEN 'Indicator Product' ELSE 'Regular' END tracer" +
            " " +
            "   FROM " +
            "       products order by tracer,name")
    List<Product> getAll();

    @Select("SELECT * " +
            "   FROM " +
            "       products")
    List<ProductList> getFullProductList();

    @Select("SELECT id, genericname as name, code, " +
            "CASE WHEN tracer = true THEN 'Indicator Product' ELSE 'Regular' END tracer  " +
            "FROM products " +
            "WHERE categoryid = #{categoryId} " +
            "order by tracer,name")
    List<Product> getProductListByCategory(@Param("categoryId") Integer categoryId);




}
{'fraction_non_alphanumeric': 0.11665004985044865, 'fraction_numerical': 0.016284479893652375, 'mean_word_length': 2.810126582278481, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6038812', 'n_tokens_mistral': 942, 'n_tokens_neox': 870, 'n_words': 251}