diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/IMapper.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/IMapper.java
index bbbea198..da1eee1f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/IMapper.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/IMapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java
index b1677056..cbac31d1 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
index eef5632b..4b574620 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java
index f26e89c7..da2d7a73 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JGlobalMap.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JGlobalMap.java
index b0c5485b..ebcf5ac3 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JGlobalMap.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JGlobalMap.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMap.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMap.java
index a2f45be5..857e612b 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMap.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMap.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessor.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessor.java
index 1043fa41..3d219683 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessor.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessor.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessors.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessors.java
index 94c33456..9b84c140 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessors.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapAccessors.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapConversion.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapConversion.java
index be256b8b..77433174 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapConversion.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/JMapConversion.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/package-info.java
index 96a4370b..a62f398f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ConfigReader.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ConfigReader.java
index 54e88255..a200dfe6 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ConfigReader.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ConfigReader.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Constants.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Constants.java
index 1a624fe7..08a0739c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Constants.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Constants.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ public final class Constants {
public static final String CONTENT_ALREADY_DEFINED = "not needed";
public static final String MSG_FILE = "com/googlecode/jmapper/config/jmapper.msg.properties";
+ public static final String nestedBeanNullException = "nestedBeanNullException";
public static final String customMethodException = "customMethodException";
public static final String nullPointerContent = "nullPointerContent";
public static final String nullPointer = "nullPointer";
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
index 8dc3b0f0..05f85272 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,11 +39,26 @@
public final class Error {
/*
####################################
- # MapperGenerator exceptions #
+ # Nested mapping exceptions #
####################################
*/
-
+ /**
+ * Thrown when the source field is null in a mapping of nested type.
+ * @param currentField current field
+ * @param destinationClass destination class
+ * @param destinationField destination field
+ * @param sourceClass source class
+ * @param sourceField source field
+ */
+ public static void nestedBeanNull(String currentField, String destinationClass, String destinationField, String sourceClass, String sourceField){
+ throw new NestedBeanNullException(MSG.INSTANCE.message(nestedBeanNullException,currentField,destinationClass,destinationField,sourceClass,sourceField));
+ }
+ /*
+ ####################################
+ # MapperGenerator exceptions #
+ ####################################
+ */
/**
* Thrown when the explicit conversion method defined has a null pointer.
* Used in the generated code, in case of dynamic methods defined.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/JmapperLog.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/JmapperLog.java
index e3a954ba..b43e41ea 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/JmapperLog.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/JmapperLog.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/MSG.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/MSG.java
index 67ffe57b..bd3ff5b6 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/MSG.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/MSG.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ResourceLoader.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ResourceLoader.java
index e869212e..777067f1 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ResourceLoader.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ResourceLoader.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/package-info.java
index 7f025e9f..e6e43d6a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/config/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/config/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionAnalyzer.java
index 11977b1b..d12a6515 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionHandler.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionHandler.java
index 43b61b21..123964f4 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionHandler.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionHandler.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionMethod.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionMethod.java
index 60398d7a..953e0e55 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionMethod.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionMethod.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionPlaceholder.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionPlaceholder.java
index 0e89a6f5..a17cbaf0 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionPlaceholder.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/explicit/ConversionPlaceholder.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionAnalyzer.java
index 0d4d6919..a35db013 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionHandler.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionHandler.java
index 973d40b4..5d23c02e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionHandler.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionHandler.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionMethod.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionMethod.java
index cdf23cca..d0c1189d 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionMethod.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionMethod.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/package-info.java
index aa985856..b2a24a44 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ChooseConfig.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ChooseConfig.java
index 5d61c065..474254c9 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ChooseConfig.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ChooseConfig.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConfigurationType.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConfigurationType.java
index 79eb02d6..c68f07a8 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConfigurationType.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConfigurationType.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConversionType.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConversionType.java
index b65a1e5d..18ba401b 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConversionType.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/ConversionType.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/Membership.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/Membership.java
index 2839a80f..39910d82 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/Membership.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/Membership.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/OperationType.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/OperationType.java
index f343b289..8500236e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/OperationType.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/OperationType.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/package-info.java
index f49dde38..b9996da9 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/enums/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/AbsentRelationshipException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/AbsentRelationshipException.java
index 38e932b1..edbfc77b 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/AbsentRelationshipException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/AbsentRelationshipException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ClassNotMappedException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ClassNotMappedException.java
index 0ef85d4d..fe0723f7 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ClassNotMappedException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ClassNotMappedException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionBodyIllegalCodeException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionBodyIllegalCodeException.java
index 2d43233b..c671921a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionBodyIllegalCodeException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionBodyIllegalCodeException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionParameterException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionParameterException.java
index 19cb4d8e..3b215677 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionParameterException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/ConversionParameterException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionBodyException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionBodyException.java
index 8f324166..0008f99e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionBodyException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionBodyException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionMethodException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionMethodException.java
index 439a4bfa..bf11458d 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionMethodException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionMethodException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionParameterException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionParameterException.java
index 49c91be6..e5481325 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionParameterException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/DynamicConversionParameterException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/IllegalCodeException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/IllegalCodeException.java
index 23314341..4a4ae12f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/IllegalCodeException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/IllegalCodeException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/InvalidNestedMappingException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/InvalidNestedMappingException.java
index 4b84f830..d9e7f9ea 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/InvalidNestedMappingException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/InvalidNestedMappingException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/JMapperException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/JMapperException.java
index 83acd587..2ceaf849 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/JMapperException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/JMapperException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/LoadingFileException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/LoadingFileException.java
index a2fb9d5b..ddd77fc0 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/LoadingFileException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/LoadingFileException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MalformedBeanException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MalformedBeanException.java
index 881ca6e5..deef6aac 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MalformedBeanException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MalformedBeanException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingErrorException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingErrorException.java
index c1fc96c2..0a838bb5 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingErrorException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingErrorException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingException.java
index 5c2bf2f4..81540a0d 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingNotFoundException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingNotFoundException.java
index 508ea793..6af9dbb0 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingNotFoundException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/MappingNotFoundException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NestedBeanNullException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NestedBeanNullException.java
new file mode 100644
index 00000000..0219fd87
--- /dev/null
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NestedBeanNullException.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.googlecode.jmapper.exceptions;
+
+/**
+ * Exception thrown when a nested bean (relative to Source) is null.
+ * @author Alessandro Vurro
+ *
+ */
+public class NestedBeanNullException extends MappingException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3712064938003346836L;
+
+ public NestedBeanNullException(String str) {
+ super(str);
+ }
+
+}
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NullMappedClassException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NullMappedClassException.java
index ba51b803..a670c475 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NullMappedClassException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/NullMappedClassException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/UndefinedMappingException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/UndefinedMappingException.java
index e48fdd2a..5da3e20a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/UndefinedMappingException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/UndefinedMappingException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/WrongMethodException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/WrongMethodException.java
index d71e276c..1720fc36 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/WrongMethodException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/WrongMethodException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionNameException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionNameException.java
index d14b6f06..02f1576c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionNameException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionNameException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionParameterException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionParameterException.java
index e6f5dff4..505a8cfc 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionParameterException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionParameterException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionTypeException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionTypeException.java
index bd3a762e..a70d39d7 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionTypeException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlConversionTypeException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeDoesNotExistException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeDoesNotExistException.java
index 76b73e6e..fad232cb 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeDoesNotExistException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeDoesNotExistException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeExistException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeExistException.java
index 60f1aaaf..a4d53fa9 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeExistException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingAttributeExistException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassDoesNotExistException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassDoesNotExistException.java
index 92df5091..0af8144c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassDoesNotExistException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassDoesNotExistException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassExistException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassExistException.java
index a9650352..ac5ce3fc 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassExistException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingClassExistException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingException.java
index 7e854d3d..ad2e106a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalDoesNotExistException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalDoesNotExistException.java
index db5fd482..948143f8 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalDoesNotExistException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalDoesNotExistException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalExistException.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalExistException.java
index 2187b071..10dcfca4 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalExistException.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/XmlMappingGlobalExistException.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/package-info.java
index 198fa056..4af31002 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/exceptions/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/ICodeGenerator.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/ICodeGenerator.java
index e6aeff74..5f28ef38 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/ICodeGenerator.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/ICodeGenerator.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/JavassistGenerator.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/JavassistGenerator.java
index 1b0471d1..7a1d3d93 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/JavassistGenerator.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/JavassistGenerator.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,7 +71,8 @@ public Class> generate(String clazzName, List constructors,
ctMethod.setBody(method.getBody());
// add method to CtClass
cc.addMethod(ctMethod); }
- catch (CannotCompileException e) { Error.bodyContainsIllegalCode(method,e); }
+ catch (CannotCompileException e) {
+ Error.bodyContainsIllegalCode(method,e); }
}
Class> generetedClass = cc.toClass();
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperBuilder.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperBuilder.java
index 5ea40e84..ebc9697f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperBuilder.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperBuilder.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java
index 8cf91827..8b26ec51 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructorAccessor.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructorAccessor.java
index 7da4b510..11d4e99c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructorAccessor.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructorAccessor.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperGenerator.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperGenerator.java
index 19b59c76..6724c51f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperGenerator.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperGenerator.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ public class MapperGenerator {
* @param mapping parameter that containts the mappings
* @param dynamicMethods dynamic methods to add
* @return a new instance of IMapper interface, following the mappingBuilder specifications
- * @throws Throwable any error made ​​by the generation of the mapper
+ * @throws Throwable any error made €‹by the generation of the mapper
*/
public static Class> generateMapperClass(MapperConstructor mapping, Set dynamicMethods) throws Throwable{
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Constructor.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Constructor.java
index b5f4d66d..6231016c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Constructor.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Constructor.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Field.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Field.java
index da781094..cb1d22a1 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Field.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Field.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Method.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Method.java
index e6756873..cf74bd09 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Method.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/Method.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/package-info.java
index bdc688b0..774778cc 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/beans/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/package-info.java
index 8614be99..7f925076 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperation.java
index 9177cddf..7f145e25 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,9 +19,12 @@
import static com.googlecode.jmapper.conversions.implicit.ConversionHandler.getConversion;
import static com.googlecode.jmapper.util.ClassesManager.isBoxing;
import static com.googlecode.jmapper.util.ClassesManager.isUnBoxing;
+import static com.googlecode.jmapper.util.GeneralUtility.isNull;
import static com.googlecode.jmapper.util.GeneralUtility.newLine;
import com.googlecode.jmapper.enums.ConversionType;
+import com.googlecode.jmapper.operations.beans.MappedField;
+import com.googlecode.jmapper.operations.info.NestedMappedField;
/**
* This abstract class represents an abstract operation that adds,
@@ -32,12 +35,118 @@
*/
public abstract class AGeneralOperation extends AGeneralOperationAccessor{
+ /** @return the nested mapping */
+ protected StringBuilder getNestedMapping() {
+
+ if(isNull(this.nestedMappingInfo))
+ return null;
+
+ return this.nestedMappingInfo.isSource()
+ ? calculateSourceNestedMapping()
+ : calculateDestinationNestedMapping();
+ }
+
+ private StringBuilder calculateSourceNestedMapping(){
+ StringBuilder mapping = new StringBuilder();
+
+ // this represent the intermediate variables
+ String actualField = this.initialSGetPath;
+ int index = 0;
+ String nestedField = "nestedField"+ ++index;
+ for (NestedMappedField nestedMappedField : this.nestedMappingInfo.getNestedFields()) {
+
+
+ MappedField field = nestedMappedField.getField();
+ Class> nestedClass = field.getValue().getType();
+ tryCatch(mapping, nestedClass, nestedField, actualField, field);
+
+ // in case of last no mapping necessary, but wrote only for checks null field
+ if(this.nestedMappingInfo.isLastField(nestedMappedField))
+ break;
+
+ actualField = nestedField;
+ nestedField = "nestedField" + ++index;
+ }
+ this.initialSGetPath = actualField;
+ return mapping;
+ }
+
+ private void tryCatch(StringBuilder mapping, Class> nestedClass, String nestedField, String actualField, MappedField mappedField){
+ String getField = mappedField.getMethod();
+ String destinationClass = this.nestedMappingInfo.getConfiguredClass().getSimpleName();
+ String destinationField = this.nestedMappingInfo.getConfiguredField().getName();
+ String sourceClass = this.nestedMappingInfo.getFirstNestedClass().getSimpleName();
+ String sourceField = this.nestedMappingInfo.getFirstNestedField().getName();
+
+ write(mapping, " ",nestedClass.getName()," ",nestedField," = null;",
+ newLine, " try{",
+ newLine, " ",nestedField," = ",actualField,".",getField,"();",
+ newLine, " }catch(",NullPointerException.class.getName()," e){",
+ newLine, " com.googlecode.jmapper.config.Error.nestedBeanNull(\"",mappedField.getName(),"\", \"",destinationClass,"\", \"",destinationField,"\", \"",sourceClass,"\", \"",sourceField,"\");",
+ newLine, " }", newLine);
+ }
+
+ private StringBuilder calculateDestinationNestedMapping(){
+ StringBuilder mapping = new StringBuilder();
+
+ // this represent the intermediate variables
+ String actualField = this.initialDGetPath;
+ int index = 0;
+ String nestedField = "nestedField"+ ++index;
+ for (NestedMappedField nestedMappedField : this.nestedMappingInfo.getNestedFields()) {
+
+ // in case of last no mapping necessary
+ if(this.nestedMappingInfo.isLastField(nestedMappedField))
+ break;
+
+ MappedField field = nestedMappedField.getField();
+ Class> nestedClass = field.getValue().getType();
+ nestedMapping(mapping, nestedClass, nestedField, actualField, field);
+
+ actualField = nestedField;
+ nestedField = "nestedField" + ++index;
+ }
+ this.initialDSetPath = actualField;
+ this.initialDGetPath = actualField;
+
+ return mapping;
+ }
+
+
+ /*
+ * Se invece è definita sulla destinazione, allora deve essere prevista la creazione degli elementi intermedi
+ * ovvero:
+ * ClasseCampo campo = initialPath.getCampo();
+ * if(campo == null){
+ * campo = new Campo();
+ * initialPath.setCampo(campo);
+ * }
+ *
+ * ClasseCampo2 campo2 = campo.getCampo2();
+ * if(campo2 == null){
+ * campo2 = new Campo2();
+ * campo.setCampo2(campo2);
+ * }
+ *
+ * ecc... fino ad arrivare al penultimo elemento della catena
+ * */
+ private void nestedMapping(StringBuilder mapping, Class> nestedClass, String nestedField, String actualField, MappedField mappedField){
+ String getField = mappedField.getMethod();
+ String setField = mappedField.setMethod();
+
+ write(mapping, " ",nestedClass.getName()," ",nestedField," = ",actualField,".",getField,"();",
+ newLine, " if(", nestedField," == null){",
+ newLine, " ",nestedField," = new ",nestedClass.getName(),"();",
+ newLine, " ",actualField,".",setField,"(",nestedField,");",
+ newLine, " }", newLine);
+ }
+
/**
* @return a StringBuilder calculated at runtime representing the complete set destination path.
*
for example: destination.setField;
*/
- protected final StringBuilder setDestination() {
- return write(initialDSetPath,".",destinationField.setMethod());
+ protected final StringBuilder setDestination() {
+ return write(initialDSetPath,".",destinationField.setMethod());
}
/**
@@ -54,15 +163,15 @@ protected final StringBuilder setDestination(Object content){
*
for example: destination.getField()
*/
protected final StringBuilder getDestination() {
- return write(initialDGetPath,".",destinationField.getMethod(),"()");
+ return write(initialDGetPath,".",destinationField.getMethod(),"()");
}
/**
* @return a StringBuilder calculated at runtime representing the complete get source path.
*
for example: source.getField()
*/
- protected final StringBuilder getSource() {
- return write(initialSGetPath,".",sourceField.getMethod(),"()");
+ protected final StringBuilder getSource() {
+ return write(initialSGetPath,".",sourceField.getMethod(),"()");
}
/**
@@ -178,4 +287,5 @@ private boolean isNullSetting(){
protected boolean theSourceIsToBeConverted(){
return !info.getConversionType().isAbsent();
}
-}
+
+}
\ No newline at end of file
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperationAccessor.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperationAccessor.java
index e97f4aa1..2d3a27cf 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperationAccessor.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperationAccessor.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
import com.googlecode.jmapper.enums.Membership;
import com.googlecode.jmapper.operations.beans.MappedField;
import com.googlecode.jmapper.operations.info.InfoOperation;
+import com.googlecode.jmapper.operations.info.NestedMappingInfo;
/**
* This Abstract class is a container of data, the purpose is to separate the data from the logic.
@@ -51,7 +52,20 @@ public abstract class AGeneralOperationAccessor {
protected Membership conversionMembership = Membership.INEXISTENT;
/** true if destination set method should not be used */
protected boolean avoidSet = false;
+ /** nested mapping information */
+ protected NestedMappingInfo nestedMappingInfo;
+
+ /** @return nested mapping information */
+ public NestedMappingInfo getNestedMappingInfo() {
+ return nestedMappingInfo;
+ }
+
+ /** @param nestedMappingInfo nested mapping information */
+ public void setNestedMappingInfo(NestedMappingInfo nestedMappingInfo) {
+ this.nestedMappingInfo = nestedMappingInfo;
+ }
+
/**
* Setting of the conversion method
* @param conversion the method used to convert
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/IOperationAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/IOperationAnalyzer.java
index 4dc9a997..b485ce80 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/IOperationAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/IOperationAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/NestedMappingHandler.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/NestedMappingHandler.java
index ca2ad4e8..d1e9e265 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/NestedMappingHandler.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/NestedMappingHandler.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -90,21 +90,28 @@ private static MappedField checkAccessors(XML xml, Class> aClass, Field nested
verifySetterMethods(aClass,field);
return field;
}
-
+
/**
- * This method returns the name of the field whose name matches with regex.
+ * This method returns a bean with nested mapping information.
* @param xml xml configuration
- * @param aClass class to check
- * @param regex regex used to find the field
+ * @param targetClass class to check
+ * @param nestedMappingPath path that define nested mapping
+ * @param sourceClass sourceClass used to indentify nested mapping
+ * @param destinationClass destinationClass used to indentify nested mapping
+ * @param configuredField used only for the explanation of the errors
* @return NestedMappingInfo
*/
- public static NestedMappingInfo loadNestedMappingInformation(XML xml, Class> aClass,String regex){
- NestedMappingInfo info = new NestedMappingInfo();
+ public static NestedMappingInfo loadNestedMappingInformation(XML xml, Class> targetClass,String nestedMappingPath, Class> sourceClass, Class> destinationClass, Field configuredField){
+
+ boolean isSourceClass = targetClass == sourceClass;
+ NestedMappingInfo info = new NestedMappingInfo(isSourceClass);
+ info.setConfiguredClass(isSourceClass?destinationClass:sourceClass);
+ info.setConfiguredField(configuredField);
try{
- Class> nestedClass = aClass;
- String[] nestedFields = nestedFields(regex);
+ Class> nestedClass = targetClass;
+ String[] nestedFields = nestedFields(nestedMappingPath);
Field field = null;
// from first field to second-last it's only checked get accessor
@@ -115,10 +122,14 @@ public static NestedMappingInfo loadNestedMappingInformation(XML xml, Class> a
if(isNull(field))
Error.inexistentField(nestedFieldName, nestedClass.getSimpleName());
+ //TODO NestedMapping -> effettuare test su verifica solo get e entrambi
// verifies if is exists a get method for this nested field
- MappedField nestedField = checkGetAccessor(xml, nestedClass, field);
+ // in case of nested mapping relative to source, only get methods will be checked
+ // in case of nested mapping relative to destination, get and set methods will be checked
+ MappedField nestedField = isSourceClass ? checkGetAccessor(xml, nestedClass, field)
+ : checkAccessors(xml, nestedClass, field);
- // storage information relatiing to the piece of path
+ // storage information relating to the piece of path
info.addNestedField(new NestedMappedField(nestedField, nestedClass));
nestedClass = field.getType();
@@ -139,7 +150,7 @@ public static NestedMappingInfo loadNestedMappingInformation(XML xml, Class> a
}catch(MappingException e){
- InvalidNestedMappingException exception = new InvalidNestedMappingException(regex);
+ InvalidNestedMappingException exception = new InvalidNestedMappingException(nestedMappingPath);
exception.getMessages().put(InvalidNestedMappingException.FIELD, e.getMessage());
throw exception;
}
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationAnalyzer.java
index 73b82154..dee9092e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationFactory.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationFactory.java
index 19f590b1..21a1a7bc 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationFactory.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationFactory.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationHandler.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationHandler.java
index 9947d17b..6ebc0095 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationHandler.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/OperationHandler.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -128,9 +128,10 @@ public void loadStructures(Set dynamicMethodsToWrite) {
Field targetField = null;
NestedMappingInfo nestedMappingInfo = null;
+
if(isNestedMapping)
try{
- nestedMappingInfo = loadNestedMappingInformation(xml, targetClass, targetFieldName);
+ nestedMappingInfo = loadNestedMappingInformation(xml, targetClass, targetFieldName, sourceClass, destinationClass, configuredField);
targetField = nestedMappingInfo.getLastNestedField();
}catch(InvalidNestedMappingException e){
// catch and rethrown the exception with more information
@@ -140,7 +141,9 @@ public void loadStructures(Set dynamicMethodsToWrite) {
MappedField configuredMappedField = new MappedField(configuredField);
- MappedField targetMappedField = new MappedField(targetField);
+
+ MappedField targetMappedField = isNestedMapping ?nestedMappingInfo.getLastNestedMappedField()
+ :new MappedField(targetField);
MappedField destinationMappedField = isDestConfigured?configuredMappedField:targetMappedField;
MappedField sourceMappedField = isDestConfigured?targetMappedField:configuredMappedField;
@@ -170,26 +173,6 @@ public void loadStructures(Set dynamicMethodsToWrite) {
AGeneralOperation operation = OperationFactory.getOperation(operationType);
-
- /*
- * Arrivato a questo punto ho le informazioni del nested mapping
- *
- * isDestConfigured? costruisco path a source: costruisco path a destination
- *
- * sia che sia source che destination i path vanno costruiti ciclando su tutti i nestedField tranne l'ultimo che cambia
- * in base che sia get o set:
- * String pathIniziale = getNF1().getNF2()
- * String pathGet = pathIniziale + getNF3()
- * String pathSet = pathIniziale + setNF3()
- *
- * Destination getDestination =
- * operation.initialDGetPath("destination");
- * operation.initialDSetPath("destination");
- * operation.initialSGetPath("source");
- *
- *
- * */
-
if(operationType.isBasic())
simpleOperations.add((ASimpleOperation) operation);
@@ -206,7 +189,9 @@ public void loadStructures(Set dynamicMethodsToWrite) {
// common settings
operation.setDestinationField(destinationMappedField)
.setSourceField(sourceMappedField)
- .setInfoOperation(info);
+ .setInfoOperation(info)
+ .setNestedMappingInfo(nestedMappingInfo);
+
boolean isAvoidSet = false;
boolean isConversion = info.getOperationType().isAConversion();
@@ -214,13 +199,15 @@ public void loadStructures(Set dynamicMethodsToWrite) {
if(isConversion)
isAvoidSet = conversionAnalyzer.getMethod().isAvoidSet();
- // verifies destination accessors
- if(isAvoidSet) verifyGetterMethods(destinationClass,destinationMappedField);
- else verifiesAccessorMethods(destinationClass,destinationMappedField);
+ // verifies destination accessors only if isn't a nested field
+ if(!isNestedMapping || targetClass != destinationClass)
+ if(isAvoidSet) verifyGetterMethods(destinationClass,destinationMappedField);
+ else verifiesAccessorMethods(destinationClass,destinationMappedField);
- // verifies source accessors
- verifyGetterMethods(sourceClass,sourceMappedField);
- findSetterMethods(sourceClass,sourceMappedField);
+ // verifies source accessors only if isn't a nested field
+ if(!isNestedMapping || targetClass != sourceClass)
+ verifyGetterMethods(sourceClass,sourceMappedField);
+ findSetterMethods(sourceClass,sourceMappedField);
operation.avoidDestinationSet(isAvoidSet);
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayAnalyzer.java
index e32b3f74..92eaab48 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayListAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayListAnalyzer.java
index 5595441c..aab7d760 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayListAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayListAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/BasicAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/BasicAnalyzer.java
index fd0282c7..e383dcaa 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/BasicAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/BasicAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/CollectionAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/CollectionAnalyzer.java
index bc5882ef..fc1dfd9c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/CollectionAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/CollectionAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MapAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MapAnalyzer.java
index 155f3a39..cc8e2027 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MapAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MapAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MappedObjectAnalyzer.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MappedObjectAnalyzer.java
index 3f188d1f..5799cb4d 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MappedObjectAnalyzer.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/MappedObjectAnalyzer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/package-info.java
index ff14043e..3514b5e7 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/MappedField.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/MappedField.java
index 8a435e36..c988aaed 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/MappedField.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/MappedField.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/package-info.java
index e574eb80..70afba33 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/beans/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java
index 2e905e16..736cf025 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,7 +85,9 @@ protected Object getSourceTreated(){
* @return a StringBuilder containing the mapping operation
*/
public final StringBuilder write(boolean isNewInstance) {
- return addMappingTypeControl(genericFlow(isNewInstance));
+ StringBuilder nestedMapping = getNestedMapping();
+ StringBuilder mapping = addMappingTypeControl(genericFlow(isNewInstance));
+ return isNull(nestedMapping)?mapping:nestedMapping.append(mapping);
}
/**
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayListOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayListOperation.java
index 92346ce4..cb9a342f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayListOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayListOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayOperation.java
index 28d26c49..9991784b 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ArrayOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/CollectionOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/CollectionOperation.java
index 5ab953be..adaff736 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/CollectionOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/CollectionOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ConversionOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ConversionOperation.java
index ad8e2745..1afd4bbc 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ConversionOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ConversionOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ListArrayOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ListArrayOperation.java
index 6e1a93e3..0a8ed72e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ListArrayOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/ListArrayOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/MapOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/MapOperation.java
index dc8d6e3b..7129e8bf 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/MapOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/MapOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/package-info.java
index 5fc4d37a..64a93f0c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoMapOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoMapOperation.java
index a6c45bc3..b30d909e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoMapOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoMapOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoOperation.java
index 9876cb5a..fcd4fa01 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/InfoOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappedField.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappedField.java
index e5750bed..4e01773c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappedField.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappedField.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappingInfo.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappingInfo.java
index 00ecf909..55149447 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappingInfo.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/NestedMappingInfo.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,8 @@
import java.util.ArrayList;
import java.util.List;
+import com.googlecode.jmapper.operations.beans.MappedField;
+
/**
* Information relative to nested mapping path.
*
@@ -27,10 +29,31 @@
*/
public class NestedMappingInfo {
- List nestedFields;
+ /** list of couples of field-class relatives to nested path */
+ private List nestedFields;
+
+ /** true if the nested path is relative to the source */
+ private final boolean isSource;
- public NestedMappingInfo() {
+ /** configured class */
+ private Class> configuredClass;
+
+ /** configured field */
+ private Field configuredField;
+
+ public NestedMappingInfo(boolean isSource) {
nestedFields = new ArrayList();
+ this.isSource = isSource;
+ }
+
+
+ public boolean isSource() {
+ return isSource;
+ }
+
+
+ public boolean isLastField(NestedMappedField field){
+ return this.nestedFields.get(nestedFields.size()-1) == field;
}
public List getNestedFields() {
@@ -45,11 +68,39 @@ public void addNestedField(NestedMappedField nestedField){
this.nestedFields.add(nestedField);
}
+ public Field getFirstNestedField(){
+ return nestedFields.get(0).getField().getValue();
+ }
+
+ public Class> getFirstNestedClass(){
+ return nestedFields.get(0).getFieldClass();
+ }
+
+ public MappedField getLastNestedMappedField(){
+ return nestedFields.get(nestedFields.size() - 1).getField();
+ }
+
public Field getLastNestedField(){
- return nestedFields.get(nestedFields.size() - 1).getField().getValue();
+ return getLastNestedMappedField().getValue();
}
public Class> getLastNestedClass(){
return nestedFields.get(nestedFields.size() - 1).getFieldClass();
}
+
+ public Class> getConfiguredClass() {
+ return configuredClass;
+ }
+
+ public void setConfiguredClass(Class> targetClass) {
+ this.configuredClass = targetClass;
+ }
+
+ public Field getConfiguredField() {
+ return configuredField;
+ }
+
+ public void setConfiguredField(Field configuredField) {
+ this.configuredField = configuredField;
+ }
}
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/package-info.java
index 578578ee..df3d5f36 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/info/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/package-info.java
index c7407d06..e2221a7d 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ARecursiveOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ARecursiveOperation.java
index 5d0efd16..d6013b02 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ARecursiveOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ARecursiveOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayListOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayListOperation.java
index f4de2797..9da5d6c1 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayListOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayListOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayOperation.java
index 2b31fddd..49b5b4a2 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedArrayOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedCollectionOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedCollectionOperation.java
index 8f667cc8..ed98c1c6 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedCollectionOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedCollectionOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedListArrayOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedListArrayOperation.java
index a153ea6a..bb425497 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedListArrayOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedListArrayOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedMapOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedMapOperation.java
index 68b67846..c31bd84e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedMapOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/MappedMapOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ObjectOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ObjectOperation.java
index 3bef80bf..7ef5e8a4 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ObjectOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ObjectOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/package-info.java
index 8c090c8f..ce68fab3 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/ASimpleOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/ASimpleOperation.java
index 095841a3..6be3f1e8 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/ASimpleOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/ASimpleOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package com.googlecode.jmapper.operations.simple;
+import static com.googlecode.jmapper.util.GeneralUtility.isNull;
+
import com.googlecode.jmapper.operations.AGeneralOperation;
/**
@@ -26,8 +28,17 @@
*/
public abstract class ASimpleOperation extends AGeneralOperation {
+ /**
+ * @return a StringBuilder that contains the mapping operation handling nested field too
+ */
+ public StringBuilder write(){
+ StringBuilder nestedMapping = getNestedMapping();
+ StringBuilder mapping = mapping();
+ return isNull(nestedMapping)?mapping:nestedMapping.append(mapping);
+ }
+
/**
* @return a StringBuilder containing the mapping operation
*/
- public abstract StringBuilder write();
+ public abstract StringBuilder mapping();
}
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicConversion.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicConversion.java
index d32609ef..09ef6141 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicConversion.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicConversion.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
public class BasicConversion extends ASimpleOperation {
@Override
- public StringBuilder write() {
+ public StringBuilder mapping() {
// add and return a mapping type control
return this.addMappingTypeControl(write(applyExplicitConversion(),newLine));
}
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicOperation.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicOperation.java
index 729e95c0..e0ffe2c0 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicOperation.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/BasicOperation.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
*/
public class BasicOperation extends ASimpleOperation{
- public StringBuilder write() {
+ public StringBuilder mapping() {
Object content = setDestination(applyImplicitConversion(info.getConversionType(), destinationType(), sourceType(), getSource()));
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/package-info.java
index 67358e52..e3fd055f 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/simple/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/package-info.java
index 145c26fe..18018af9 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/AutoBoxing.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/AutoBoxing.java
index 8ab66f7d..680da20e 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/AutoBoxing.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/AutoBoxing.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ private AutoBoxing() { }
}
};
- /** boxingOperations contains all combinations of boxing operations.
+ /** unboxingOperations contains all combinations of unboxing operations.
* key = Wrapper Class name, value = primitive Class name */
public static final HashMap unBoxingOperations =
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java
index 1cc461f8..f027777a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/FilesManager.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/FilesManager.java
index d7f7f659..35fb65d4 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/FilesManager.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/FilesManager.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/GeneralUtility.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/GeneralUtility.java
index ec34effa..9b951862 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/GeneralUtility.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/GeneralUtility.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/package-info.java
index 8671d3f5..8e357e1c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/util/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/util/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Attribute.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Attribute.java
index 603d7d53..b5fa1eec 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Attribute.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Attribute.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Converter.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Converter.java
index a81622fd..755af8d2 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Converter.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Converter.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Global.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Global.java
index 6fa1fac8..801aadee 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Global.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Global.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/SimplyAttribute.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/SimplyAttribute.java
index c292020e..e02b2eed 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/SimplyAttribute.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/SimplyAttribute.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Value.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Value.java
index a8e88aab..e72db909 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Value.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/Value.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XML.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XML.java
index 26a0140c..e5cb3939 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XML.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XML.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlBuilder.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlBuilder.java
index 9f905f07..11d62f1c 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlBuilder.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlBuilder.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlHandler.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlHandler.java
index 4151fa1f..99a4206d 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlHandler.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/XmlHandler.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlAttribute.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlAttribute.java
index fb065d73..8fb1302a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlAttribute.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlAttribute.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlClass.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlClass.java
index 0ce718f9..3596eb03 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlClass.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlClass.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlConversion.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlConversion.java
index 2586078b..696c1449 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlConversion.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlConversion.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobal.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobal.java
index 32fc0982..1963cd2a 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobal.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobal.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalAttribute.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalAttribute.java
index 392ddc6a..2a4cb959 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalAttribute.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalAttribute.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalExcludedAttribute.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalExcludedAttribute.java
index 58f5bd6f..706b88ef 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalExcludedAttribute.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalExcludedAttribute.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalValue.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalValue.java
index 3daebb85..036f2672 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalValue.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlGlobalValue.java
@@ -1,3 +1,18 @@
+/**
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.googlecode.jmapper.xml.beans;
import static com.googlecode.jmapper.config.Constants.DEFAULT_ACCESSOR_VALUE;
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlJmapper.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlJmapper.java
index c21ac00c..65682922 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlJmapper.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlJmapper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlTargetClass.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlTargetClass.java
index a44e7614..ff410db9 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlTargetClass.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlTargetClass.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlValueName.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlValueName.java
index e63c18d2..f533781b 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlValueName.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/XmlValueName.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/package-info.java
index 4cc720b8..5aa51e1b 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/beans/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/package-info.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/package-info.java
index 1423a44c..c0c1d6c3 100644
--- a/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/package-info.java
+++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/xml/package-info.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2012 - 2015 Alessandro Vurro.
+ * Copyright (C) 2012 - 2016 Alessandro Vurro.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/JMapper Framework/src/main/resources/com/googlecode/jmapper/config/jmapper.msg.properties b/JMapper Framework/src/main/resources/com/googlecode/jmapper/config/jmapper.msg.properties
index 416ae936..10517870 100644
--- a/JMapper Framework/src/main/resources/com/googlecode/jmapper/config/jmapper.msg.properties
+++ b/JMapper Framework/src/main/resources/com/googlecode/jmapper/config/jmapper.msg.properties
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2012 - 2013 Alessandro Vurro.
+# Copyright (C) 2012 - 2015 Alessandro Vurro.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,6 +14,14 @@
# limitations under the License.
#
+#####################################
+# Nested mapping exceptions #
+#####################################
+# nested mapping non valido, controlla il campo configurato {1} appartenente alla classe {0} (classe target del mapping: {2})
+InvalidNestedMappingException = Invalid nested mapping: {3} Check the configured field: {0}.{1} (target class: {2}). More information: {4}
+# il campo {0} è null, errore avvenuto in fase di mapping tra {1}(classe)->{2}(campo) e {3}(classe)->{4}(campo)
+nestedBeanNullException = the field {0} is null, error occured in mapping phase between the fields: {1}.{2} and {3}.{4}
+
#####################################
# RelationalJMapper exceptions #
#####################################
@@ -44,8 +52,6 @@ nullMappedClassException1 = {0} Class can not be null
illegalArgumentException1 = {0} Class can not be an interface
# la classe non ha un costruttore vuoto
malformedBeanException1 = the class: {0} hasn't empty constructor
-# nested mapping non valido, controlla il campo configurato {1} appartenente alla classe {0} (classe target del mapping: {2})
-InvalidNestedMappingException = Invalid nested mapping: {3} Check the configured field: {0}.{1} (target class: {2}). More information: {4}
#####################################
# MapperGenerator exceptions #
#####################################