Examples of DozerBeanMapper


Examples of org.dozer.DozerBeanMapper

    public static <T> T toImpl(Object c, Class<T> desiredClass) {

        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(false));

        // Config1DImpl m = mapper.map(c, Config1DImpl.class);
        T m;
        if (c == null) {
            m = null;
        }
        else {
            m = mapper.map(c, desiredClass);
        }
        finalizeCopy(c, m);
        return m;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    }

    private static Object Map(Object o, Class<?> c, boolean toModelList) {
        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(toModelList));

        Object result;
        if (o == null) {
            result = null;
        }
        else {
            result = mapper.map(o, c);
        }
        finalizeCopy(o, result);
        return result;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    public static void copyPartial(Object o, Object dst) {
        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.partial.xml"));
        // mapFiles.add("file:////D:/dozer.partial.xml");
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(false));

        // Object result =
        mapper.map(o, dst);// , "partialTrajectory");
        finalizeCopy(o, dst);
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    public static IConfig<?> copy(IConfig<?> c) {

        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(true));

        // Config1DModel m = mapper.map(c, Config1DModel.class);
        IConfig<?> m;
        if (c == null) {
            m = null;
        }
        else {
            m = (IConfig<?>) mapper.map(c, Object.class);
        }
        finalizeCopy(c, m);
        copyTrajectory(c, m);
        return m;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    public static <T> T toImpl(Object c, Class<T> desiredClass) {

        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(false));

        // Config1DImpl m = mapper.map(c, Config1DImpl.class);
        T m;
        if (c == null) {
            m = null;
        }
        else {
            m = mapper.map(c, desiredClass);
        }
        finalizeCopy(c, m);
        return m;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    }

    private static Object Map(Object o, Class<?> c, boolean toModelList) {
        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(toModelList));

        Object result;
        if (o == null) {
            result = null;
        }
        else {
            result = mapper.map(o, c);
        }
        finalizeCopy(o, result);
        return result;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    public static void copyPartial(Object o, Object dst) {
        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.partial.xml"));
        // mapFiles.add("file:////D:/dozer.partial.xml");
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(false));

        // Object result =
        mapper.map(o, dst);// , "partialTrajectory");
        finalizeCopy(o, dst);
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    public static IConfig<?> copy(IConfig<?> c) {

        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(true));

        // Config1DModel m = mapper.map(c, Config1DModel.class);
        IConfig<?> m;
        if (c == null) {
            m = null;
        }
        else {
            m = (IConfig<?>) mapper.map(c, Object.class);
        }
        finalizeCopy(c, m);
        return m;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    public static <T> T toImpl(Object c, Class<T> desiredClass) {

        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(false));

        // Config1DImpl m = mapper.map(c, Config1DImpl.class);
        T m;
        if (c == null) {
            m = null;
        }
        else {
            m = mapper.map(c, desiredClass);
        }
        finalizeCopy(c, m);
        return m;
    }
View Full Code Here

Examples of org.dozer.DozerBeanMapper

    }

    private static Object Map(Object o, Class<?> c, boolean toModelList) {
        List<String> mapFiles = new ArrayList<String>();
        mapFiles.add(getAccesibleFileName("dozer.xml"));
        DozerBeanMapper mapper = new DozerBeanMapper(mapFiles);
        mapper.setEventListeners(new ArrayList<DozerEventListener>());
        mapper.getEventListeners().add(new Snippet(toModelList));

        Object result;
        if (o == null) {
            result = null;
        }
        else {
            result = mapper.map(o, c);
        }
        finalizeCopy(o, result);
        return result;
    }
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.