Package org.hoteia.qalingo.core.web.mvc.viewbean

Examples of org.hoteia.qalingo.core.web.mvc.viewbean.ValueBean


      final Map<String, String> titles = referentialDataService.getTitlesByLocale(locale);
      if(titles != null){
        Set<String> titlesKey = titles.keySet();
        for (Iterator<String> iterator = titlesKey.iterator(); iterator.hasNext();) {
          final String titleKey = (String) iterator.next();
          titlesValues.add(new ValueBean(titleKey.replace(Constants.TITLE_MESSAGE_PREFIX, ""), titles.get(titleKey)));
        }
        Collections.sort(titlesValues, new Comparator<ValueBean>() {
          @Override
          public int compare(ValueBean o1, ValueBean o2) {
            return o1.getValue().compareTo(o2.getValue());
View Full Code Here


      final Map<String, String> countries = referentialDataService.getCountriesByLocale(locale);
      if(countries != null){
        Set<String> countriesKey = countries.keySet();
        for (Iterator<String> iterator = countriesKey.iterator(); iterator.hasNext();) {
          final String countryKey = (String) iterator.next();
          countriesValues.add(new ValueBean(countryKey.replace(Constants.COUNTRY_MESSAGE_PREFIX, ""), countries.get(countryKey)));
        }
        Collections.sort(countriesValues, new Comparator<ValueBean>() {
          @Override
          public int compare(ValueBean o1, ValueBean o2) {
            return o1.getValue().compareTo(o2.getValue());
View Full Code Here

         
      final Map<String, String> countries = referentialDataService.getCountriesByLocale(locale);
      Set<String> countriesKey = countries.keySet();
      for (Iterator<String> iterator = countriesKey.iterator(); iterator.hasNext();) {
        final String countryKey = (String) iterator.next();
        countriesValues.add(new ValueBean(countryKey.replace(Constants.COUNTRY_MESSAGE_PREFIX, ""), countries.get(countryKey)));
      }
      Collections.sort(countriesValues, new Comparator<ValueBean>() {
        @Override
        public int compare(ValueBean o1, ValueBean o2) {
          return o1.getValue().compareTo(o2.getValue());
View Full Code Here

          searchFacetViewBean.setName(facetField.getName());
            List<ValueBean> values = new ArrayList<ValueBean>();
            for (Iterator<Count> iterator = facetField.getValues().iterator(); iterator.hasNext();) {
                Count count = (Count) iterator.next();
                final CatalogCategoryMaster catalogCategoryMaster = catalogCategoryService.getMasterCatalogCategoryByCode(count.getName(), requestData.getMasterCatalogCode());
                ValueBean valueBean = new ValueBean(catalogCategoryMaster.getCode(), catalogCategoryMaster.getI18nName(localeCode) + "(" + count.getCount() + ")");               
                values.add(valueBean);
            }
            searchFacetViewBean.setValues(values);
        }
       
View Full Code Here

        if(StoreResponseBean.STORE_DEFAULT_FACET_FIELD.equalsIgnoreCase(facetField.getName())){
          searchFacetViewBean.setName(facetField.getName());
            List<ValueBean> values = new ArrayList<ValueBean>();
            for (Iterator<Count> iterator = facetField.getValues().iterator(); iterator.hasNext();) {
                Count count = (Count) iterator.next();
                ValueBean valueBean = new ValueBean();
                valueBean.setValue(count.getName()+ "(" + count.getCount() + ")");
                valueBean.setKey(count.getName());
                values.add(valueBean);
            }
            Collections.sort(values, new Comparator<ValueBean>() {

        @Override
        public int compare(ValueBean o1, ValueBean o2) {
          return o1.getValue().compareTo(o2.getValue());
        }
             
      });
           
            searchFacetViewBean.setValues(values);
        }
       
        if(StoreResponseBean.STORE_SECOND_FACET_FIELD.equalsIgnoreCase(facetField.getName())){
          searchFacetViewBean.setName(facetField.getName());
            List<ValueBean> values = new ArrayList<ValueBean>();
            for (Iterator<Count> iterator = facetField.getValues().iterator(); iterator.hasNext();) {
                Count count = (Count) iterator.next();
                ValueBean valueBean = new ValueBean();
                valueBean.setValue(count.getName()+ "(" + count.getCount() + ")");
                valueBean.setKey(count.getName());
                values.add(valueBean);
            }
            Collections.sort(values, new Comparator<ValueBean>() {

        @Override
View Full Code Here

                }
            }
           
            customerViewBean.setActive(customer.isActive());

            final ValueBean customerScreenNameValueBean = new ValueBean();
            customerScreenNameValueBean.setKey(getSpecificMessage(ScopeWebMessage.CUSTOMER, "screenname.label", locale));
            customerScreenNameValueBean.setValue(customer.getScreenName());
            customerViewBean.getCustomerAttributes().put(CustomerViewBean.SCREEN_NAME, customerScreenNameValueBean);

        }
        return customerViewBean;
    }
View Full Code Here

         
      final Map<String, String> countries = referentialDataService.getCountriesByLocale(locale);
      Set<String> countriesKey = countries.keySet();
      for (Iterator<String> iterator = countriesKey.iterator(); iterator.hasNext();) {
        final String countryKey = (String) iterator.next();
        countriesValues.add(new ValueBean(countryKey.replace(Constants.COUNTRY_MESSAGE_PREFIX, ""), countries.get(countryKey)));
      }
      Collections.sort(countriesValues, new Comparator<ValueBean>() {
        @Override
        public int compare(ValueBean o1, ValueBean o2) {
          return o1.getValue().compareTo(o2.getValue());
View Full Code Here

      final Map<String, String> countries = referentialDataService.getCountriesByLocale(locale);
      if(countries != null){
        Set<String> countriesKey = countries.keySet();
        for (Iterator<String> iterator = countriesKey.iterator(); iterator.hasNext();) {
          final String countryKey = (String) iterator.next();
          countriesValues.add(new ValueBean(countryKey.replace(Constants.COUNTRY_MESSAGE_PREFIX, ""), countries.get(countryKey)));
        }
        Collections.sort(countriesValues, new Comparator<ValueBean>() {
          @Override
          public int compare(ValueBean o1, ValueBean o2) {
            return o1.getValue().compareTo(o2.getValue());
View Full Code Here

        List<Retailer> retailers = retailerService.findAllRetailers();
          if(retailers != null){
            for (Iterator<Retailer> iterator = retailers.iterator(); iterator.hasNext();) {
              Retailer retailerIt = (Retailer) iterator.next();
                final String retailerId = retailerIt.getId().toString();
                retailerValues.add(new ValueBean(retailerId, retailerIt.getName()));
            }
            Collections.sort(retailerValues, new Comparator<ValueBean>() {
          @Override
          public int compare(ValueBean o1, ValueBean o2) {
            return o1.getValue().compareTo(o2.getValue());
View Full Code Here

      final Map<String, String> countries = referentialDataService.getCountriesByLocale(locale);
      if(countries != null){
        Set<String> countriesKey = countries.keySet();
        for (Iterator<String> iterator = countriesKey.iterator(); iterator.hasNext();) {
          final String countryKey = (String) iterator.next();
          countriesValues.add(new ValueBean(countryKey.replace(Constants.COUNTRY_MESSAGE_PREFIX, ""), countries.get(countryKey)));
        }
        Collections.sort(countriesValues, new Comparator<ValueBean>() {
          @Override
          public int compare(ValueBean o1, ValueBean o2) {
            return o1.getValue().compareTo(o2.getValue());
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.web.mvc.viewbean.ValueBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.