Package ma.glasnost.orika

Examples of ma.glasnost.orika.MappingContext$Factory


     * ma.glasnost.orika.MapperFactory#lookupMapper(ma.glasnost.orika.metadata
     * .MapperKey)
     */
    @SuppressWarnings("unchecked")
    public <A, B> Mapper<A, B> lookupMapper(MapperKey mapperKey) {
        MappingContext context = contextFactory.getContext();
        try {
            return (Mapper<A, B>) lookupMapper(mapperKey, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here


     * @see
     * ma.glasnost.orika.MapperFactory#lookupObjectFactory(ma.glasnost.orika
     * .metadata.Type)
     */
    public <T> ObjectFactory<T> lookupObjectFactory(Type<T> targetType) {
        MappingContext context = contextFactory.getContext();
        try {
            return lookupObjectFactory(targetType, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

    @SuppressWarnings("unchecked")
    public <A, B> void registerClassMap(ClassMap<A, B> classMap) {
        classMapRegistry.put(new MapperKey(classMap.getAType(), classMap.getBType()), (ClassMap<Object, Object>) classMap);
        if (isBuilding || isBuilt) {
           
            MappingContext context = contextFactory.getContext();
            try {
                buildMapper(classMap, /** isAutoGenerated == **/isBuilding, context);
               
                buildObjectFactories(classMap, context);
                initializeUsedMappers(classMap);
View Full Code Here

    public synchronized void build() {
       
        if (!isBuilding) {
            isBuilding = true;
           
            MappingContext context = contextFactory.getContext();
            try {
                converterFactory.setMapperFacade(mapperFacade);
               
                if (useBuiltinConverters) {
                    BuiltinConverters.register(converterFactory);
View Full Code Here

    public Type<B> getBType() {
        return bType;
    }
   
    public B map(A instanceA) {
        MappingContext context = contextFactory.getContext();
        try {
            return map(instanceA, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

            contextFactory.release(context);
        }
    }
   
    public A mapReverse(B source) {
        MappingContext context = contextFactory.getContext();
        try {
            return mapReverse(source, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

            contextFactory.release(context);
        }
    }
   
    public B map(A instanceA, B instanceB) {
        MappingContext context = contextFactory.getContext();
        try {
           return map(instanceA, instanceB, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

            contextFactory.release(context);
        }
    }
   
    public A mapReverse(B instanceB, A instanceA) {
        MappingContext context = contextFactory.getContext();
        try {
           return mapReverse(instanceB, instanceA, context);
        } finally {
            contextFactory.release(context);
        }
View Full Code Here

TOP

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

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.