Examples of addFieldMapping()


Examples of org.dozer.classmap.ClassMap.addFieldMapping()

            } else { // if it is a one-way field map make the other field map excluded
              // make a prime field map
              fieldMapPrime = new ExcludeFieldMap(classMapPrime);
              MappingUtils.reverseFields(fieldMap, fieldMapPrime);
            }
            classMapPrime.addFieldMapping(fieldMapPrime);
          }
        } else {
          // since it is one-way...we still need to validate if it has some type of method mapping and validate the
          // field maps
          for (Object fm : fms) {
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

            MappingUtils.applyGlobalCopyByReference(globalConfiguration, oneWayFieldMap, classMap);
            // check to see if we need to exclude the map
            if (MappingDirection.ONE_WAY.equals(oneWayFieldMap.getType())) {
              fieldMapPrime = new ExcludeFieldMap(classMapPrime);
              MappingUtils.reverseFields(oneWayFieldMap, fieldMapPrime);
              classMapPrime.addFieldMapping(fieldMapPrime);
            }
          }
        }
      }
      // if it is a one way mapping or a method/iterate method mapping we can not bi-directionally map
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

    }


    public void build() {
      ClassMap classMap = fieldMap.getClassMap();
      classMap.addFieldMapping(fieldMap);
    }

  }

  public static class FieldMappingBuilder implements FieldBuider {
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

  @Test
  public void testAddFieldMappings() throws Exception {
    ClassMap cm = new ClassMap(null);
    GenericFieldMap fm = new GenericFieldMap(cm);

    cm.addFieldMapping(fm);

    assertNotNull(cm.getFieldMaps());
    assertTrue(cm.getFieldMaps().size() == 1);
    assertEquals(cm.getFieldMaps().get(0), fm);
  }
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

    }


    public void build() {
      ClassMap classMap = fieldMap.getClassMap();
      classMap.addFieldMapping(fieldMap);
    }

  }

  public static class FieldMappingBuilder implements FieldBuider {
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

            } else { // if it is a one-way field map make the other field map excluded
              // make a prime field map
              fieldMapPrime = new ExcludeFieldMap(classMapPrime);
              MappingUtils.reverseFields(fieldMap, fieldMapPrime);
            }
            classMapPrime.addFieldMapping(fieldMapPrime);
          }
        } else {
          // since it is one-way...we still need to validate if it has some type of method mapping and validate the
          // field maps
          for (Object fm : fms) {
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

            MappingUtils.applyGlobalCopyByReference(globalConfiguration, oneWayFieldMap, classMap);
            // check to see if we need to exclude the map
            if (MappingDirection.ONE_WAY.equals(oneWayFieldMap.getType())) {
              fieldMapPrime = new ExcludeFieldMap(classMapPrime);
              MappingUtils.reverseFields(oneWayFieldMap, fieldMapPrime);
              classMapPrime.addFieldMapping(fieldMapPrime);
            }
          }
        }
      }
      // if it is a one way mapping or a method/iterate method mapping we can not bi-directionally map
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

  @Test
  public void testAddFieldMappings() throws Exception {
    ClassMap cm = new ClassMap(null);
    GenericFieldMap fm = new GenericFieldMap(cm);

    cm.addFieldMapping(fm);

    assertNotNull(cm.getFieldMaps());
    assertTrue(cm.getFieldMaps().size() == 1);
    assertEquals(cm.getFieldMaps().get(0), fm);
  }
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

            } else { // if it is a one-way field map make the other field map excluded
              // make a prime field map
              fieldMapPrime = new ExcludeFieldMap(classMapPrime);
              MappingUtils.reverseFields(fieldMap, fieldMapPrime);
            }
            classMapPrime.addFieldMapping(fieldMapPrime);
          }
        } else {
          // since it is one-way...we still need to validate if it has some type of method mapping and validate the
          // field maps
          for (FieldMap oneWayFieldMap : fms.toArray(new FieldMap[]{})) {
View Full Code Here

Examples of org.dozer.classmap.ClassMap.addFieldMapping()

            MappingUtils.applyGlobalCopyByReference(globalConfiguration, oneWayFieldMap, classMap);
            // check to see if we need to exclude the map
            if (MappingDirection.ONE_WAY.equals(oneWayFieldMap.getType())) {
              fieldMapPrime = new ExcludeFieldMap(classMapPrime);
              MappingUtils.reverseFields(oneWayFieldMap, fieldMapPrime);
              classMapPrime.addFieldMapping(fieldMapPrime);
            }
          }
        }
      }
      // if it is a one way mapping or a method/iterate method mapping we can not bi-directionally map
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.