Package org.mapstruct

Examples of org.mapstruct.CollectionMappingStrategy


            return ReportingPolicy.WARN.name();
        }
    }

    public CollectionMappingStrategy getCollectionMappingStrategy() {
        CollectionMappingStrategy mapperPolicy = valueOf( mapperPrism.collectionMappingStrategy() );

        if ( !mapperPolicy.equals( CollectionMappingStrategy.DEFAULT ) ) {
            // it is not the default mapper configuration, so return the mapper configured value
            return mapperPolicy;
        }
        else if ( mapperConfigPrism != null ) {
            // try the config mapper configuration
            CollectionMappingStrategy configPolicy = valueOf( mapperConfigPrism.collectionMappingStrategy() );
            if ( !configPolicy.equals( CollectionMappingStrategy.DEFAULT ) ) {
                // its not the default configuration, so return the mapper config configured value
                return configPolicy;
            }
        }
        // when nothing specified, return ACCESSOR_ONLY (default option)
View Full Code Here


        /**
         * This method builds the list of target accessors.
         */
        private Map<String, ExecutableElement> initTargetPropertyAccessors() {
            // fetch settings from element to implement
            CollectionMappingStrategy cmStrategy = getEffectiveCollectionMappingStrategy();

            // collect all candidate target accessors
            List<ExecutableElement> candidates = new ArrayList<ExecutableElement>();
            candidates.addAll( method.getResultType().getSetters() );
            candidates.addAll( method.getResultType().getAlternativeTargetAccessors() );
View Full Code Here

TOP

Related Classes of org.mapstruct.CollectionMappingStrategy

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.