Package ma.glasnost.orika

Examples of ma.glasnost.orika.MappingContext$NonCyclicMappingContext


    /*
     * New mapping type: Map to Map
     */
    public <Sk, Sv, Dk, Dv> Map<Dk, Dv> mapAsMap(Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType,
            Type<? extends Map<Dk, Dv>> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapAsMap(source, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
       
View Full Code Here


        }
        return destination;
    }
   
    public <S, Dk, Dv> Map<Dk, Dv> mapAsMap(Iterable<S> source, Type<S> sourceType, Type<? extends Map<Dk, Dv>> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapAsMap(source, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

       
        return destination;
    }
   
    public <S, Dk, Dv> Map<Dk, Dv> mapAsMap(S[] source, Type<S> sourceType, Type<? extends Map<Dk, Dv>> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapAsMap(source, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

   
    /*
     * New mapping type: Map to List, Set or Array
     */
    public <Sk, Sv, D> List<D> mapAsList(Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType, Type<D> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapAsList(source, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

       
        return (List<D>) mapAsCollection(MapEntry.entrySet(source), entryType, destinationType, destination, context);
    }
   
    public <Sk, Sv, D> Set<D> mapAsSet(Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType, Type<D> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapAsSet(source, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

        Type<Entry<Sk, Sv>> entryType = TypeFactory.resolveTypeOf(source.entrySet(), sourceType).getNestedType(0);
        return (Set<D>) mapAsCollection(source.entrySet(), entryType, destinationType, destination, context);
    }
   
    public <Sk, Sv, D> D[] mapAsArray(D[] destination, Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType, Type<D> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapAsArray(destination, source, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

       
        return mapAsArray(destination, MapEntry.entrySet(source), entryType, destinationType, context);
    }
   
    public <S, D> void mapAsCollection(Iterable<S> source, Collection<D> destination, Class<D> destinationClass) {
        MappingContext context = contextFactory.getContext();
        try {
            mapAsCollection(source, destination, destinationClass, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

    public <S, D> void mapAsCollection(Iterable<S> source, Collection<D> destination, Class<D> destinationClass, MappingContext context) {
        mapAsCollection(source, destination, null, TypeFactory.valueOf(destinationClass), context);
    }
   
    public <S, D> void mapAsCollection(S[] source, Collection<D> destination, Class<D> destinationClass) {
        MappingContext context = contextFactory.getContext();
        try {
            mapAsCollection(source, destination, destinationClass, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

        mapAsCollection(source, destination, (Type<S>) TypeFactory.valueOf(source.getClass().getComponentType()),
                TypeFactory.valueOf(destinationClass), context);
    }
   
    public <S, D> void mapAsCollection(Iterable<S> source, Collection<D> destination, Type<S> sourceType, Type<D> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            mapAsCollection(source, destination, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

            contextFactory.release(context);
        }
    }
   
    public <S, D> void mapAsCollection(S[] source, Collection<D> destination, Type<S> sourceType, Type<D> destinationType) {
        MappingContext context = contextFactory.getContext();
        try {
            mapAsCollection(source, destination, sourceType, destinationType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

TOP

Related Classes of ma.glasnost.orika.MappingContext$NonCyclicMappingContext

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.