-
Notifications
You must be signed in to change notification settings - Fork 41
Release Notes
- issue #60 closed: wrong classLoader usage
- issue #59 closed: convert primitiv to enum class
- issue #56 closed: MappingType lost in recursive
- issue #54 closed: adjustment of the targetClasses method of Global to that of the Attribute mapping
- Added support for immutable objects!
- The destination Collections will be created with the size of those sources
- JMapperCache utility, permits to handle multiple instance of JMapper and RelationalJMapper
- Added conversion String <-> StringBuilder
- Added conversion String <-> StringBuffer
- Added conversion String <-> Enum
- Added conversion Date <-> Calendar
- Added conversion Enum <-> Enum, when Enum classes are differents
- issue #39 closed: System.out.println in code
- issue #50 closed: API conversion for multiple fields doesn't work
- issue #36 closed: CTclass defrost in finally block
- issue #27 closed: it's possible use the API configuration with RelationalJMapper too
- issue #29 closed: multithreading work is safe now
- issue #30 closed: is applied a cast from source to target when source is of Object type and the target primitive/wrapper
- Configuration via API
- switched location for the XSD file from google code to github hosting, revised just a few names, we didn't do structural changes.
- Nested Mapping implemented!
- copyright updated
fixed:
- issue #18 closed: now is possible to use the inherited mapping with RelationalJMapper
some bug fixed:
- issue #14 closed: special characters (as $) are handled in basic mapping
- issue #15 closed: synthetic and serialVersionUID fields are ignored by the mapping.
In this release:
- xml configuration as String
- bytecode generation strategy
- issue #8 closed: XML conversion configuration leads to IllegalArgumentException
some bug fixed:
- issue #6 closed: NPE when XML path is wrong
- issue #5 closed: recursive mapping Object/List/List doesn't work
- issue #4 closed: bug in getGenericString method of ClassesManager class
regex function added
Now it's possible use regex to identify fields.
added the get and set placeholder
With this relase it's possible to use, in dynamic methods, the get and set placeholder.
For destination are: ${destination.get}
, ${destination.set}
and for source are: ${source.get}
, ${source.set}
.
This placeholder permits to implement the flatten and projection functions easily.
class parameter in JMapAccessor
Added class parameter in JMapAccessor to avoid cases where target and mapped fields have the same name for example:
public class Destination{
@JMapAccessors({
@JMapAccessor(name="field",get="get",set="set", classes={Source.class}),
@JMapAccessor(name="field",get="get",set="set", classes={Destination.class})
})
private String field;
}
avoid set method in explicit conversions
Now you can avoid the use of set method for the destination instance. In Annotation:
@JMapConversion(avoidSet=true)
In XML:
<conversion name="conversion" avoidSet="true">
conversion body
</conversion>
This is usefull when destination fields are obtainable only by the get method
JMapAccessor handled in XMlHandler
The methods from and to XML are updated to work with JMapAccessor too.
XSD for XML configuration
Added the XML Schema relative to xml configuration.
<?xml version="1.0" encoding="UTF-8"?>
<jmapper xmlns="https://jmapper-framework.googlecode.com"
xmlns:xsi="https://jmapper-framework.googlecode.com/svn"
xsi:noNamespaceSchemaLocation="https://jmapper-framework.googlecode.com/svn/jmapper.xsd">
</jmapper>
JMapAccessor
Now you can define get/set custom methods! With @JMapAccessor and get and set attribute.
For more information see the wiki page.
XmlHandler
Added xsd declaration in generated xml.
Exception rethrown
The internal exceptions are wrapped as RuntimeException and relaunched.
merge optimized of two arrays.
the actual operation is:
String[] newArray = new String[firstArray.length + secondArray.length];
int index = 0;
for(int i = 0; i < firstArray.length: i++){
newArray[index++] = firstArray[i];
}
for(int i = 0; i < secondArray.length: i++){
newArray[index++] = secondArray[i];
}
This code is simple but slow, the best way to do this is to use system methods, as follow:
String[] newArray = Arrays.copyOf(firstArray, firstArray.length + secondArray.length);
System.arraycopy(secondArray, 0, newArray, firstArray.length, secondArray.length);
This algorithm is three times faster and short.
Errors management of Dynamic Methods.
errors managed: methods poorly written and null variables as input.
Added management of primitive types in complex mappings.
the dynamic mappings between primitive types and complex types as Map,Collection etc.. now are permitted.
Dependencies update.
XStream, slf4j and javassist and added JMapper API.
Added printStackTrace.
To avoid log management a printStackTrace will be added.
Mapping between collections.
The order of the destination will be the same of source.
get method for boolean.
For boolean types: will be permitted have a "get" method in addition to "is" method.
OSGI compatible.
Will be published an artifact with only interfaces to be compliant to OSGI specification.
Global Mapping added.
This feature permits to apply a global mapping avoiding configuration redundancy.
Packaging renamed.
The package names will be changed from it.avutils.*
to com.googlecode.*
Maven pom adjustment.
Some dependencies will be deleted as redundant.
With this released the features added are:
Inherited configuration
Now we can define a common configuration/conversions in the superclass, less code, less redundance and less maintenance.
Implicit conversion between arrays and collections
With this features we can configure arrays with collections and vice versa, with any type of items (primitive, wrapper and mapped).
OneToMany method changed
To prevent unexpected behavior in case of singleton pattern usage in multi-threaded environment, the definition of the target class will be done through the passage of the class as input to the method.
Explicit conversions added.
This feature permits to apply a specific logic as a simple conversion or to insert a condition, both in XML that in java.
First release of JMapper Framework.
This release contains basic features as:
- create and enrich target objects
- apply a specific logic to the mapping (only valued fields, only null fields, etc..)
- automated management of the XML file
- possibility of implementing the 1 to N and N to 1 relationships
© 2016 Alessandro Vurro
- Home
- How to map
- Relations
- Conversions
- creation/enrichment
- XML
- Annotation
- API
- Configurations
- Utilities
- Examples
- Articles
- More information
- Performance tests
- Release Notes