Examples of AQualifiedType


Examples of com.ajjpj.amapper.core.tpe.AQualifiedType

    @Override public Object map (Object source, Object target, AQualifiedSourceAndTargetType types, AMapperWorker<? extends ACollectionHelper> worker, AMap<String, Object> context, APath path) throws Exception {
        if (source == null) {
            return null;
        }

        final AQualifiedType sourceElementType = worker.getHelpers ().elementType (types.source ());
        final AQualifiedType targetElementType = worker.getHelpers ().elementType (types.target ());

        final AQualifiedSourceAndTargetType elTypes = AQualifiedSourceAndTargetType.create (sourceElementType, targetElementType);

        final Map<Object, Object> targetValuesByIdentifier = byIdentifier (worker.getHelpers ().asJuCollection (target, types.target ()),
                worker.getIdentifierExtractor (),
View Full Code Here

Examples of com.ajjpj.amapper.core.tpe.AQualifiedType

    @Override public Object provideInstance(Object source, Object targetRaw, JavaBeanType<?> sourceType, JavaBeanType<?> targetType) throws Exception {
        return targetRaw != null ? targetRaw : targetType.cls.newInstance();
    }

    @Override public AQualifiedType elementType(AQualifiedType tpe) {
        return new AQualifiedType (((SingleParamBeanType<?,?>) tpe.tpe).getParamType(), tpe.qualifier);
    }
View Full Code Here

Examples of com.ajjpj.amapper.core.tpe.AQualifiedType

    @Override public Object provideInstance(Object source, Object targetRaw, JavaBeanType<?> sourceType, JavaBeanType<?> targetType) throws Exception {
        return targetRaw != null ? targetRaw : targetType.cls.newInstance();
    }

    @Override public AQualifiedType elementType(AQualifiedType tpe) {
        return new AQualifiedType (((SingleParamBeanType<?,?>) tpe.tpe).getParamType(), tpe.qualifier);
    }
View Full Code Here

Examples of com.ajjpj.amapper.core.tpe.AQualifiedType

    @Override public Object map (Object source, Object target, AQualifiedSourceAndTargetType types, AMapperWorker<? extends ACollectionHelper> worker, AMap<String, Object> context, APath path) throws Exception {
        if (source == null) {
            return null;
        }

        final AQualifiedType sourceElementType = worker.getHelpers ().elementType (types.source ());
        final AQualifiedType targetElementType = worker.getHelpers ().elementType (types.target ());

        final AQualifiedSourceAndTargetType elTypes = AQualifiedSourceAndTargetType.create (sourceElementType, targetElementType);

        final Map<Object, Object> targetValuesByIdentifier = byIdentifier (worker.getHelpers ().asJuCollection (target, types.target ()),
                worker.getIdentifierExtractor (),
View Full Code Here

Examples of com.ajjpj.amapper.core.tpe.AQualifiedType

    //TODO test this
    @Override public void diff (ADiffBuilder diff, Object sourceOld, Object sourceNew, AQualifiedSourceAndTargetType types, AMapperDiffWorker<? extends ACollectionHelper> worker, AMap<String, Object> contextOld, AMap<String, Object> contextNew, APath path, boolean isDerived) throws Exception {
        final AType targetElementType = worker.getHelpers ().elementType (types.target ()).tpe;
        final AType targetTypeAsList = JavaBeanTypes.create (List.class, ((JavaBeanType) targetElementType).cls);
        final AQualifiedSourceAndTargetType typesWithListTarget = AQualifiedSourceAndTargetType.create (types.source (), new AQualifiedType (targetTypeAsList, types.targetQualifier ()));

        worker.diff (path, sourceOld, sourceNew, typesWithListTarget, contextOld, contextNew, isDerived);
    }
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.