Examples of BeanComparator


Examples of org.apache.commons.beanutils.BeanComparator

                // replace jsp.version property as well
                project.getOriginalModel().getProperties().setProperty("jsp.version", "2.1");
            }
        }

        Collections.sort(newDependencies, new BeanComparator("groupId"));

        project.getOriginalModel().setDependencies(newDependencies);

        Properties currentProperties = project.getOriginalModel().getProperties();
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

         * @return
         * @throws ECARException
         */
        public List ordenaList(List colecao, String campo) throws ECARException{
       Collection medias = colecao;
       BeanComparator ordenaMedia = new BeanComparator(campo,  
           new Comparator() { 
             public int compare(Object o1, Object o2) {             
               return ((Comparable)o2).compareTo((Comparable)o1)
            
           } 
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

        * @return
        * @throws ECARException
        */
       public List ordenaListInvert(List colecao, String campo) throws ECARException{
       Collection medias = colecao;
       BeanComparator ordenaMedia = new BeanComparator(campo,  
           new Comparator() { 
             public int compare(Object o1, Object o2) {             
               return ((Comparable)o2).compareTo((Comparable)o1)*-1
            
           } 
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

            models = systemNotificationService.getAllForTypes(true, types);
        } else {
            models = systemNotificationService.getAllModels(true);
        }

        Comparator<SystemNotificationModel> notificationTypeComparator = new BeanComparator("notificationType", new SystemNotificationTypeComparator());
        Comparator<SystemNotificationModel> notificationSeverityComparator = new BeanComparator("notificationSeverity", new SystemNotificationSeverityComparator());

        ComparatorChain chain = new ComparatorChain();
        chain.addComparator(notificationTypeComparator);
        chain.addComparator(notificationSeverityComparator);
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

        }
        return data;
    }

    public static final BeanComparator getPropertyComparator(String propertyName) {
        return new BeanComparator((null != propertyName) ? propertyName : "name");
    }
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

    public static final BeanComparator getPropertyComparator(String propertyName) {
        return new BeanComparator((null != propertyName) ? propertyName : "name");
    }

    public static <U> BeanComparator getPropertyComparator(String propertyName, Comparator<U> comparator) {
        return new BeanComparator((null != propertyName) ? propertyName : "name", comparator) {

            private static final long serialVersionUID = 5957817419869265091L;

            @SuppressWarnings("unchecked")
            @Override
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

        String sortByBeanProperty = "reviewSubmittedDate";
        if (sortBy == RatingSortType.MOST_HELPFUL) {
            sortByBeanProperty = "helpfulCount";
        }

        Collections.sort(reviewsToReturn, new BeanComparator(sortByBeanProperty));

        return reviewsToReturn;
    }
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

            if (returnList == null) {
                //TODO does this pull the right sandbox in multitenant?
                List<Page> pageList = pageDao.findPageByURI(locale, languageOnlyLocale, uri);
                returnList = buildPageDTOList(pageList, secure);
                if (context.isProductionSandBox()) {
                    Collections.sort(returnList, new BeanComparator("priority"));
                    addPageListToCache(returnList, key);
                }
            }
        }
       
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

                adminModuleDto.setSections(authorizedSections);
            }
        }

        // Sort the authorized modules
        BeanComparator displayComparator = new BeanComparator("displayOrder");
        Collections.sort(adminMenu.getAdminModules(), displayComparator);
    }
View Full Code Here

Examples of org.apache.commons.beanutils.BeanComparator

            AdvancedOffer advancedOffer = (AdvancedOffer) offer;
            if (advancedOffer.isTieredOffer()) {
                int quantity = promotableCandidateItemOffer.calculateTargetQuantityForTieredOffer();
                List<OfferTier> offerTiers = advancedOffer.getOfferTiers();

                Collections.sort(offerTiers, new BeanComparator("minQuantity"));

                OfferTier maxTier = null;
                //assuming that promotableOffer.getOffer()).getOfferTiers() is sorted already
                for (OfferTier currentTier : offerTiers) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.