@Override public Method getWriteMethod() throws NoSuchMethodException { if (MappingUtils.isBlankOrNull(setMethodName)) { throw new MappingException("Custom Map set method not specified for field mapping to class: " + clazz + ". Perhaps the map-set-method wasn't specified in the dozer mapping file?"); } if (writeMethod == null || writeMethod.get() == null) { Method method = findMapMethod(clazz, setMethodName, 2); writeMethod = new SoftReference<Method>(method); } return writeMethod.get(); }
@Override protected Method getReadMethod() throws NoSuchMethodException { if (MappingUtils.isBlankOrNull(getMethodName)) { throw new MappingException("Custom Map get method not specified for field mapping to class: " + clazz + ". Perhaps the map-get-method wasn't specified in the dozer mapping file?"); } if (readMethod == null || readMethod.get() == null) { Method method = findMapMethod(clazz, getMethodName, 1); readMethod = new SoftReference<Method>(method); } return readMethod.get(); }
@Override public Method getWriteMethod() throws NoSuchMethodException { if (MappingUtils.isBlankOrNull(setMethodName)) { throw new MappingException( "Custom Map set method not specified for field mapping to class: " + clazz + ". Perhaps the map-set-method wasn't specified in the dozer mapping file?"); } if (writeMethod == null || writeMethod.get() == null) { Method method = findMapMethod(clazz, setMethodName, 2); writeMethod = new SoftReference<Method>(method); } return writeMethod.get(); }
@Override protected Method getReadMethod() throws NoSuchMethodException { if (MappingUtils.isBlankOrNull(getMethodName)) { throw new MappingException( "Custom Map get method not specified for field mapping to class: " + clazz + ". Perhaps the map-get-method wasn't specified in the dozer mapping file?"); } if (readMethod == null || readMethod.get() == null) { Method method = findMapMethod(clazz, getMethodName, 1); readMethod = new SoftReference<Method>(method); } return readMethod.get(); }
@Override public Method getWriteMethod() throws NoSuchMethodException { if (MappingUtils.isBlankOrNull(setMethodName)) { throw new MappingException( "Custom Map set method not specified for field mapping to class: " + clazz + ". Perhaps the map-set-method wasn't specified in the dozer mapping file?"); } if (writeMethod == null || writeMethod.get() == null) { Method method = findMapMethod(clazz, setMethodName, 2); writeMethod = new SoftReference<Method>(method); } return writeMethod.get(); }
@Override protected Method getReadMethod() throws NoSuchMethodException { if (MappingUtils.isBlankOrNull(getMethodName)) { throw new MappingException( "Custom Map get method not specified for field mapping to class: " + clazz + ". Perhaps the map-get-method wasn't specified in the dozer mapping file?"); } if (readMethod == null || readMethod.get() == null) { Method method = findMapMethod(clazz, getMethodName, 1); readMethod = new SoftReference<Method>(method); } return readMethod.get(); }
private Collection<FieldMap> getGeneralFieldMaps(ClassMap classMap) { // If map id is not specified get field mapping which are defined without // mapId value. Map<String, FieldMap> mappings = new LinkedHashMap<String, FieldMap>(); for (FieldMap fieldMapping : classMap.getFieldMaps()) { String key = MappingUtils.fieldMapKey(fieldMapping); if (MappingUtils.isBlankOrNull(fieldMapping.getMapId())) { mappings.put(key, fieldMapping); } } return mappings.values(); }
private Collection<FieldMap> getFieldMappings(ClassMap classMap, String mapId) { if (MappingUtils.isBlankOrNull(mapId)) { return getGeneralFieldMaps(classMap); } else { return getMapIdSpecificFieldMaps(classMap, mapId); } }
private Collection<FieldMap> getFieldMappings(ClassMap classMap, String mapId) { if (MappingUtils.isBlankOrNull(mapId)) { return getGeneralFieldMaps(classMap); } else { return getMapIdSpecificFieldMaps(classMap, mapId); } }
public void validate() { if (srcField == null || MappingUtils.isBlankOrNull(srcField.getName())) { MappingUtils.throwMappingException("src field must be specified"); } if (destField == null || MappingUtils.isBlankOrNull(destField.getName())) { MappingUtils.throwMappingException("dest field must be specified"); } }
public void validate() { if (srcField == null || MappingUtils.isBlankOrNull(srcField.getName())) { MappingUtils.throwMappingException("src field must be specified"); } if (destField == null || MappingUtils.isBlankOrNull(destField.getName())) { MappingUtils.throwMappingException("dest field must be specified"); } }
public String getDateFormat() { if (!MappingUtils.isBlankOrNull(destField.getDateFormat())) { return destField.getDateFormat(); } else if (!MappingUtils.isBlankOrNull(srcField.getDateFormat())) { return srcField.getDateFormat(); } else { return classMap.getDateFormat(); } }
public String getDateFormat() { if (!MappingUtils.isBlankOrNull(destField.getDateFormat())) { return destField.getDateFormat(); } else if (!MappingUtils.isBlankOrNull(srcField.getDateFormat())) { return srcField.getDateFormat(); } else { return classMap.getDateFormat(); } }
public String getDateFormat() { if (!MappingUtils.isBlankOrNull(destField.getDateFormat())) { return destField.getDateFormat(); } else if (!MappingUtils.isBlankOrNull(srcField.getDateFormat())) { return srcField.getDateFormat(); } else { return classMap.getDateFormat(); } }
public static String getDateFormat(DozerField field, ClassMap classMap) { if (!MappingUtils.isBlankOrNull(field.getDateFormat())) { return field.getDateFormat(); } return classMap.getDateFormat(); }
public static String getDateFormat(DozerField field, ClassMap classMap) { if (!MappingUtils.isBlankOrNull(field.getDateFormat())) { return field.getDateFormat(); } return classMap.getDateFormat(); }
public String getDestFieldMapGetMethod() { return !MappingUtils.isBlankOrNull(destField.getMapGetMethod()) ? destField.getMapGetMethod() : classMap .getDestClassMapGetMethod(); }
public Object create(BeanCreationDirective directive) { Class<?> classToCreate = directive.getActualClass(); String factoryBeanId = directive.getFactoryId(); String beanId = !MappingUtils.isBlankOrNull(factoryBeanId) ? factoryBeanId : classToCreate.getName(); return xmlBeanFactory.createBean(directive.getSrcObject(), directive.getSrcClass(), beanId); }
public Object create(MappingParameters params, BeanCreationDirective directive) { Class<?> classToCreate = directive.getActualClass(); String factoryBeanId = directive.getFactoryId(); String beanId = !MappingUtils.isBlankOrNull(factoryBeanId) ? factoryBeanId : classToCreate.getName(); return xmlBeanFactory.createBean(directive.getSrcObject(), directive.getSrcClass(), beanId); }
public Object create(MappingParameters params, BeanCreationDirective directive) { Class<?> classToCreate = directive.getActualClass(); String factoryBeanId = directive.getFactoryId(); String beanId = !MappingUtils.isBlankOrNull(factoryBeanId) ? factoryBeanId : classToCreate.getName(); return xmlBeanFactory.createBean(directive.getSrcObject(), directive.getSrcClass(), beanId); }