Package org.dozer.loader

Examples of org.dozer.loader.CustomMappingsLoader.load()


    return processor;
  }

  void loadCustomMappings() {
    CustomMappingsLoader customMappingsLoader = new CustomMappingsLoader();
    LoadMappingsResult loadMappingsResult = customMappingsLoader.load(mappingFiles, builderMappings);
    this.customMappings = loadMappingsResult.getCustomMappings();
    this.globalConfiguration = loadMappingsResult.getGlobalConfiguration();
  }

  public void setMappings(List<? extends BeanMappingBuilder> mappingBuilder) {
View Full Code Here


    private Map<String, ClassMap> loadMappings(DozerBeanMapper mapper) {
        // TODO: This is a little wasteful as dozer has already parsed this
        // information, if does not expose it though so it must be done again.
        // Create a patch for Dozer to expose this.
        CustomMappingsLoader customMappingsLoader = new CustomMappingsLoader();
        LoadMappingsResult loadMappingsResult = customMappingsLoader.load(mapper.getMappingFiles());
        Map<String, ClassMap> all = loadMappingsResult.getCustomMappings().getAll();
        return all;
    }

    public CamelContext getCamelContext() {
View Full Code Here

  }

  private synchronized void loadCustomMappings() {
    if (this.customMappings == null) {
      CustomMappingsLoader customMappingsLoader = new CustomMappingsLoader();
      LoadMappingsResult loadMappingsResult = customMappingsLoader.load(mappingFiles);
      this.customMappings = loadMappingsResult.getCustomMappings();
      this.globalConfiguration = loadMappingsResult.getGlobalConfiguration();
    }
  }
View Full Code Here

    CustomMappingsLoader customMappingsLoader = new CustomMappingsLoader();
    List<MappingFileData> xmlMappings = loadFromFiles(mappingFiles);
    ArrayList<MappingFileData> allMappings = new ArrayList<MappingFileData>();
    allMappings.addAll(xmlMappings);
    allMappings.addAll(builderMappings);
    LoadMappingsResult loadMappingsResult = customMappingsLoader.load(allMappings);
    this.customMappings = loadMappingsResult.getCustomMappings();
    this.globalConfiguration = loadMappingsResult.getGlobalConfiguration();
  }

  private List<MappingFileData> loadFromFiles(List<String> mappingFiles) {
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.